Commit Graph

8519 Commits

Author SHA1 Message Date
nicu-da
2091f59aac
Remove cats from kvutils (#11537)
CHANGELOG_BEGIN

CHANGELOG_END
2021-11-03 17:40:04 +00:00
Moritz Kiefer
b83af37077
Fix recache log statement (#11536)
turns out I cannot type

changelog_begin
changelog_end
2021-11-03 17:09:10 +00:00
Sofia Faro
776790e386
Add choice collisions in scala name collision checker (#11528)
* Add choice collisions in scala name collision chk

This brings it in line with the LF spec.
This PR also adds collisions for inherited (interface) choices.
Closes #11137.

changelog_begin
changelog_end

* scalafmt

* Apply suggestions from code review

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

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-11-03 17:01:34 +00:00
nicu-da
2efcb21f3e
Extract the setting of the time bounds on the commit context [KVL-1173] (#11516)
CHANGELOG_BEGIN

CHANGELOG_END
2021-11-03 14:39:47 +00:00
nicu-da
9bb1d6443c
[ledger-api] - Return FAILED_PRECONDITION gRPC status code for invalid deduplication duration [KVL-1170] (#11483)
CHANGELOG_BEGIN
[ledger-api] - Return FAILED_PRECONDITION gRPC status code, instead of INVALID_ARGUMENT, for an invalid command deduplication duration
CHANGELOG_END
2021-11-03 13:34:31 +00:00
Moritz Kiefer
c098d75621
Add a --log-level flag to damlc (#11514)
This also allows us to quite down our builds a bit which is nice.

changelog_begin
changelog_end
2021-11-03 14:22:57 +01:00
Moritz Kiefer
afee94858f
Bump rules_nixpkgs (#11517)
We need to make some changes to have any chance of ARM support working
and I’d rather make those on top of the latest version.

Also deletes an unused patch.

changelog_begin
changelog_end
2021-11-03 12:02:46 +01:00
azure-pipelines[bot]
d6fb67c71e
release 1.18.0-snapshot.20211102.8257.0.7391a3cd (#11521)
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.

@robin-da is in charge of this release.

Commit log:
```
7391a3cdcd Migrate language-support codegen tests to sandbox (#11508)
da76e2825b iface: check for interface implementations precond (#11494)
9e045c105b Remove a leftover from `check-protobuf-stability.sh` (#11513)
17c2fa9122 ErrorCodeDocumentationGenerator uses multiple prefixes for scanning classpaths (#11504)
a8ae4d6f9c LF: Rename GenNode to Node (#11469)
73b6f8b613 Fixed ledger-api-bench-tool random distribution in submission phase. (#11507)
92495b0662 Upgrade nixpkgs (#11490)
48afb7b5ea interface: Add inherited choice names in scala AST (#11503)
9f8b039be3 [Trigger-Service] Migrate tests to sandbox (#11501)
6bafeb03e8 DPP-662 Support archivals in bench tool (#11474)
63d855f202 Pass `damlc build` logs through daml logger (#11485)
565dfac2e5 Bump rules_nodejs to 4.4.2 (#11495)
9214956218 Enable experimental nix command (#11498)
f81d880bcc LF: drop com.daml.lf.transaction.Transaction.Transaction type alias. (#11470)
505a7f59f3 Extend debug logging around dependencies/data-dependencies (#11488)
55d35e5521 Drop TLA+ from dev-env (#11492)
3a5cb18e7f [Self-service error codes] Adapt all grpc assertions to additionally take self-service error codes [DPP-680] (#11437)
98e7461fc5 LF: ContractInstance should be a CidContainer (#11487)
9afb3b36bd Add and wire ledger-end-cache [DPP-703] (#11480)
cdd2accc26 Explicitly import Java runtime from Nix/dadew (#11411)
b5540a9c3b Evidence for contract-key testing (#11479)
78735a8d27 Less logging on //docs:generate-error-codes-json (#11486)
d8898b8c80 Check fixed choices in name collision checker (#11481)
7a0198ba52 daml-react: allow for React 17 (#11463)
c415d9d1ee Migrate trigger tests from sandbox-classic to sandbox (#11478)
f9ec12be12 Add cocreature as a codeowner of the docs (#11450)
a79cc08687 DbDispatcher handles SQL exceptions with self-service error codes [DPP-690] (#11435)
164cdbbd7d update compat versions for 1.18.0-snapshot.20211026.8179.0.e474b2d1 (#11426)
741a6e75a7 interfaces: Add list of fixed choices in TemplateImplements structure. (#11364)
79505b5474 oracle debug (#11386)
257d5365c2 Switch from sandbox to sandbox-classic in daml test-script (#11476)
e91ced54f3 KV: generate self-service error docs [KVL-1148] (#11431)
8ffd835f24 Migrate daml script tests to Sandbox next (#11472)
df65d02c4e Exclude dedup tests affected by current changes (#11471)
45beaf7aac interfaces: typecheck for precond, haskell side. (#11468)
e445fe1aee LfEngineToApi conversions do not have to deal with version. (#11414)
d3712745e2 Sandbox-classic: contracts sent to the engine do not need enrichment (#11416)
05312f1ca0 Lift out constraint tuples to synonyms in dfun contexts (#11467)
a492a6cad0 [DPP-636] Update docs on MacOS firewall issue when running tests (#11460)
5a85881cfa rotate release duty after 1.18.0-snapshot.20211026.8179.0.e474b2d1 (#11422)
1096f9144b Adds default keepalive support for postgreSQL [DPP-697] (#11453)
379996348f Fix akka-streams shutdown at LedgerConfigurationSubscriptionFromIndex (#11462)
e89da7c1ed Move non-repudiation proxy conformance tests to their own package (#11464)
b98a3ade29 interfaces: precondition, scala ast, decoder/encoder (#11452)
fd973e6b86 Drop assistant integration tests for relative/absolute DAML_PROJECT (#11461)
05505e3d03 Multiplex multiple virtual query streams through a single web socket (#10221)
3098b70624 pretty print contract IDs properly (#11359)
bb4f4c5a40 DPP-665 Make in-flight commands configurable (#11456)
bf00956143 replace OneAnd party Sets with NonEmpty Set (#11420)
570160b718 Add LoggingValue instance for Time.Timestamp (#11444)
bad50a51e9 Type reexports explicitly use 'type' namespace (#11451)
d3b9c84908 ifaces: preconditions, proto changes (#11448)
73718a22fa Mark script export tests as flaky (#11449)
22e9e6b56e Multi-observer command submission in the ledger-api-bench-tool [DPP-660] (#11413)
3eacbf9d67 Bazel cache retry on connection reset by peer (#11445)
fcc7e581cf Make stable packages dependent on supported LF versions (#11382)
6c45f099bb Remove TODO (#11446)
d8b92b7c99 Drop flaky marker from lsp-tests (#11442)
68f44325a6 Improve evidence of testing (#11428)
6126fc2230 Remove append only prefix from conformance tests [KVL-1152] (#11424)
926655d3c3 Drop daml ledger timeout tests from compat tests (#11441)
15cb84093b Switch back to binary execution logs (#11440)
ac28e615b8 Update ScalaPB to the latest version (0.11.6) (#11409)
a71a8f999e Prevent overflow in DeduplicationPeriod (#11432)
6c88e55509 Pass submission id as correlation id to error codes in Ledger API (#11381)
ba106873b9 Replace 1.14 min version conformance test by custom test (#11433)
a600f75c9f Bump bazel memory limit to 3gb (#11436)
ebe742098d fix es ingest: file too large (#11415)
d86eca0b05 Add documentation annotations to KV self-service errors [KVL-1144] (#11385)
46d31d5d48 [DPP-676][Self-service error codes] Adapt ApiConfigManagementService (#11402)
927b2378c3 Make Oracle tests exclusive (#11408)
68d7f83a5f Switch bazel exec logs to json format (#11430)
12e782b1ea ifaces: update ghc-parser (#11383)
503e39160d [Short] Typo (#11410)
3031190994 [DPP-676][Self-service error codes] Adapt request validators (#11379)
b412f7191d Fix MonotonicRecordTimeIT for pruned participants (#11423)
500e5b068e release 1.18.0-snapshot.20211026.8179.0.e474b2d1 (#11421)
d678a4046d LF: remove type parameter from ContractInstance (#11419)
```
Changelog:
```

- [@daml/react] Our React bindings now request the `react` library as a
  peer dependency, and will accept React 17 in addition to the current
  React 16. For new projects, the `create-daml-app` template now uses
  React 17.

- [Integration Kit] Document KV-specific self-service errors

[TS bindings] When using daml-react and daml-ledger, all streaming request to the query endpoint will be multiplexed through a single web socket.
[daml LF] - Add LoggingValue instance for Time.Timestamp
- [Integration Kit] - ledger-api-bench-tool can generate synthetic contracts with multiple observers
[api-test-tool] - remove AppendOnly prefix from test suites as the append-only schema is the only one left
```

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2021-11-03 11:56:30 +01:00
Moisés Ackerman
ac49d69e13
Ensure that -Werror converts parser warnings into errors (#11511)
closes #11399

changelog_begin
changelog_end
2021-11-03 11:28:52 +01:00
Samir Talwar
bda35ca234
ledger-offset: Add a conversion to ByteString. (#11491)
* ledger-offset: Add a conversion to ByteString.

I seem to be doing this a lot.

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-offset: Add a conversion from ByteString.
2021-11-03 09:54:23 +00:00
pbatko-da
8a9f15b8de
[DPP-686][Self-service error codes] Removing default error factories (#11403)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-03 09:40:19 +01:00
Moritz Kiefer
bb37eef156
Switch script & trigger tests to postgres-backed Sadbonx (#11525)
DPP-695 is gift that keeps on giving and seems to also result in
timeouts here. Just marking all of our tests that depend on Sadbonx as
flaky doesn’t seem all that helpful so switch to a postgres-backed
sandbox instead.

changelog_begin
changelog_end
2021-11-03 08:39:46 +00:00
akshayshirahatti-da
7391a3cdcd
Migrate language-support codegen tests to sandbox (#11508)
* Migrate language-support codegen tests to sandbox

CHANGELOG_BEGIN
CHANGELOG_END

* changes to create unique parties via party admin service
2021-11-02 18:11:12 +00:00
Robin Krom
da76e2825b
iface: check for interface implementations precond (#11494)
* iface: check for interface implementations precond

We change speedy to also check all preconditions defined in interface
implementations upon a create.

CHANGELOG_BEGIN
CHANGELOG_END

* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Compiler.scala

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

* format

* interfaces: lfconversion for iface preconditions

This adds interface preconditions to the interface implementations
during completion phase in the LF conversion.

CHANGELOG_BEGIN
CHANGELOG_END

* format

* rebase

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-11-02 17:27:49 +00:00
Hubert Slojewski
9e045c105b
Remove a leftover from check-protobuf-stability.sh (#11513)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 17:11:17 +00:00
tudor-da
17c2fa9122
ErrorCodeDocumentationGenerator uses multiple prefixes for scanning classpaths (#11504)
* Removed ProtoDeserializationErrors (not needed at the moment)

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 17:09:08 +00:00
Remy
a8ae4d6f9c
LF: Rename GenNode to Node (#11469)
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 16:42:16 +00:00
Kamil Bozek
73b6f8b613
Fixed ledger-api-bench-tool random distribution in submission phase. (#11507)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 17:28:12 +01:00
Moritz Kiefer
92495b0662
Upgrade nixpkgs (#11490)
* Upgrade nixpkgs

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-02 15:52:55 +01:00
Sofia Faro
48afb7b5ea
interface: Add inherited choice names in scala AST (#11503)
Also checks that they're right. There's no collision checking yet.

Part of #11137.

changelog_begin
changelog_end
2021-11-02 14:35:37 +00:00
akshayshirahatti-da
9f8b039be3
[Trigger-Service] Migrate tests to sandbox (#11501)
* Migrate trigger service tests to sandbox from sandbox-classic

CHANGELOG_BEGIN
CHANGELOG_END

* remove config override for EngineMode.Dev based on code review
2021-11-02 14:35:30 +00:00
Robert Autenrieth
6bafeb03e8
DPP-662 Support archivals in bench tool (#11474)
* Support archivals in bench tool

changelog_begin
changelog_end

* Rename archive_chance
2021-11-02 15:09:09 +01:00
Moritz Kiefer
63d855f202
Pass damlc build logs through daml logger (#11485)
* Pass `damlc build` logs through daml logger

This gives us some timings which can be useful in some
circumstances (I want timings around data-dependencies next).

I also changed the default log level to INFO. The `damlc build` output
doesn’t get any noisier from that.

Example output:

```
2021-11-01 15:25:17.16 [INFO]  [build]  []
Compiling foobar to a DAR.

2021-11-01 15:25:17.80 [INFO]  [build]  []
Created .daml/dist/foobar-0.0.1.dar
```

changelog_begin
changelog_end

* Adjust scenario service log level

changelog_begin
changelog_end

* Adjust tests

changelog_begin
changelog_end

* delete comment

changelog_begin
changelog_end
2021-11-02 12:10:09 +00:00
Moritz Kiefer
565dfac2e5
Bump rules_nodejs to 4.4.2 (#11495)
Ran into an issue on M1 and there has been some recent work around
that area. Not sure this actually fixes it but why not upgrade anyway.

changelog_begin
changelog_end
2021-11-02 12:02:30 +01:00
Moritz Kiefer
9214956218
Enable experimental nix command (#11498)
* Enable experimental nix command

Nix 2.4 got released which confusingly marked the nix command as
experimental despite it being actively worked on and being more stable
than before.

changelog_begin
changelog_end

* switch to CLI flag

changelog_begin
changelog_end

* Revert "switch to CLI flag"

This reverts commit 58d6a25d83.
2021-11-02 10:16:38 +00:00
Remy
f81d880bcc
LF: drop com.daml.lf.transaction.Transaction.Transaction type alias. (#11470)
After dropping type parameter from GenTransaction we do not
com.daml.lf.transaction.Transaction.Transaction type alias.  We use
instead directly com.daml.lf.transaction.VersionedTransaction, wich is
anyway more informative.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 10:23:17 +01:00
Moritz Kiefer
505a7f59f3
Extend debug logging around dependencies/data-dependencies (#11488)
* Extend debug logging around dependencies/data-dependencies

changelog_begin
changelog_end

* stop stealing by $s hlint

changelog_begin
changelog_end
2021-11-02 09:34:45 +01:00
Moritz Kiefer
55d35e5521
Drop TLA+ from dev-env (#11492)
Our build definitely does not depend on it. If people need it for
something else they can get it from somewhere else.

changelog_begin
changelog_end
2021-11-01 20:45:38 +00:00
tudor-da
3a5cb18e7f
[Self-service error codes] Adapt all grpc assertions to additionally take self-service error codes [DPP-680] (#11437)
* Adapt self-service error codes in conformance tests
* Assertions.assertGrpcError and assertGrpcErrorRegex assert self-service error codes based on feature descriptor
* Adapted all GRPC error assertions to expect self-service error codes as well
* Added TODO and exclusions list to conformance-test-self-service-error-codes in anticipation of some missing
self-service error codes implementation.

CHANGELOG_BEGIN
CHANGELOG_END

* Correct errorCode id assertion

* Fixed incorrect error assertion in CommandService

* Exclude entire KVCommandDeduplicationIT due to flakiness
* To be fixed in the subsequent PR
2021-11-01 20:43:47 +00:00
Remy
98e7461fc5
LF: ContractInstance should be a CidContainer (#11487)
In #11419 we drop the implicit call that convert ContractInstance in
CidContainer. Thie is used by Canton and should be restore.

Note that now ContractInstance is not polymorphic anymore, hence we
can inherite CidContainer instead of defining an implicit.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 18:58:47 +00:00
Marton Nagy
9afb3b36bd
Add and wire ledger-end-cache [DPP-703] (#11480)
* Add a simple cache implementation
* Add support for ReadOnlySqlLedgerWithMutableCache
* Add support for ReadOnlySqlLedgerWithTranslationCache
* Add support for sandbox-classic

changelog_begin
changelog_end
2021-11-01 17:28:36 +00:00
Andreas Herrmann
cdd2accc26
Explicitly import Java runtime from Nix/dadew (#11411)
* Fix rules_scala Windows launcher

* Define nixpkgs_java_configure

To generate a java_runtime based on a Nix provided JDK similar to how it
is done with the Python and CC toolchain.

changelog_begin
changelog_end

* Enable Nix provided Java runtime on Linux and MacOS

* Define dadew_java_configure

To import a JDK and JAVA_HOME from dadew similar to
nixpkgs_java_configure.

* Enable dadew Java runtime on Windows

* Remove now unused java_home_runtime

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-01 18:18:45 +01:00
nickchapman-da
b5540a9c3b
Evidence for contract-key testing (#11479)
* Split contract-key tests from engine tests, and mark for evidence.

CHANGELOG_BEGIN
CHANGELOG_END

* remove contract key tests from their original location

* evidence for unique/non-unique contract keys
2021-11-01 16:38:26 +00:00
tudor-da
78735a8d27
Less logging on //docs:generate-error-codes-json (#11486)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 16:33:27 +00:00
Sofia Faro
d8898b8c80
Check fixed choices in name collision checker (#11481)
* Check fixed choices in name collision checker

This is a follow up to #11364. This PR checks that the list of inherited
choice names is correct in the type checker, and moves the "fixed choice name
collision" check into the name collision checker using this data.

Haskell side only for now. Part of #11137.

changelog_begin
changelog_end

* Update compiler/daml-lf-tools/src/DA/Daml/LF/TypeChecker/Check.hs

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-11-01 14:52:44 +00:00
Gary Verhaegen
7a0198ba52
daml-react: allow for React 17 (#11463)
See #11358.

CHANGELOG_BEGIN

- [@daml/react] Our React bindings now request the `react` library as a
  peer dependency, and will accept React 17 in addition to the current
  React 16. For new projects, the `create-daml-app` template now uses
  React 17.

CHANGELOG_END
2021-11-01 15:29:42 +01:00
Moritz Kiefer
c415d9d1ee
Migrate trigger tests from sandbox-classic to sandbox (#11478)
Deliberately does not include the tests for the trigger service.

changelog_begin
changelog_end
2021-11-01 14:22:51 +00:00
Moritz Kiefer
f9ec12be12
Add cocreature as a codeowner of the docs (#11450)
* Add cocreature as a codeowner of the docs

Currently we have no active codeowner of the docs which is an
unfortunate situation since PRs just end up sitting until someone
happens to find it or someone else asks for a ping.

Not necessarily saying I’m the right one to review all docs but I can
at least make sure PRs advance.

changelog_begin
changelog_end

* Update CODEOWNERS

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update CODEOWNERS

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2021-11-01 13:41:04 +00:00
tudor-da
a79cc08687
DbDispatcher handles SQL exceptions with self-service error codes [DPP-690] (#11435)
* DbDispatcher handles transient and non-transient SQL exceptions with specific error codes

CHANGELOG_BEGIN
CHANGELOG_END

* Handle retries when verifying ledger id

* Addressed Pawel's comments

* Logging clean-up and small refactoring

* Exhaustive match against Oracle and PSQL exceptions
2021-11-01 13:35:33 +01:00
azure-pipelines[bot]
164cdbbd7d
update compat versions for 1.18.0-snapshot.20211026.8179.0.e474b2d1 (#11426)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-01 12:59:45 +01:00
Sofia Faro
741a6e75a7
interfaces: Add list of fixed choices in TemplateImplements structure. (#11364)
* interfaces: Add fixed choices in TemplateImplements

To make template choice collision checks local.

changelog_begin
changelog_end

* LF completer

* lint

* scary non-shadowing

* improve comment

* change field name
2021-11-01 11:51:51 +00:00
Gary Verhaegen
79505b5474
oracle debug (#11386)
Collect Oracle logs for further debugging.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 12:19:01 +01:00
Moritz Kiefer
257d5365c2
Switch from sandbox to sandbox-classic in daml test-script (#11476)
* Switch from sandbox to sandbox-classic in daml test-script

changelog_begin
changelog_end

* apparently sadbonx next also has ce and ee

changelog_begin
changelog_end
2021-11-01 10:42:46 +00:00
fabiotudone-da
e91ced54f3
KV: generate self-service error docs [KVL-1148] (#11431)
* Differentiate committer deduplication error code

* Let error docs generator tolerate `deprecated`

* Generate error documentation for KV

CHANGELOG_BEGIN
- [Integration Kit] Document KV-specific self-service errors
CHANGELOG_END

* Cleanup ErrorCodeDocumentationGenerator

* Add test case for deprecated errors

* Improve ErrorCodeDocumentationGenerator.getAnnotations

* Fix test

* Factor annotationTypeName

* Fix formatting

* Use case class for annotations and deal with missing ones in convertToDocItem

* Improve cause wording for KV duplicate command self-service error

* Simplify error message

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2021-11-01 10:13:06 +00:00
Moritz Kiefer
8ffd835f24
Migrate daml script tests to Sandbox next (#11472)
* Migrate daml script tests to Sandbox next

This does not yet drop all dependencies from daml script. In
particular `daml test-script` still depends on Sandbox classic. Will
tackle that in a separate PR.

changelog_begin
changelog_end

* Speedup maxInboundMessageSize tests

changelog_begin
changelog_end
2021-11-01 09:08:32 +00:00
nicu-da
df65d02c4e
Exclude dedup tests affected by current changes (#11471)
CHANGELOG_BEGIN

CHANGELOG_END
2021-10-29 21:28:56 +02:00
Robin Krom
45beaf7aac
interfaces: typecheck for precond, haskell side. (#11468)
This adds the typecheck for the interface precondition on the Haskell
side.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-29 14:36:32 +00:00
Remy
e445fe1aee
LfEngineToApi conversions do not have to deal with version. (#11414)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-29 15:57:09 +02:00
Remy
d3712745e2
Sandbox-classic: contracts sent to the engine do not need enrichment (#11416)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-29 15:56:36 +02:00
Moisés Ackerman
05312f1ca0
Lift out constraint tuples to synonyms in dfun contexts (#11467)
This is because otherwise GHC expands them out as regular constraints.

Closes #11455
Similar to #9663

changelog_begin
changelog_end
2021-10-29 15:52:46 +02:00