Commit Graph

9654 Commits

Author SHA1 Message Date
daravep
e603fe2b99
Log failed runnable of akka execution sequencer (#13227)
Observed a null pointer exception, but have almost no information where it is coming from without a class name.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 12:15:21 +00:00
Simon Maxen
2d423e2b91
Daml assitant support for Http metering endpoint [DPP-858] (#13157)
* Add metering report http endpoint and daml helper support

changelog_begin
changelog_end

* Http metering request is by ISO date, not time
2022-03-10 11:33:09 +00:00
pbatko-da
2ac30b21f5
Remove conformance mode from com.daml.error.definitions.RejectionGenerators (#13218)
changelog_begin
changelog_end
2022-03-10 12:15:32 +01:00
pbatko-da
fbb3ba55c2
Simplify implementations of BaseError trait [DPP-606] (#13185)
1. Remove `BaseError.Impl`, `LoggingTransactionErrorImpl` and `LoggingPackageServiceError` 
and instead provide more direct `DamlError` and `DamlErrorWithDefiniteAnswer`.


2. Remove custom implementation of `TransactionError.rpcStatus` and instead provide simpler one in `DamlErr.r.rpcStatus` (which works by first calling `code.asGrpcStatus` and then converting the result to `com.google.rpc.status.Status`).

3. Remove `GrpcStatus.toProto` and instead use `DamlError.rpcStatus`.

4. Use `asGrpcStatus` and `asGrpcError`  instead of `asGrpcStatusFromContext` and `asGrpcErrorFromContext` where possible.


changelog_begin
changelog_end
2022-03-10 12:12:14 +01:00
pbatko-da
df2cb4a1fd
[Error codes doc] Put generated source files of error inventories under version control [DPP-606][DPP-777] (#13181)
And add a check (a unit test) that the generated files are up-to-date with what can be generated.
If the check fails then one will need to run `./docs/scripts/gen-error-docs-src.sh` and commit the changes.

changelog_begin
changelog_end
2022-03-10 12:06:58 +01:00
Moritz Kiefer
a8057a5741
Handle absence of table view in Daml Studio (#13245)
We encounter that when there are no transactions which can happen
legitimately if you’re testing pure functions.

fixes #11244

changelog_begin

- [Daml Studio] Fix an issue where script views failed to display if
  there were no transactions. Now you can see trace messages even in
  those cases.

changelog_end
2022-03-10 11:56:06 +01:00
Robin Krom
69a2339906
ifaces: tests: name collisions between defs (#13216)
We add a check and a fix to make sure interface/exception/template names
don't collide.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 11:26:14 +01:00
nickchapman-da
cdf1be9464
Remove AExpr wrapper type. (#13233)
changelog_begin
changelog_end
2022-03-10 09:19:58 +00:00
Sergey Kisel
6da2469425
Cleanup the use of eventually in the tests [DPP-475] (#13156)
* Re-enable some sandbox tests on MacOS

changelog_begin
changelog_end

* Remove the use of eventually where it is not applicable

changelog_begin
changelog_end

* formatting

changelog_begin
changelog_end

* Revert "formatting"

This reverts commit d2f4bfce1b.

* Revert "Remove the use of eventually where it is not applicable"

This reverts commit 74f0ec5517.

run-full-compat: true

* evantually removal

run-full-compat: true

* Revert "Re-enable some sandbox tests on MacOS"

This reverts commit 5a1544953b.

* Adding comments

changelog_begin
changelog_end

* Update ledger/ledger-api-tests/infrastructure/src/main/scala/com/daml/ledger/api/testtool/infrastructure/Allocation.scala

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* remove blank lines

changelog_begin
changelog_end

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2022-03-10 10:05:38 +01:00
Remy
8abf0bae96
Generate SubmissionEntry from KV export (#13209)
We split kv replay as follow:

- [LF] we introduce a simple protobuf to store submission entry (which
  roughly correspond to TRANSACTION_ENTRY and PACKAGE_UPLOAD_ENTRY KV
  submission)

- [KV] we create a tool to extract form a ledger export a sequence of
  submission entry

- [LF] we move the replay tool from KV to LF, and base it on
  submission entries instead of ledger export

The objectify of this split is double:

- on the one side it will simplify maintenance, as it will make API
  between KV and LF more clear (depends only on a protobuf definition)

- on the other side, it will made the use of the tool handy, as it
  will make possible to benchmark the engine without direct dependency
  between KV and LF.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 08:47:04 +01:00
azure-pipelines[bot]
6b72646807
update NOTICES file (#13241)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-10 08:46:14 +01:00
Sergey Kisel
9a27edd656
Improve MessageDigest and Mac instance creation to solve lock contention [DPP-956] (#13221)
* Improve MessageDigest and Mac instance creation to solve lock contention problem [DPP-956]

changelog_begin
Scalability bottleneck in regard to hashing has been fixed in multiple places.
changelog_end
2022-03-09 22:15:32 +01:00
Moritz Kiefer
1a66bb998b
Bump port retries in Canton fixture (#13235)
changelog_begin
changelog_end
2022-03-09 19:18:10 +00:00
Remy
851fb53083
add milli/micro-seconds to RelTime and fix doc (#13217)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-09 19:09:10 +00:00
Simon Maxen
cad7928220
Metering cleanup [DPP-937] (#13210)
* Make no-op metering logging debug

* Address statistic defaulting TODOs

* TODO replaced with ticket

* Switch to using assertLedgerMeteringEnd when ledgering end must be populated

* Note in docs that ledger metering is not affected by participant pruning

* Address review comments leftover from DPP-819

* Switch to using cSQL for options and offsets

changelog_begin
changelog_end
2022-03-09 19:06:04 +00:00
Stefano Baghino
b8fd1747e8
Remove mentions of Daml connect (#13230)
Daml Connect is no longer a thing. I replaced usages with
either Daml or Daml SDK.

changelog_begin
changelog_end
2022-03-09 18:18:51 +00:00
Sofia Faro
7bfd5e40c8
Fix a bug in AstRewriter (#13232)
And change the test that used AstRewriter to also serve as a regression
test. This bug has no impact on production code.

changelog_begin
changelog_end
2022-03-09 18:18:42 +00:00
Stephen Compall
1e562757fe
json-api failure tests with user tokens (#13113)
Refactors a bunch of AbstractHttpServiceIntegrationTestFuns and
elements of #12922's JWT function abstractions into a new
HttpFailureUserFixture, using that split to split the
FailureTests as well.

Fixes #13112.

* restore failure test porting from #12922
This reverts b4942defa4.

* move token-relevant utilities to http-json-testing lib

* replace custom actorsystem setup with AkkaBeforeAndAfter
- suggested by @ray-roestenburg-da; thanks

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Victor Peter Rouven Müller <mueller.vpr@gmail.com>
2022-03-09 18:15:49 +00:00
Gary Verhaegen
7f35d3dc27
update daml.com URLs (#13226)
Requested by Olivia Yu.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-09 18:15:40 +00:00
Stefano Baghino
00b7ad3803
Fix red main (#13224)
changelog_begin
changelog_end

The clash is between:
- https://github.com/digital-asset/daml/pull/13147
- https://github.com/digital-asset/daml/pull/12906

The latter changed the type of `ServerError` to only get `Throwable`s, the former used `ServerError`'s to wrap a string.
2022-03-09 17:09:51 +00:00
nickchapman-da
d6bb26a978
Fix stack-safety when processing function-args in ANF transform. (#13198)
changelog_begin
changelog_end
2022-03-09 16:01:43 +00:00
Simon Maxen
1d40c55177
Add metering report http endpoint [DPP-855] (#13147)
* Added metering report http endpoint

changelog_begin
Added metering report http endpoint
changelog_end

* Update with review comments
2022-03-09 14:59:08 +00:00
Moritz Kiefer
d36123bf03
Bump Canton startup timeout to 2min (#13222)
It looks like 1min is too small under load.

changelog_begin
changelog_end
2022-03-09 13:42:15 +00:00
Robin Krom
ca7efdabde
iface: tests: test DefInterface in daml-lf ast (#13220)
This adds tests for the DefInterface in Daml-lf.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-09 14:38:21 +01:00
Victor Peter Rouven Müller
6829881302
[JSON-API] Fix duplicate error logging & improve error logs messages (#12906)
* Fix duplicate error logging & improve error logs messages

changelog_begin

- [HTTP-JSON] Fix duplicate logging of errors & improved error messages slightly

changelog_end

* Simplify error handling code

* Use simple functions instead of overloading methods

* minimize diff
2022-03-09 12:43:26 +00:00
Sergey Kisel
512d869ecf
Make indexer benchmark independent of kvutils [DPP-946] (#13144)
*  Make indexer benchmark independent of kvutils [DPP-946]  (#13144)

changelog_begin
changelog_end
2022-03-09 13:24:25 +01:00
Moritz Kiefer
212bc9fdf3
Drop more controller can from the docs (#13215)
* Drop more controller can from the docs

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-03-09 11:35:54 +01:00
Moritz Kiefer
4e004e0a88
Replace scenario messages with script (#13207)
* Replace scenario messages with script

In theory we could try to be clever and print the "right" thing. In
practice, scenarios are almost dead so the complexity for that doesn’t
seem worth it.

fixes #13178

changelog_begin
changelog_end

* .
2022-03-09 11:35:37 +01:00
pbatko-da
98fbaae668
[Error codes] Stop using reflective 'BaseError.extractContext' to extract error's context (#13199)
changelog_begin
changelog_end
2022-03-09 10:52:11 +01:00
Moritz Kiefer
af855e5675
Speed up Daml repl startup (#13172)
* Speed up Daml repl startup

Daml repl startup is stupidly slow to the point where starting up and
executing 1+1 takes ~7s (piped to stdin so no typing included).

This PR speeds this up to ~4.5s. In addition to that, we also display
the repl process sooner and complete the last bit of setup while the
user is typing.

Specifically, we do the following:

1. Startup the JVM process in parallel with initializing our package
   db and only block on it once it’s started (and remove a stupid 1s
   sleep which doesn’t actually matter).
2. Load all packages in one go instead of one by one. This (roughly)
   matches how the script service works.
3. Only block on packages being loaded once we start running the
   script. Users can type before and we even typecheck their stuff
   before.

We could take this further and do even more in parallel with users
typing but this seems to strike a good balance between implementation
complexity, UX (if startup actually fails you get somewhat sensible
errors) & performance.

changelog_begin
changelog_end

* handle tls logs

changelog_begin
changelog_end

* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>

* s/terminateBarrier/exitBarrier/

changelog_begin
changelog_end

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-03-09 08:22:42 +00:00
azure-pipelines[bot]
f009ac1478
update NOTICES file (#13214)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-09 08:55:26 +01:00
Marton Nagy
f939299960
Add additional metric tracking cumulated Engine execution per interpretation (#13188)
changelog_begin
changelog_end
2022-03-09 07:24:38 +01:00
Moritz Kiefer
1f24348e21
Fix compat tests for 2.0.0 (#13187)
* Fix compat tests for 2.0.0

We also killed our automation by making the releases from the assembly repo.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* allocate public party

changelog_begin
changelog_end
2022-03-08 18:23:30 +01:00
pbatko-da
877713edd3
Move validation error helpers out of ErrorFactories [DPP-606] (#13180)
changelog_begin
changelog_end
2022-03-08 17:15:26 +01:00
Gary Verhaegen
dfa648f585
hunt down DAML better (#13195)
Process:

- `git ls-files -z | xargs -0 -n 100 sed -i --follow-symlinks 's/DAML/Daml/g'`
- `git add -p`
- `git restore -p`
- Check there is no unstaged change left.

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.
- Quicker check for fals positives:

```
git grep DAML | grep -v migration | grep -v DAML_
```

Fixes #13190

Note: This is the "second half" of #13191, which failed to cover all the
remaining DAMLs because of:

```
$ git ls-files | grep "'"
compiler/damlc/tests/daml-test-files/MangledScenario'.daml
```

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-08 17:04:58 +01:00
Robin Krom
d130bd2516
ifaces: tests: check for iface defs in templates (#13194)
* ifaces: tests: check for iface defs in templates

This adds a test that will fail when an interface definition is present
in a module when daml-lf < 1.dev.

CHANGELOG_BEGIN
CHANGELOG_END

* Update daml-lf/archive/src/test/scala/com/digitalasset/daml/lf/archive/DecodeV1Spec.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Update daml-lf/archive/src/test/scala/com/digitalasset/daml/lf/archive/DecodeV1Spec.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Update daml-lf/archive/src/test/scala/com/digitalasset/daml/lf/archive/DecodeV1Spec.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* remy's suggestions

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-03-08 14:44:46 +00:00
Robin Krom
be6bbc82b9
ifaces: tests: check for interface collisions in ast (#13196)
* ifaces: tests: check for interface collisions in ast

We add a test to check for interface name collisions in the daml-lf AST.

CHANGELOG_BEGIN
CHANGELOG_END

* Update daml-lf/language/src/test/scala/com/digitalasset/daml/lf/language/AstSpec.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-03-08 14:08:48 +00:00
pbatko-da
1c4b767295
Pattern match on each log level when logging errors (#13182)
changelog_begin
changelog_end
2022-03-08 15:01:10 +01:00
pbatko-da
bfe6320238
Reclassify TODO note regarding 'pruneUpToString <= ledgerEnd.value' check (#13183)
changelog_begin
changelog_end
2022-03-08 15:00:27 +01:00
Gary Verhaegen
961ca80b77
hunt down DAML (#13191)
Process:

- `git ls-files | xargs sed -i 's/DAML/Daml/g'`
- `git add -p`

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.

CHANGELOG_BEGIN
- Removed all traces of DAML. This may affect error messages and debug
  outputs.
CHANGELOG_END
2022-03-08 14:25:25 +01:00
Sofia Faro
85c4ea0b5c
LF spce: Make controller/observer errors fatal (#13192)
changelog_begin
changelog_end
2022-03-08 12:32:10 +00:00
pbatko-da
37c645333f
Use an error code when AkkaGrpc services get closed (#13175)
changelog_begin
Ledger API Specification: Streaming endpoints will use error code 'SERVER_IS_SHUTTING_DOWN' when the server
is being shut down, whereas before an exception without an error code was used.
Grpc status code in use remains 'UNAVAILABLE'.
changelog_end
2022-03-08 12:48:22 +01:00
Sofia Faro
190fd2487c
LF: Add interface preconditions to spec (#13173)
* LF: Add interface preconditions to spec.

Part of #11349

changelog_begin
changelog_end

* two should be True

* Incorporate remy suggestion
2022-03-08 10:11:54 +00:00
Simon Maxen
ecb5c1b7d4
Rename SqlExecutor to DbDispatcher (#13184)
changelog_begin
changelog_end

report health
2022-03-08 09:00:14 +00:00
azure-pipelines[bot]
5e8284003e
update NOTICES file (#13186)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-08 08:25:06 +00:00
Robin Krom
878754e9ac
interfaces: tests: no interfaces below 1.dev (#13179)
We add a check for the decoder that tests that implementations in
templates are only accepted in 1.dev.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-07 21:26:39 +00:00
Robin Krom
17e651c20a
release instructions: fix line numbers (#13162)
line numbers seem to have changed because of an added comment.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-07 21:48:57 +01:00
Moritz Kiefer
e44b6ef61f
Switch daml script multi-participant tests to Canton (#13171)
* Switch daml script multi-participant tests to Canton

ledger-on-memory is moving repos together with kvutils so this doesn’t
work anymore. Sandbox on X does not (yet) have multi-participant
support so this is our only option.

At a later point, we may want to switch back to sandbox on x once it
supports multiple participants.

changelog_begin
changelog_end

* more startup attempts

changelog_begin
changelog_end
2022-03-07 20:34:17 +01:00
Remy
d5471076ad
Speedy: Factorize fetch part between fetch by template and by itnerface (#13148)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-07 20:32:47 +01:00
Sergey Kisel
235254998f
Fix debug logging in ApiTransactionService (#13174)
* Fix debug logging in `ApiTransactionService`

changelog_begin
changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-07 18:29:33 +01:00