Commit Graph

9744 Commits

Author SHA1 Message Date
pbatko-da
e0965709fe
[Error codes] Remove .asGrpcStatusFromContext and .asGrpcErrorFromContext from BaseError trait [DPP-606] (#13262)
changelog_begin
changelog_end
2022-03-16 09:30:07 +01:00
Stephen Compall
0b5ad7a7bd
interface support in the interface library (#13154)
This adds the presence of interface names, as well as lists of choices
and their argument/return types for each interface.

It also changes the semantics of DefTemplate and EnvironmentInterface:
each may contain "unresolved choices", which are the choices inherited
from interfaces for each implementing template;
EnvironmentInterface#resolveChoices will copy the full type information
as a concrete choice for each implementing template, which should be
much simpler for codegen and json-api.

A type generator should take account of the astInterfaces as well as
typeDecls in EnvironmentInterface; interfaces aren't included in
typeDecls because where I is an interface only ContractId I is
serializable.

* Ast.DataInterface is empty, just use the interfaces map directly
* port json-api for interface API changes; does not solve #12689
* port Scala codegen for interface API changes; does not add support
* port Java codegen for interface API changes; does not solve #11350

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 19:34:54 +00:00
Stefano Baghino
739173bf84
Remove references to missing appender (#13294)
changelog_begin
[Trigger Service] Spurious logging warnings will not be printed when running `daml trigger-service`
[Oauth2 Middleware] Spurious logging warnings will not be printed when running `daml oauth2-middleware`
changelog_end

Removed references to a missing `stderr-appender` in several configuration file.

This removes warnings when running `daml trigger-service` and `daml oauth2-middleware`.

This will also remove those same warnings from several tests (HTTP JSON API and Trigger Service).
2022-03-15 18:02:02 +01:00
Gary Verhaegen
2dc42a3fc2
release instructions typos (#13297)
Thanks @S11001001 for reporting.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 16:12:18 +00:00
Stefano Baghino
0ffb88a6ca
Add logback.xml file in the distributable JAR for the Trigger Service (#13295)
Fixes #13042

changelog_begin
[Trigger Service] Debug logging is now hidden by default. See #13042
changelog_end

Summary of changes:
- remove unused `exports_files`
- refactor trigger-service-binary rules in a single comprehension
- add the `logback.xml` file in the JAR root

Tested manually: listed the contents of the output of `bazel build //triggers/service:trigger-service-binary-ce_deploy.jar` and `bazel build //triggers/service:trigger-service-binary-ee_deploy.jar` before and after the fix, observed that the only difference is the `logback.xml` file in the JAR root; added a debug logger call and ran both JARs before and after the fix, observed that after the fix the debug logging line is no longer printed.
2022-03-15 16:03:01 +00:00
azure-pipelines[bot]
54847efb20
rotate release duty after 2022-03-09 (#13213)
@stewSquared is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-15 16:19:13 +01:00
Stephen Compall
153a5e6bcc
parallelize long-running custom/user token tests (#13290)
Saves about 90 seconds in test wallclock time. Other tests considered
either ran too short to bother splitting, or were Oracle and thus won't
affect the main run at all.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 10:59:36 -04:00
Sofia Faro
1feb4d25eb
Drop typerep argument from ExerciseInterface. (#13284)
* ifaces: Remove typerep arg from UExerciseInterface

changelog_begin
changelog_end

* Drop typerep argument in protobuf and haskell ast

changelog_begin
changelog_end

* scalafmt

* fix ExprParser

* fix PhaseOneTest

* fix validation test

* update evidencing security
2022-03-15 13:53:06 +00:00
Gary Verhaegen
da20fae6cb
retry 1.18.2 snapshot (#13293)
Something went wrong with Maven but no idea why. I'm hoping it was a
transient issue on their side.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 13:45:35 +01:00
Robin Krom
e2c13694f2
daml-lf:encoder/decoder for requires and tests (#13272)
This adds the parser for interface requires plus tests for it.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 12:56:49 +01:00
pbatko-da
c7266dd60c
Remove ErrorCauseExport + some file renames [DPP-606] (#13259)
changelog_begin
changelog_end
2022-03-15 12:51:32 +01:00
azure-pipelines[bot]
ee1177df07
update NOTICES file (#13291)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-15 12:28:57 +01:00
Gary Verhaegen
154dafb804
merge release instructions (#13292)
Turns out splitting the file (#13160) was not such a good idea.

Also tweak the text a little bit, hopefully making it clearer.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 11:27:36 +01:00
Sergey Kisel
a4f4300502
Naming and logging improvements [DPP-956] (#13270)
* Naming and logging improvements [DPP-956]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 09:40:39 +01:00
Stephen Compall
2056f0a5cf
nonempty-cats refactoring (#13282)
* move ImplicitPreference to scala-utils
  - test it
  - use it instead of tags for json-api testing
  - fix a somewhat nonsensical type therein
* several new tests for the NonEmpty Foldable instances

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 20:48:41 -04:00
Marton Nagy
3a6b8071d2
Improve logging for AkkaExecutionSequencer (#13286)
changelog_begin
changelog_end
2022-03-14 21:42:43 +00:00
tudor-da
b081a469dd
Enrich LoggingContext Commands extractor with submission id (#13280)
changelog_begin
changelog_end
2022-03-14 18:37:31 +00:00
pbatko-da
ee6a5f9e0e
Handle misc error codes todos. [DPP-606] (#13248)
changelog_begin
changelog_end
2022-03-14 17:16:31 +01:00
mziolekda
a8d55727c5
release 1.18.2-snapshot.20220310.8437.0.5221a5d1 (#13273)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 17:10:55 +01:00
Stefano Baghino
24d3da70e8
Do not point at a milestone from the HTTP JSON API docs (#13281)
We recently started to use a project board to prioritize our work.

As such, we will soon remove our milestones and move relevant tickets
to the board after ensuring that all items that belong to us are
tracked by the appropriate team label (`team/app-runtime`).

changelog_begin
changelog_end
2022-03-14 16:31:35 +01:00
Stefano Baghino
e1d677c3ef
Return a wrapper GetUserResponse type for the Java bindings (#13276)
Fixes https://github.com/digital-asset/daml/issues/13274

changelog_begin
[Java bindings] The `UserManagementClient.getUser` methods have been changed to return a
custom wrapper type `GetUserResponse` instead of a `User` directly. If you were already
using these methods, you can make your code work as before by adding a call to the
`getUser` method defined on the `GetUserResponse` type you now get back. You can read
more about this issue here: https://github.com/digital-asset/daml/issues/13274
changelog_end
2022-03-14 16:31:17 +01:00
Stephen Compall
2ce4223b97
fix maven_coordinates for nonempty-cats (#13278)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 15:05:50 +00:00
Stefano Baghino
4b864854a8
Improve description of the HTTP JSON API in the Ledger API docs (#13271)
Improve description of the HTTP JSON API in the Ledger API docs

changelog_begin
changelog_end

Fixes #13029
2022-03-14 14:59:20 +00:00
pbatko-da
e69343dfb3
[Error codes] Reorganize error groups file structure for better readability and easier modification. [DPP-606] (#13263)
changelog_begin
changelog_end
2022-03-14 15:13:26 +01:00
Robin Krom
492e5fdd07
ifaces:tests: extend encoder tests, fix bugs (#13253)
This extends the Scala encoder tests to include interface definitions
and interface implementatioins. Some bugs in the encoder and ast
rewriter are fixed.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 12:55:27 +01:00
Sofia Faro
83bdd983da
interfaces: Mark interface functions as 1.dev only in docs (#13268)
* iface: Mark functions as 1.dev only in docs

changelog_begin
changelog_end

* Update compiler/damlc/daml-stdlib-src/DA/Internal/Interface.daml

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

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-03-14 11:47:14 +00:00
pbatko-da
92e3e9e2df
Add unit tests for ErrorCode [DPP-799] (#13236)
changelog_begin
changelog_end
2022-03-14 12:38:23 +01:00
pbatko-da
a8c0984d9b
[User management] Make use of UM error group in the docs (#13260)
changelog_begin
changelog_end
2022-03-14 12:09:48 +01:00
pbatko-da
a27fa0c95a
[Error codes] Move and test logging value string serializer [DPP-606] (#13261)
changelog_begin
changelog_end
2022-03-14 12:09:10 +01:00
Sofia Faro
930bceeea8
Assign codeowner for /compiler/ and related (#13255)
Also add @ray-roestenburg-da to the codeowners for daml-assistant

Just following up on this:
https://github.com/digital-asset/daml/pull/13246/files#r823623864

changelog_begin
changelog_end
2022-03-14 09:19:48 +00:00
Kamil Bozek
ab6e085f6e
Move ExecutionContext to the CommandExecutor implementing classes [DPP-945] (#13153)
* Move ExecutionContext to the CommandExecutor implementing classes from method arguments

CHANGELOG_BEGIN
CHANGELOG_END

* Added information about the CPU-intensive computations executed by an ExecutionContext
2022-03-11 18:45:10 +01:00
pbatko-da
f210ee933c
Add missing context in PackageServiceError (#13258)
changelog_begin
changelog_end
2022-03-11 13:20:59 +01:00
nickchapman-da
e1030365f0
Fix the ANF transform for case-alternatives to be stack-stafe. (#13251)
changelog_begin
changelog_end
2022-03-10 17:33:28 +00:00
Stephen Compall
c9b5750968
NonEmpty utilities, new nonempty-cats library (#13115)
New instances and collection methods, many of which included
as-is from @andreaslochbihler-da's experiments downstream.

* mk, a version of apply with special inference
* new names for the conversion functions suggested by
  @andreaslochbihler-da
* groupBy1, zipWithIndex, reduceLeft, last1, distinct, toVector1
* a derived Semigroup instance
* a more explicit subtyping utility to specify implicit preference than
  what we get with shapeless @@
* from method, alias for unapply
* cats functorial, foldable instances in the new nonempty-cats library
* new NonEmpty utilities

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Lochbihler <36634420+andreaslochbihler-da@users.noreply.github.com>
2022-03-10 16:30:42 +00:00
Stephen Compall
e73963c88d
restrict SC's codeowners to desired notifications (#13252)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 15:20:31 +00:00
Remy
3e6642f957
LF: Test that FetchInterface load unknown module (#13244)
The issue was indirectly fixed by #13080.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 16:16:38 +01:00
Gary Verhaegen
1af8934be6
remove Samir's accesses (#13247)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 13:55:10 +00:00
pbatko-da
b663a1c1ec
WriteParticipantPruningService propagates rich error codes on prune failure [DPP-861] (#13238)
changelog_begin
changelog_end
2022-03-10 14:48:28 +01:00
pbatko-da
d891a9a9c2
[Error codes] Use scala.deprecated instead of a custom annotation [DPP-776] (#13163)
changelog_begin
changelog_end
2022-03-10 14:10:52 +01:00
Moritz Kiefer
78112f17cb
Disown everything (#13246)
* Disown everything

changelog_begin
changelog_end

* Update CODEOWNERS

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

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-03-10 12:31:00 +00:00
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