Commit Graph

6461 Commits

Author SHA1 Message Date
Gary Verhaegen
7859bc13e1
inline help: scripts JSON API clarification (#9057)
* inline help: scripts JSON API clarification

While writing a forum response and trying to use `daml script` against
the JSON API, I was a bit confused by the existing help texts.

CHANGELOG_BEGIN
CHANGELOG_END

* thanks, scalafmt, that's very useful feedback
2021-03-09 16:01:22 +00:00
Moritz Kiefer
642385a692
Upgrade elliptic dependency to address vulnerabilities (#9055)
* Upgrade elliptic dependency to address vulnerabilities

This PR bumps our already existing resolution on elliptic to address a
security issue.

I don’t believe in keeping deps at arbitrarily outdated versions so
this PR fully regenerates the yarn.lock files.

changelog_begin
changelog_end

* Apparently upgrading Navigator is bad

changelog_begin
changelog_end
2021-03-09 14:44:10 +01:00
Stefano Baghino
f2b9f118cf
Check that only the command signed payload goes through (#9053)
Left over from https://github.com/digital-asset/daml/pull/9036

Addresses https://github.com/digital-asset/daml/pull/9036#pullrequestreview-606492151

changelog_begin
changelog_end
2021-03-08 21:34:10 +01:00
Moritz Kiefer
5197374cab
Build SDK EE tarball (#9049)
* Build SDK EE tarball

This sets up the infrastructure to build an SDK EE tarball and allows
for swapping out all files included in the tarball depending on the
edition. As an example, this includes the JSON API with (partial)
Oracle support in the EE tarball.

This PR does not yet address publishing this artifact to Artifactory.
I’ll tackle that in a separate PR.

changelog_begin
changelog_end

* Build in temp dir because Windows is stupid

changelog_begin
changelog_end

* directories are bad

changelog_begin
changelog_end

* Navigator resources are actually needed

changelog_begin
changelog_end
2021-03-08 17:48:00 +01:00
Stefano Baghino
1bec2116ba
Add tests for client bindings (#9036)
* Add tests for client bindings

changelog_begin
changelog_end

Closes #8636

* Address https://github.com/digital-asset/daml/pull/9036#discussion_r588332093
2021-03-08 16:32:23 +00:00
Kamil Bożek
27fd9327f6
Disclose transactions in the flat transactions stream only to the stakeholders - test case [DPP-276] (#9028)
* Test case draft

* Proper test for disclosing events in the flat transactions stream only to stakeholders

* Improved assertion for TXNotDiscloseCreateToNonSignatory test

*
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-08 16:28:54 +01:00
Stefano Baghino
45b33757b2
Introduce a helper to limit signing to commands (#9050)
This allows the signing interceptor to be generic for now (which
is useful to test), while allowing the users to use a simple
static method to only sign commands directed to the command and
command submittion services.

This is intended to address https://github.com/digital-asset/daml/pull/9036#discussion_r588332093

https://github.com/digital-asset/daml/pull/9036 should be rebased
on the main branch after this has been merged.

changelog_begin
changelog_end
2021-03-08 16:26:02 +01:00
nickchapman-da
0c4d8ac19c
Speedy: rollback within exercise (#9040)
* WIP

At a baseline test in RollbackTest for an exercise when no exception thrown.

changelog_begin
changelog_end

* call abortExercises if exception throwing unwinds stack through KCloseExercise Kont frames
2021-03-08 15:11:48 +00:00
Gary Verhaegen
caa023b72e
ci/cron/check: remove dade-assist calls (#9048)
* ci/cron/check: remove dade-assist calls

We can only run this in a context where the dev-env is already set up
anyway, as that's how we get Bazel to build the script in the first
place.

CHANGELOG_BEGIN
CHANGELOG_END

* remove skip_java logic
2021-03-08 13:55:19 +00:00
Remy
85f0965ab9
LF: fix archive decoder for GREATER_DATE (#9047)
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-08 13:42:02 +00:00
Gary Verhaegen
121534c54d
ci/cron/check: low-hanging perf improvement (#9042)
Two quick improvements I made while waiting on #9039:
- Avoid loading Java. When looking at the logs flow by this seemed to be
  taking a huge amount of time.
- Isolate the gcloud config files, which allows for running gcloud
  downloads in parallel.

Together these reduce the `check_releases` runtime from about 5 hours to
about 2. There's much more (and smarter) work needed on this, but this
was really easy to do.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-08 07:56:33 +00:00
azure-pipelines[bot]
fb0bd82740
update NOTICES file (#9045)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-08 08:47:32 +01:00
Gary Verhaegen
4fd42a6772
reduce noise on daily tests (#9039)
Getting a separate message per test was fine when there was one, but
this kind of got our of hand at this point.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-05 22:50:23 +00:00
Moritz Kiefer
5d88c08832
Bump ghcide (#9041)
* Bump ghcide

Includes https://github.com/digital-asset/daml-ghcide/pull/13 meaning
we can now remove the hacks for missing signatures

changelog_begin

- [Daml Compiler] Fix a bug where passing `--ghc-option=-Werror` also
  produced errors for warnings produced by `-Wmissing-signatures` even
  if the user did not explicitly enable this.

changelog_end

* Bump to merged commit

changelog_begin
changelog_end
2021-03-05 18:17:28 +01:00
Gary Verhaegen
41d62ea5c0
send CI failures on separate channel (#9038)
This will send CI failures to `#ci-failures-daml`.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-05 14:10:30 +00:00
Gary Verhaegen
e26d006f6f
slack: reduce @here mentions (#9037)
The people who care about these alerts monitor the channel closely
enough anyway, and having frequent automated @here bells ringing makes
it harder for individuals to highlight important messages.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-05 13:55:58 +00:00
Stefano Baghino
ae110361f0
Add more shared infrastructure for non-repudiation testing (#9035)
More dummy participant components, shared across the non-repudiation sub-tree.

These will also be used in client bindings tests.

changelog_begin
changelog_end
2021-03-05 14:48:03 +01:00
nickchapman-da
75140744aa
Speedy: building transactions with rollback (#8983)
* WIP

add LF examples to test try-catch & throw

add (integer) info to template for created contracts

call {begin,end,abort,rollback}Try during speedy on-ledger execution

add test to exercise abortTry

changelog_begin
changelog_end

* share boilerplate in test setup

* test value of created contracts, not just the count

* naming

* avoid Scenarios in tests. Just working directly with Update expressions

* use machine.withOnLedger, so crash if we are not
2021-03-05 12:33:22 +00:00
azure-pipelines[bot]
98410e7c7f
update compat versions for 1.11.0-snapshot.20210304.6422.0.d3d5042a (#9032)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-05 11:33:57 +01:00
Moritz Kiefer
0f1d2a9c47
Upgrade akka to 2.6.13 (#9026)
Seems to have a few useful bugfixes
https://akka.io/blog/news/2021/02/23/akka-2.6.13-released. Unclear if
we’re affected by those bugs but I’d rather not worry about whether we are.

changelog_begin
changelog_end
2021-03-05 10:31:37 +01:00
Moritz Kiefer
b1a59d0c70
Release SDK 1.11.0 RC 2 (#9031)
Only change is d3d5042ac0

changelog_begin
changelog_end
2021-03-04 20:07:41 +00:00
Moritz Kiefer
41e049339b
Fix --extract option in ledger api test tool (#9029)
This broke in #8894

changelog_begin
changelog_end

windows is great

changelog_begin
changelog_end
2021-03-04 18:32:18 +00:00
Moritz Kiefer
0281b442b8
-Werror all the things (#9027)
We used to do this for some packages but it broke cpp. I don’t
actually know why it doesn’t do that anymore but I’ll gladly accept
that fact and turn it on everywhere.

changelog_begin
changelog_end
2021-03-04 19:08:59 +01:00
Moritz Kiefer
2c08586d33
Expose Daml stacktraces for Daml Script errors (#9025)
* Expose Daml stacktraces for Daml Script errors

This finally plugs together the pieces from the previous PRs to
provide stacktraces on any ScriptF command (and thereby anything
involving an interaction with the ledger).

fixes #8754

changelog_begin

- [Daml Script] When running Daml Script on the command line you will
  now see a Daml stacktrace on failures to interact with the ledger
  which makes it significantly easier to track down which of the calls
  fails. By default, you will only get the callsite of functions like
  `submit`. To extend the stack trace, add `HasCallStack` constraints
  to functions and those will also be included.

changelog_end

* Fix non-determinism in tests

changelog_begin
changelog_end

* fmt

changelog_begin
changelog_end
2021-03-04 16:13:50 +01:00
Andreas Herrmann
c7ee410fa3
Use DA.Map in triggers if available (#9023)
* Use DA.Map in triggers if available

Replaces DA.Next.Map by DA.Map in the trigger library if the DAML-LF
version supports it, i.e. above 1.11.
Selects on `DAML_GENMAP` and `DAML_GENERIC_COMPARISON` using `CPP`.

changelog_begin
- [Triggers] The trigger library now uses `DA.Map` instead of the
  deprecated `DA.Next.Map` if the targeted Daml-LF version supports it.
  This is a breaking change: Code that interfaced with the triggers
  library using `DA.Next.Map`, e.g. with
  `Daml.Trigger.getCommandsInFlight` or `Daml.Trigger.Assert.testRule`,
  will need to be changed to use `DA.Map` instead.
changelog_end

* Deduplicate GMap imports in triggers

* DA.Next.Map --> DA.Map in carbon-upgrade-trigger

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-03-04 14:15:01 +01:00
Stefano Baghino
d347934db3
Make non-repudiation PostgreSQL back-end certificate adding idempotent (#9024)
Closes #9021

changelog_begin
changelog_end
2021-03-04 13:26:39 +01:00
Stefano Baghino
eaf7fb6f63
Add non-repudiation API (#8982)
* Add non-repudiation API

The Web API for the non-repudiation proxy allows to retrieve the signed
payload for a given command, add a new certificate or query for an
existing one.

Closes #8658

changelog_begin
changelog_end

* Fix Scala 2.13 compilation error

* Test error conditions

* Add tests for errors and logging

* Fix Scala 2.13 compilation error

* Address https://github.com/digital-asset/daml/pull/8982#discussion_r585641768

* Address https://github.com/digital-asset/daml/pull/8982#discussion_r585674885

* Address https://github.com/digital-asset/daml/pull/8982#discussion_r585668733
2021-03-04 11:02:25 +00:00
Stefano Baghino
5a3c95251c
Document latency of Windows ad-hoc machine software installation (#9022)
changelog_begin
changelog_end
2021-03-04 10:41:21 +00:00
Robin Krom
3758b57a87
pkg deps: Move all dalfs to package dependency directory (#9002)
As a first step for the daml package manager, we move all dalf files
from (data-)dependencies to a new `.daml/dependencies` directory.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-04 11:37:03 +01:00
azure-pipelines[bot]
f70d3391ef
update compat versions for 1.10.2 (#9016)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-04 11:36:11 +01:00
Moritz Kiefer
e5421288d9
Improve errors on duplicate record field names (#9010)
* Improve errors on duplicate record field names

fixes #8994

changelog_begin
changelog_end

* Apparently I was wrong about names

changelog_begin
changelog_end

* hlint

changelog_begin
changelog_end

* newlines don’t render well in daml build

changelog_begin
changelog_end

* maybe I should test if my code compiles before pushing

changelog_begin
changelog_end
2021-03-04 10:13:24 +01:00
Moritz Kiefer
65fbcfe8e9
Move execution of commands out of Runner (#9009)
This PR extracts the implementation of the individual commands out of
Runner and into the commands. Turns out, object oriented programming
is good actually.

This is another prerequisite for including stack traces. With this PR
landed, it should be quite easy to adapt Runner to rethrow failed
futures including the daml stacktrace.

changelog_begin
changelog_end
2021-03-04 10:07:36 +01:00
Gary Verhaegen
2688ad6f0d
autorelease: improved PR message (#9008)
Thanks to @stefanobaghino-da for the suggestion.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 21:16:23 +00:00
Moritz Kiefer
185e91646d
Release 1.10.2 (#9006)
This includes
80d080ef9f (and
only that compared to 1.10.1.

changelog_begin
changelog_end
2021-03-03 19:31:53 +01:00
mziolekda
4ed3f1a6de
Cut a snapshot release for the 1.8.0 special patch (#8998)
* cut a snapshot release for the 1.8.0 special patch

CHANGELOG_BEGIN
CHANGELOG_END

* update for #9000

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-03-03 18:44:59 +01:00
azure-pipelines[bot]
ba1456fd5a
rotate release duty after 1.11.0-snapshot.20210302.6414.0.72870630 (#8992)
@stefanobaghino-da is taking care of 1.11.0-snapshot.20210302.6414.0.72870630 (#8991), so they get pushed back to the end of the line.

Please do not merge this before #8991.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-03 17:52:24 +01:00
Gary Verhaegen
259bf682c4
compat: fix killing stale sandbox(es) (#9003)
We've seen this happen once; I don't think it's worth investigating.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 15:14:05 +00:00
Moritz Kiefer
32dc8b007b
Include stack traces for all ScriptF commands (#8999)
This PR adds stack traces to all ScriptF commands and handles those in
the converter. Those stack traces are not yet used. To ease review,
I’ve left that for a separate PR. The plan is to use this to tackle
https://github.com/digital-asset/daml/issues/8754.

changelog_begin
changelog_end
2021-03-03 15:07:09 +01:00
azure-pipelines[bot]
1525957c7a
release 1.11.0-snapshot.20210302.6414.0.72870630 (#8991)
This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging.

@stefanobaghino-da is in charge of this release.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-03 14:29:41 +01:00
Andreas Herrmann
926949e503
Use single party submit/submitTree where appropriate (#8995)
* Move [] into submit

* Use submit instead of submitMulti for single party

changelog_begin
changelog_end

* Test multi-party submission

* Factor out construction of submit command

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-03-03 14:16:48 +01:00
Stefano Baghino
145ddaa86d
Point out where the documentation for release.sh is (#8996)
changelog_begin
changelog_end
2021-03-03 11:55:30 +00:00
Robin Krom
7490832966
damlc-test: add 'large' label to BUILD (#8997)
Hopefully this gives the tests more time to complete on the mac nodes.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 11:38:57 +00:00
Kamil Bożek
32d4bf92ec
Do not require a JWT token for Health and Reflection services [DPP-277] (#8969)
* Do not require a JWT token for Health and Reflection services

CHANGELOG_BEGIN
- A JWT token is no longer required to call methods of Health and Reflection services
CHANGELOG_END

* Let service's authorizer decide about rejections

* Updated authorization test

* Added integration test for unsecured authorisation test for the Health service

* Added integration test for unsecured authorisation test for the Server Reflection service

* Updated Claims doc comments

* Minor change

* Reduced code duplication with SecuredServiceCallAuthTests and UnsecuredServiceCallAuthTests

* Added copyrights

* Move response status handling logic to Authorizer
2021-03-03 11:05:35 +00:00
Moritz Kiefer
a40b4a978e
Factor out "parsing" of ScriptF constructors (#8984)
I was trying to add stacktraces and this giant pattern match got
really annoying so this PR tries to improve the situation somewhat by
factoring out the parsing into a separate module. There is more stuff
we can do here but this is at least a start.

changelog_begin
changelog_end
2021-03-03 11:05:51 +01:00
Andreas Herrmann
f4eeed396a
Update rules_haskell (#8987)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-03-03 10:40:26 +01:00
Gerolf Seitz
fc743374f6
[participant] Proper async boundaries between pipeline stages (#8993)
mapAsync doesn't introduce async boundaries, meaning there's not much of
a pipelining going on.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 09:29:51 +00:00
Moritz Kiefer
4001f5c9bd
Conduitify download in release file (#8988)
* Conduitify download in release file

Apologies, my ocd kicked in when I saw this in another PR.

changelog_begin
changelog_end

* fixup deps

changelog_begin
changelog_end

* i should stop working

changelog_begin
changelog_end
2021-03-03 08:49:41 +01:00
Moritz Kiefer
7287063072
Fix protobuf structure for empty import prefix (#8986)
052f69cde9
broke the structure of our protobufs by changing the import prefix
from "." to an empty string which ends up flattening the whole
file. This PR changes the default for tars to match the old
behavior. We can’t just change the default at the function level since
the prefix is used outside of pkg_tar and in those places an empty
string is required :(

changelog_begin
changelog_end
2021-03-02 17:26:34 +01:00
Robin Krom
11ec339f6f
feature: damlc lints all files in project directory (#8979)
* feature: damlc lints all files in project directory

fixes #8887.

This changes the input options of `damlc lint` to take several files. If
no file is given, all `.daml` files contained in the directory are
linted.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-02 15:50:57 +01:00
Gary Verhaegen
9da40ea426
ci/cron: fix retry policy (#8985)
I think the retry is clobbering the files. Here is my theory:
- The HTTP request is lazy, i.e. it starts producing a byte stream
  before it has finished downloading.
- The connection somehow crashes in the middle of that lazy handling,
  possibly because the Haskell code blocks for too long on something
  else and GCP thus closes the connection. (If this is true, making sure
  we download the entire thing before we start writing may make the
  download more reliable.) This explains why we get a "resource vanished"
  and not a plain 404 to start with.
- The retry policy doesn't know anything about HTTP requests; it just
  sees an IO action throwing an exception and restarts the whole thing.
- Because the IO action opens the file in Append mode, we thus end up
  with a file that is too big and has its "starting bytes" multiple
  times. That obviously fails to sign-check.

If this is what happens then the retry does not help at all, which does
seem to be what we've been observing (though I haven't tracked the exact
error rate too closely). The fix would likely be as simple as changing
`IO.AppendMode to IO.WriteMode (which truncates, per [documentation]).

[documentation]: https://hackage.haskell.org/package/base-4.14.1.0/docs/System-IO.html

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-02 13:51:00 +00:00