Commit Graph

8033 Commits

Author SHA1 Message Date
azure-pipelines[bot]
a932c9ff0f
update NOTICES file (#11188)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-11 09:09:17 +02:00
Stefano Baghino
12598df78f
Release SDK 1.17.1 (#11182)
changelog_begin
changelog_end
2021-10-11 09:04:21 +02:00
Artúr Poór
0f265fd715
[Docs] Improve manual-download.html phrasing. (#11084)
Emphasize that SDK version 1.4.0 was the latest at the time
of writing instructions, and is outdated now.

changelog_begin
changelog_end
2021-10-11 08:40:50 +02:00
nicu-da
9b2a8c7eb5
Enable top level statement blank lines scalafmt rule, which adds a blank line after imports (#11180)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-10 23:16:48 -07:00
Sofia Faro
7e2edbdfaf
interface fixed choices: Haskell Typechecker (#11177)
Part of #11137

changelog_begin
changelog_end
2021-10-08 15:42:29 +01:00
Sofia Faro
c876bd82a8
interfaces: Add a test for runtime errors (#11179)
changelog_begin
changelog_end
2021-10-08 15:27:24 +01:00
nicu-da
ce24fc8679
Update scalafmt to 3.0.6 (#11178)
* Update scalafmt to 3.0.6

CHANGELOG_BEGIN

CHANGELOG_END

* Disable just docstring wrap for the new scalafmt version
2021-10-08 13:36:36 +00:00
Samir Talwar
e15487422d
kvutils: Add a SubmissionInfo parameter to the replaying read service. [KVL-1082] (#11169)
* kvutils: Tidy up LogAppendingReadServiceFactorySpec.

* kvutils: Add a `SubmissionInfo` parameter to the replaying read service.

Required for other KV ledger implementations.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Rename some constants in LogAppendingReadServiceFactorySpec.
2021-10-08 13:48:24 +02:00
nicu-da
5abedac9ab
Check the commit message to skip the compatibility check [KVL-1111] (#11162)
* Check the commit message to skip the compatibility check

CHANGELOG_BEGIN

CHANGELOG_END

* Use git trailers to skip the check conditionally
2021-10-08 02:18:36 -07:00
Samir Talwar
d3810af47e
CI: Upgrade Nix. (#11173)
Inspired by seeing `curl` TLS errors in a different repository's CI.

I don't know if this will help, but it's worth a try. Note that the
domain name has changed.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-08 09:13:50 +00:00
Remy
4336184a79
LF: Add interface fixed choices in scala AST and type checker (#11146)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-08 08:59:26 +02:00
Gary Verhaegen
08b9f82614
fix templates build for Windows (#11165)
On Windows, we run without a sandbox, which means that the `gsg-trigger`
folder might already exist and be patched, because we work directly in
the source tree.

This changes the script to work with temp dirs instead.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 18:25:05 +02:00
Gary Verhaegen
fcd4549569
test release rotation: factor out selection (#11161)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 12:46:55 +00:00
Remy
dd233ef155
LF: clean daml-lf/language module (#11152)
- enable NonUnitStatements, and find a useless statement.

- add missing `final`s,

- replace `{ ... }` by `( ... )` for one statement anonymous function

- drop useless `new` for case class.

- replace `sealed class X { ... object Y extend X` by
  `class X private[Z] { ... val Y = new X` to avoid unecessary class
  alocation.

- move invariant check inside the body of some case class instead of
  the companion object.

- other cosmetic changes.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 13:56:36 +02:00
Hubert Slojewski
15712a2a33
Add a missing test and documentation for the gRPC error factory [KVL-1119] (#11106)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 11:10:48 +00:00
Sofia Faro
53c76d47c3
interface fixed choices: Haskell AST (#11160)
* interface fixed choices: Haskell AST

Part of #11137

changelog_begin
changelog_end

* Make intParam strict
2021-10-07 10:46:50 +00:00
azure-pipelines[bot]
4cb46f2742
update compat versions for 1.17.1-snapshot.20211006.7853.0.e05be365 (#11153)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-07 12:18:56 +02:00
nicu-da
a3b90499fd
Check proto compatiblity with target head for PRs [KVL-1110] (#11123)
* Add the ability to check protobuf compatibility with the branch head alongside the latest release tag.

CHANGELOG_BEGIN
CI - add check to PR for protobuf breaking changes against the target branch head
CHANGELOG_END
2021-10-07 08:55:38 +00:00
Hubert Slojewski
b9e8eb81e8
daml-script: Switch integration-tests to the append-only-schema (#11149)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 10:18:29 +02:00
Stefano Baghino
265e36255c
Add a notice to the release testing rotation file (#11142)
Reminds people adding new users to the rotation that they should also
be added to DACH-NY/daml-language-ad-hoc to have a box in the cloud
for Windows testing.

Adds the possibility of adding comments at the beginning of the rotation file.

changelog_begin
changelog_end
2021-10-06 21:08:11 +00:00
fabiotudone-da
4295ecd1d0
Fix compatibility exclusions introduced by #11095 [KVL-1083] (#11141)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-06 21:58:33 +02:00
Gary Verhaegen
4f805c4013
1.17.1 RC2 (#11148)
RC1 did not include #11102.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-06 20:04:17 +02:00
azure-pipelines[bot]
1e9089552f
rotate release duty after 1.18.0-snapshot.20211006.8003.0.cfcdc13c (#11135)
@adriaanm-da is taking care of 1.18.0-snapshot.20211006.8003.0.cfcdc13c (#11134), so they get pushed back to the end of the line.

Please do not merge this before #11134.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-06 17:13:01 +02:00
Sofia Faro
7f6c8608bd
Interface fixed choices: protobuf (#11139)
Adds protobuf for fixed choices. ASTs left for later.

changelog_begin
changelog_end
2021-10-06 16:01:41 +01:00
tudor-da
325c5ac303
Release RC for SDK 1.17.1 (#11138)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-06 14:58:36 +02:00
nickchapman-da
1522c84bae
Unit tests for FailedAuthorization (#11082)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-06 12:25:42 +01:00
Andreas Herrmann
51873ff344
Support empty party display name in scenario service (#11131)
* Add regression test for #11099

https://github.com/digital-asset/daml/issues/11099

* Support empty party display name in scenario service

changelog_begin
- [Daml Studio] Scripts no longer fail when allocating a party with an
  empty display name. See https://github.com/digital-asset/daml/issues/11099.
changelog_end

* fmt

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-10-06 10:28:11 +00:00
Gary Verhaegen
4cb521b406
don't remove Standard-Change label on failed releases (#11126)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-06 12:12:11 +02:00
azure-pipelines[bot]
261d4db656
update NOTICES file (#11136)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-06 11:24:17 +02:00
azure-pipelines[bot]
deddfd7ec8
release 1.18.0-snapshot.20211006.8003.0.cfcdc13c (#11134)
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.

@adriaanm-da is in charge of this release.

Commit log:
```
cfcdc13c6e Add deprecation output for sandbox classic (#11119)
ac5c52dbe4 DPP-609 Add StorageBackendTestsDeduplication (#11088)
55af7ad729 HttpServiceTestFixture provides a sandbox-classic ledger used for performance tests (#11128)
63ab3f3e50 Fix change ID references in services.rst (#11130)
31db15d555 Port error code changes (#11113)
9fd8182bbb move reusable functions from ContractsFetch to new fetch-contracts library (#11057)
c2084f6e14 Try and improve the explanation of compatibility test exclusions (#11114)
4df9b7c8f1 Rename command completion dedup time to duration in participant code [KVL-1057] (#10901)
11bc22d085 LF: builtins to create, signatory, and obersver on interface payload. (#11120)
d4cb1f945e KV ledgers: disable participant side command de-duplication [KVL-1083] (#11095)
b9a5a83175 Minor: fix trace logging in `TimeBasedWriteSetSelector` (#11117)
018e90854c [JSON-API] Make key_hash idx non unique  (#11102)
429f43731a Remove HA indexer integration test on H2 (#11104)
9cffa1faf6 LF: check LF transaction protobuf aginst local snapshots (#11064)
d7ee278518 Optional table prefix for trigger service  (#11047)
268b2d3da0 Command deduplication - test case that uses CommandService and CommandSubmissionService [KVL-1106] (#11098)
fac05f657b bypass value enrichment for the performance test (#11112)
4860271a53 Port file was not written to... where? (#11108)
a8d703b996 Increase akka server request-timeout for HttpServiceIntegrationTests (#11109)
37d94aaef6 Add unit for daily performance tests (#11107)
eb4ac8a397 Increase timeouts for resetting database (#11103)
db75f7da0f interface methods: Scala Typechecker (#11097)
d3e6f16c61 [JSON-API] Migrating tests to use sandbox next (#11034)
ffc8d6894f Data dependencies deserialize imports (#11037)
4b31bf088f update compat versions for 1.17.0 (#11075)
9fd6326ae7 interfaces: consuming/non-consuming iface choices (#11009)
229ce4776f Data dependencies serialize imports (#11038)
5d9ec65cc6 Add test case for parallel command deduplication using mixed clients [KVL-1090] (#11093)
d64d965230 kvutils: Print state updates before and after normalization. (#11096)
be216aa872 update NOTICES file (#11089)
517e866df5 Extract common code for command dedup conformance tests [KVL-1090] (#11092)
7a4963b43d add `--max-inbound-message-size` flag to `daml ledger export` (#11087)
26d10b267d Drop NodeId type parameter (#10921)
3cbd9229aa More NonEmpty functions (#10930)
bcd468625c interface methods: Speedy (#11076)
85adaab550 [DPP-417][DPP-595] Error codes switching - follow-up (#11074)
d7b280b60c Remove debug print in daml-lf/interpreter build (#11091)
1ed6428980 LF: move archive snapshots in a separate directory (#11081)
5e424f8d1c Command dedup conformance suites readme (#11051)
8290347f74 DPP-496 HA indexer integration test (#11033)
735c3090a3 Switch from InputStream to Byte Array at the binary content JDBC transport (#11072)
6ae3afa8fb fix perf reporting (#11073)
bf801a6e1b Fix SimpleDeduplicationBasic when participant deduplication is disabled (#11083)
62234dc763 [Short] Remove unused code (#11079)
c1d1521a14 interface methods: Scala AST (#11070)
7dd9c2d3f0 Remove expectations for internal failures from parallel command dedup tests (#11061)
51125991e5 Explicit discard in daml-lf/interpreter (#11067)
554b36c817 rotate release duty after 1.18.0-snapshot.20210928.7948.0.b4d00317 (#11059)
d156964f0c Release SDK 1.17.0 (#11062)
6d8cf7089c Handle interface methods in LF conversion (#11054)
87ecf1fe63 daml-ledger: better errors for non-json responses. (#11055)
ec2d26f31f [Divulgence pruning] Fixes divulgence pruning offset update query (#11046)
f13c6d61ec release 1.18.0-snapshot.20210928.7948.0.b4d00317 (#11058)
d1805a3000 More dependabot fun (#11063)
07b273aab5 update NOTICES file (#11060)
```
Changelog:
```

- [JSON-API] make key_hash indexes non-unique, this fixes a bug where a duplicate key conflict was raised on the query store when the same contract was being witnessed twice by two separate parties

* [Trigger Service] Enable the new `tablePrefix` setting in the `--jdbc`
  flag to add a prefix to all tables used by the trigger service to
  avoid collisions with other components using the same db-schema.
* [Trigger Service] Enable the new ``--allow-existing-schema`` flag to
  initialize the trigger service on a database with a pre-existing
  schema.

- [Daml Assistant] Add support for `--max-inbound-message-size` flag to the Ledger Export tool.

Add cons, find, delete and deleteBy functions to NonEmpty module.
```

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-06 11:00:10 +02:00
Robert Autenrieth
cfcdc13c6e
Add deprecation output for sandbox classic (#11119)
changelog_begin
changelog_end
2021-10-06 00:04:18 +02:00
Robert Autenrieth
ac5c52dbe4
DPP-609 Add StorageBackendTestsDeduplication (#11088)
* Add StorageBackendTestsDeduplication

changelog_begin
changelog_end

* Check written deduplication time
2021-10-06 00:03:01 +02:00
akshayshirahatti-da
55af7ad729
HttpServiceTestFixture provides a sandbox-classic ledger used for performance tests (#11128)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-05 21:10:09 +01:00
fabiotudone-da
63ab3f3e50
Fix change ID references in services.rst (#11130)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-05 17:44:49 +00:00
tudor-da
31db15d555
Port error code changes (#11113)
* Port changes from Canton PR #7365

CHANGELOG_BEGIN
CHANGELOG_END

* Ported ErrorResource changes

* Ported constant use change

* Fix compilation issues
* Missing dependency on ledger-grpc
* Compilation issue SI-4440 in RejectionGenerators

* Re-review
2021-10-05 16:33:24 +00:00
Stephen Compall
9fd8182bbb
move reusable functions from ContractsFetch to new fetch-contracts library (#11057)
* split akka-streams and doobie utils from ContractsFetch to new fetch-contracts library

* move most stream components from ContractsFetch to new library

* fix packages

* make the fetchcontracts domain model work

* move transactionFilter to fetchcontracts

* lots of unused imports

* start incorporating fetch-contracts in http-json

* move toTerminates

* more unused imports; http-json compiles

* more fetch-contracts dep

* bring back HasTemplateId[ActiveContract]; integration tests compile

* whole ledger-service tree compiles

* fix oracle missing dep

* scoping some new library identifiers

* remove apiIdentifier aliases

* comment on Aliases

* remove toTerminates shim

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* unused bazel imports

* remove already-addressed TODO

- suggested by @akshayshirahatti-da; thanks
2021-10-05 15:52:18 +00:00
fabiotudone-da
c2084f6e14
Try and improve the explanation of compatibility test exclusions (#11114)
* Try and improve the explanation of compatibility test exclusions

CHANGELOG_BEGIN
CHANGELOG_END

* Fix scenario description

* Attempt #2 at trying and improving the explanation of compatibility test exclusions
2021-10-05 16:55:21 +02:00
fabiotudone-da
4df9b7c8f1
Rename command completion dedup time to duration in participant code [KVL-1057] (#10901)
* Rename Completion.deduplication_time to deduplication_duration

CHANGELOG_BEGIN
CHANGELOG_END

* Breaking protobuf change: regenerate `buf` image

Breaking-Proto: true

* Create a new grpc exception for each duplicate result [KVL-1099] (#10887)

* Create a new grpc exception for each duplicate result

The metadata in the exception is not thread safe, and when being converted into server headers netty.Utils.convertServerHeaders, it calls discardAll which mutates the metadata. Because this was reused for all duplicate exceptions then we got corrupted metadata.

CHANGELOG_BEGIN

CHANGELOG_END

* Do not call duplicate command exception twice

* Chore slow migration error removal (#10886)

* Avoid slow-progress timeout StoppedProgressing to avoid flakiness

CHANGELOG_BEGIN
CHANGELOG_END

* Make schema migration retries and backoff configurable

* Review feedback - use RetryStrategy.constant instead

* Remove unused tailrec import

* Simplifications and runF by Marton

* Rename config options from retry to attempt and default to 30 attempts

* Fix Parallel Indexer initialization issue [DPP-542] (#10889)

RCA: if at parallel indexer initialization some error happening, then a promise never completes, which causes an initialization future never complete
Expected: failure should be propagated, and recovering indexer should retry 10 seconds later
Actual: failure not propagated, a zombie future freezes initialization, preventing retries
Impact: this is a corner case - if no problems at indexer initialization, the issues is not surfacing

* Extracts critical logic into helper function initializeHandle
* Adds unit tests for initializeHandle
* Fixes issue by completing the promise in all cases

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-api-test-tool - Add conformance test for parallel command deduplication using CommandSubmissionService [KVL-1099] (#10869)

* Extract deduplication "features" into a configuration to be used around the tests.
Better naming for assertions that support sync and async deduplication

CHANGELOG_BEGIN

CHANGELOG_END

* Fix broken test and use consistency for tests

* ledger-api-test-tool - Add conformance test for parallel command deduplication

CHANGELOG_BEGIN
CHANGELOG_END

* Add import for 2.12 compat

* Add silencer plugin

* Split parallel command deduplication scenario into it's own test suite

* Add the parallel command deduplication test to append only ledgers

* Run parallel command deduplication tests for append only ledgers

* Apply suggestions from code review

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

* Code review renames

* Add compat import

* Run the test concurrently

* Further rename completions' `deduplication_time` to `*_duration` in participant's codebase

CHANGELOG_BEGIN
CHANGELOG_END

* Re-compute sha256s of migrations

* Fix expected error message

* Improve consistency of "deduplication time" Vs. "deduplication duration" references

* Revert Oracle schema whitespace change

Co-authored-by: Gerolf Seitz <gerolf.seitz@daml.com>
Co-authored-by: nicu-da <nicu.reut@digitalasset.com>
Co-authored-by: Oliver Seeliger <46452754+oliverse-da@users.noreply.github.com>
Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
2021-10-05 12:04:27 +00:00
Remy
11bc22d085
LF: builtins to create, signatory, and obersver on interface payload. (#11120)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-05 11:59:07 +00:00
fabiotudone-da
d4cb1f945e
KV ledgers: disable participant side command de-duplication [KVL-1083] (#11095)
* Extract common code for command dedup conformance tests

CHANGELOG_BEGIN

CHANGELOG_END

* Revert changes for parallel tests

* Fix compile warnings

* Disable participant deduplication for KV

CHANGELOG_BEGIN
CHANGELOG_END

* Always call submitRequestAndAssertDeduplication with parties

* Fix party in CommandDeduplicationBase

* Don't test KV-based command deduplication with static time as it's broken

* Don't disable participant-side command deduplication for sandbox-next on static time

* Revert "Don't test KV-based command deduplication with static time as it's broken"

This reverts commit 3dac41aa

* Add missing dependency

* Don't cross-test this ledger API test tool with existing versions

* Add the current PR to the list of PRs that resulted in exclusions

* Apply @garyverhaegen-da's suggestion for compatibility exclusions

Co-authored-by: Nicu Reut <nicu.reut@digitalasset.com>
2021-10-05 13:31:53 +02:00
Hubert Slojewski
b9a5a83175
Minor: fix trace logging in TimeBasedWriteSetSelector (#11117)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-05 08:30:22 +02:00
Victor Peter Rouven Müller
018e90854c
[JSON-API] Make key_hash idx non unique (#11102)
* Add failing test that covers the bug

* Fix on conflict error for inserts into the contracts table

changelog_begin

- [JSON-API] make key_hash indexes non-unique, this fixes a bug where a duplicate key conflict was raised on the query store when the same contract was being witnessed twice by two separate parties

changelog_end

* move test to parent so as to test oracle query store

* make key_hash indexes non-unique

* use recordFromFields

Co-authored-by: Akshay <akshay.shirahatti@digitalasset.com>
2021-10-05 06:28:04 +01:00
Robert Autenrieth
429f43731a
Remove HA indexer integration test on H2 (#11104)
This test was supposed to always fail, but sometimes it passes

changelog_begin
changelog_end
2021-10-04 22:52:54 +02:00
Remy
9cffa1faf6
LF: check LF transaction protobuf aginst local snapshots (#11064)
instead of last stable branch.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 20:10:41 +02:00
Andreas Herrmann
d7ee278518
Optional table prefix for trigger service (#11047)
* Fix typo postgres --> oracle

* Move tablePrefix into base jdbcConfig

* Add table.prefix in trigger service migrations

* Add tablePrefix to trigger service db table names

changelog_begin
* [Trigger Service] Enable the new `tablePrefix` setting in the `--jdbc`
  flag to add a prefix to all tables used by the trigger service to
  avoid collisions with other components using the same db-schema.
changelog_end

* Add tablePrefix config test for trigger service

* Fix Oracle test

* Allow existing schema in trigger service

CHANGELOG_BEGIN
* [Trigger Service] Enable the new ``--allow-existing-schema`` flag to
  initialize the trigger service on a database with a pre-existing
  schema.
CHANGELOG_END

* Don't ignore CLI flag value

* Update triggers/service/src/main/scala/com/digitalasset/daml/lf/engine/trigger/dao/DbTriggerDao.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Use fragment interpolation

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-10-04 17:02:36 +00:00
nicu-da
268b2d3da0
Command deduplication - test case that uses CommandService and CommandSubmissionService [KVL-1106] (#11098)
Add test case for command deduplication which uses both the CommandService and the CommandSubmissionService

CHANGELOG_BEGIN

CHANGELOG_END

* Run mixed CommandService/CommandSubmissionService test for all the possible combinations of calls
2021-10-04 09:42:07 -07:00
nickchapman-da
fac05f657b
bypass value enrichment for the performance test (#11112)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 16:22:48 +01:00
Stefano Baghino
4860271a53
Port file was not written to... where? (#11108)
* Port file was not written to... where?

Adds the information on where the port file could not be written.
From the current phrasing it appears the intention was to add the
information but ultimately wasn't.

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/11108#pullrequestreview-770115835
2021-10-04 15:21:56 +00:00
akshayshirahatti-da
a8d703b996
Increase akka server request-timeout for HttpServiceIntegrationTests (#11109)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 12:09:27 +01:00
Remy
37d94aaef6
Add unit for daily performance tests (#11107)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 13:00:38 +02:00