Commit Graph

8464 Commits

Author SHA1 Message Date
Hubert Slojewski
109b60613c
Make the InstrumentedSource.queue use the BoundedSourceQueue [KVL-1177] (#11807)
CHANGELOG_BEGIN

- [Integration Kit] InstrumentedSource.queue.offer no longer returns a Future

CHANGELOG_END
2021-11-24 11:26:39 +01:00
Robert Autenrieth
bd2a6852ee
Make ACS reader parameters configurable (#11732)
changelog_begin
changelog_end
2021-11-23 21:48:02 +01:00
tudor-da
329e609ec4
[Self-service error codes] Group explanations (#11715)
* [Self-service error codes] Error group descriptions

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-11-23 20:30:33 +00:00
Moritz Kiefer
32e9c4b13a
Bump go rules (#11829)
* Bump go rules

Was debugging something else and this seemed simple enough to factor
it out.

changelog_begin
changelog_end

* Bump Bazel on Windows

changelog_begin
changelog_end

* bump bazel manifest

changelog_begin
changelog_end
2021-11-23 18:58:55 +00:00
azure-pipelines[bot]
6df7af7544
update compat versions for 1.18.0-snapshot.20211117.8399.0.a05a40ae (#11743)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-23 18:13:57 +01:00
pbatko-da
9461702309
[DPP-673][Self-service error codes] Split one narrow migration table into multiple narrower ones to fit in the generated pdf's pages. (#11803)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 17:38:31 +01:00
pbatko-da
55191847cd
[DPP-673][Self-service error-codes] Generate error code directory compatible with both pdf and html docs (#11794)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 15:30:48 +01:00
Moritz Kiefer
5a2c070da4
Skip append-only migration tests on each PR (#11816)
fixes #11760

changelog_begin
changelog_end
2021-11-23 15:00:50 +01:00
Stephen Compall
e6c8229594
port #11798 documentation changes to json-api HTTP codes documentation (#11823)
- see c4b6a17da1

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 13:16:46 +00:00
Remy
1610d977dc
LF: parsing interface primitives (#11825)
Continue work start in #11797

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 12:03:03 +00:00
mziolekda
f2aa09c114
Allow encoded server key files to be in base64 [DPP-761] (#11796)
* Allow encoded server key files to be in base64

CHANGELOG_BEGIN
CHANGELOG_END

* format

* dry tests
2021-11-23 09:49:52 +00:00
azure-pipelines[bot]
cc3f551030
update NOTICES file (#11824)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-23 08:30:31 +01:00
tudor-da
1bfcbc978b
Refactoring for Canton compatibility on PackageServiceErrors (#11812)
* Refactoring for Canton compatibility on PackageServiceErrors
* ErrorResource.all is public for accessibility from Canton

CHANGELOG_BEGIN
CHANGELOG_END

* Keep PackageServiceError object
2021-11-22 19:14:03 +00:00
tudor-da
c4b6a17da1
[Self-service error codes] Update existing error code references [DPP-593] (#11798)
* Updated Ledger API services protobuf definitions

CHANGELOG_BEGIN
CHANGELOG_END

* Adapted Building Applications / Ledger API / gRPC section

* Moved Error Codes under Building Applications / Ledger API / gRPC

* Small rewording Error codes page

* Updated outdated LedgerAPI / gRPC page

* Apply suggestions from code review

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

* Moved Error Codes under Building Applications / Ledger API / gRPC

* Updated outdated LedgerAPI / gRPC page

* Addressed review comments

* Addressed review comments

* Remove unnecessary link to error-codes

* `Ledger API` changed to `Common Ledger API change`

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-22 18:39:25 +00:00
Moritz Kiefer
addb2edc03
Drop Scala 2.13 version guards from Bazel definitions (#11819)
changelog_begin
changelog_end
2021-11-22 17:37:49 +00:00
Moritz Kiefer
5785bbfcfd
Drop LF < 1.14 from supported damlc output versions (#11701)
* Drop LF < 1.14 from supported damlc output versions

fixes #11319

We keep test coverage by depending on the most recent snapshot which
still has 1.14 support.

changelog_begin

- [Daml Compiler] Damlc can only produce Daml-LF 1.14 or
  newer. Passing aynthing older to `--target` is an error. If you
  need to produce older versions, use an older SDK.

changelog_end

* Switch around legacy_compiler_lf_versions

changelog_begin
changelog_end

* drop since-lf

changelog_begin
changelog_end
2021-11-22 16:20:17 +00:00
Remy
ae8391ee01
LF Parser: handle interface (#11797)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-22 14:49:02 +01:00
nicu-da
faddba4222
Increase range for excluded snapshots in compatilbility tests (#11802)
changelog_begin
changelog_end
2021-11-22 05:43:53 -08:00
Sofia Faro
f8933d1f4b
Make lookupTemplateChoice return only choices in the template. (#11808)
This fixes a bug in the typechecker (#11558) and the command
preprocessor, since those were written with this behavior of
lookupTemplateChoice in mind. Enables the engine test that
caught this.

changelog_begin
changelog_end
2021-11-22 13:27:48 +00:00
azure-pipelines[bot]
3e0ac71e99
update NOTICES file (#11801)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-22 12:29:39 +00:00
tudor-da
8e31e8e6a8
[Self-service error codes] Enabled by default [DPP-691] (#11685)
* [Self-service error codes] Enabled by default
* Flag changed to `use-pre-1.18-error-codes` (disabled by default)

CHANGELOG_BEGIN
[Ledger API Specification] The Ledger API returns enriched error codes (see https://docs.daml.com/error-codes/self-service/index.html)
For backwards-compatibility, a new API flag `--use-pre-1.18-error-codes` is introduced for preserving the legacy behavior for
clients that want to migrate incrementally to the changed gRPC status code responses and error details format.
CHANGELOG_END

* Adapted HttpServiceIntegrationTest

* Renamed `Feature Flag` to `Configuration` in docs

* Fix Daml Script tests

changelog_begin
changelog_end

* Fix Repl functests

changelog_begin
changelog_end

* Fix haskell binding tests

changelog_begin
changelog_end

* Fix CommandClientIT test

* Fixed Sandbox and CommandServiceBackpressureIT tests
 Please enter the commit message for your changes. Lines starting

* Adapt //compiler/damlc/tests:repl-functests again

* Fix more tests and address Miklos' comments
* Flag name changed to `grpc-status-codes-compatibility-mode`

* Remove useless flags sandbox-classic

* Sandbox-classic tests fix for ContractKeysIT and ExceptionsIT
* Created 2 deprecated test suites that have the more generic assertions as returned
by the deprecated in-memory backend

* More fixes for CommandServiceIT
* Fixes compilation issue with the deprecated exceptionsIT class for Sandbox-classic in-memory

* Compatibility mode for old test tools

* Change flag name to `use-pre-1.18-error-codes`

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-11-22 12:26:48 +00:00
Gary Verhaegen
ab520fbc51
Fix es (#11784)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-22 11:41:10 +01:00
Moritz Kiefer
350ad983ea
Bump Windows postgres (#11804)
The old URL returns a 404 now

changelog_begin
changelog_end
2021-11-22 10:38:54 +00:00
azure-pipelines[bot]
2d60ae813c
update NOTICES file (#11799)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-20 08:44:47 +01:00
nicu-da
2d9ee2078f
[ledger-api-client] - Do not account for deduplication_time as timeout [KVL-1172] (#11791)
changelog_begin
ledger-api-client - The default command tracking timeout is no longer influenced by the deprecated deduplication_time as a deduplication period. Previously if no timeout was being set in the command and deduplication_time was set as the deduplication period then the command tracking timeout was the minimum between the deduplication_time and max tracking timeout.
changelog_end
2021-11-19 18:23:27 +00:00
Remy
f33486154f
LF: Simplify LF Syntax (#11795)
- Do not wrapped choices in `choices { ... }`
- use sytematic `;` after choice component instead of ',`

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-19 17:23:36 +01:00
Remy
cbe9c922ba
LF: Clean up Ast (#11786)
- rename non-default builders `apply` to `build`
  * avoid confusing both
  * make explicit the build can crash

- make interfaceId and templateId fields consitent

- use when possible named arguments

- check for non-repetition of inherited choices

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-19 15:40:28 +01:00
nicu-da
25e5bbb753
kvutils - Removed unused setting from conformance tests [KVL-1174] (#11785)
kvutils - The deduplication period is no longer overwritten by the max deduplication duration, therefore there is no need to change the default max deduplication duration

changelog_begin
changelog_end
2021-11-19 05:41:45 -08:00
Stefano Baghino
cd52f13464
Remove @aherrmann-da from CODEOWNERS (#11792)
changelog_begin
changelog_end
2021-11-19 14:27:02 +01:00
azure-pipelines[bot]
9bb12d0eec
update NOTICES file (#11787)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-19 14:14:17 +01:00
Moisés Ackerman
d23d113667
Restructure interface desugaring (#11555)
* Update ghc patch

* Replace Implements proxy datatype with a class

* Expose 'Implements' class in Prelude

* Add DA.Internal.Desugar.HasMethod class

This allows us to get the type of a method of an interface through the functional dependency

* Convert interfaces from new desugaring

* Update Interface daml-test-file to use Interface class functions

* Update InterfaceDesugared daml-test-file

* Replace remaining uses of Is<Interface> methods with Implements

* Document HasMethod, Method and mkMethod

* Ignore _method_ bindings in convertBind

* Ignore interface desugaring types/classes/instances/functions in LF conversion

* update snapshot after pin on windows

changelog_begin
changelog_end
2021-11-19 10:06:49 +01:00
Remy
1bb2fc28a3
LF: Simplify transaction versionning for interface (#11744)
We revert #11626, and just change the way transaction version is
computed:

- As before, Node version is calculated from the
  package of the template ID action.

- Transaction version is the max of the version of all the nodes,
   instead of the root nodes.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 22:46:46 +01:00
Marton Nagy
4b59c5731c
Move select DB logic to JVM [DPP-760] (#11777)
* Move select logic which was previously added as select expressions to Scala calulation, and exposing needed data on the queries

changelog_begin
changelog_end
2021-11-18 21:36:15 +01:00
Andreas Herrmann
5fb5784970
Limit the number of parallel Bazel actions (#11779)
Limit the number of parallel actions spawned by Bazel to the number of
physical CPUs. (Assuming a CPU with hyperthreading enabled)

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-18 18:32:33 +00:00
mziolekda
a9754fe7d2
Write exception reports into the logfile in case of ssl misconfiguration (#11776)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 18:25:59 +00:00
Moritz Kiefer
4a8e1104ca
Add missing export of deleteBy from DA.NonEmpty (#11716)
changelog_begin
changelog_end
2021-11-18 18:15:35 +00:00
Sofia Faro
51f646cb22
Add engine tests for interfaces. (#11773)
* Add engine tests for interfaces.

Adds engine tests using the new commands. This uncovered a few issues:

- getDependencies doesn't work when given an interfaceId as a templateId
  (such as when exercising an interface via the ledger api). I patched
  it up so it deals with interface ids. We've already discussed a way to
  simplify getDependencies that will also avoid this in the future, but I'll
  leave that to the future.

- issue #11703 is confirmed via some tests that don't pass (and are
  currently disabled)

- PackageInterface.lookupTemplateChoice returns inherited choices, when it
  should only return own choices. At least, the typechecker assumes
  it doesn't -- this affects #11558 -- as does the command
  preprocessor. I'll leave the cleanup to a separate PR.

changelog_begin
changelog_end

* scalafmt, add missing file

* Move interfaces tests to separate file

* scalafmt
2021-11-18 16:40:03 +00:00
Moritz Kiefer
ac573551e7
Drop Scala 2.12 compatibility layer from //daml-lf/data (#11758)
* Drop Scala 2.12 compatibility layer from //daml-lf/data

changelog_begin
changelog_end

* Update daml-lf/data/src/main/scala/com/digitalasset/daml/lf/data/ImmArray.scala

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

* drop dependency on compat libraries

changelog_begin
changelog_end

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-11-18 17:34:06 +01:00
Moritz Kiefer
3b5f8a73e1
Remove precondition field from TemplateImplements (#11763)
* Remove precondition field from TemplateImplements

fixes #11635

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>

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-11-18 17:10:40 +01:00
pbatko-da
2e789ddf37
[DPP-417][Self-service error codes][Docs] Add more complete information for forking gRPC status codes. (#11739)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 17:03:10 +01:00
nicu-da
4ebdaf597d
kvutils - Deprecate deduplicate_until [kvl-1174] (#11765)
[kvutils] - deduplicate_until is no longer used by backwards looking command deduplication, therefore we deprecate the field in the proto files (keep it there for backwards compatibility) and remove references to it from the committer context

changelog_begin
changelog_end
2021-11-18 07:45:54 -08:00
nicu-da
f5a6302ba1
[participant-integration-api] - Use internal CommandCompletionService [KVL-1172] (#11741)
Fully decouple the usage of the gRPC CommandCompletionService vs the internally defined CommandCompletionService. This allows the two interfaces to diverge and does not force us to expose all the methods that we want to add to the internal CommandCompletionService.

changelog_begin
changelog_end
2021-11-18 07:19:27 -08:00
Andreas Herrmann
39a38d3a37
Update to Java 11 (#11512)
* Update to Java 11

changelog_begin
changelog_end

* Fix RoundingMode deprecation warnings

* Fix dep-ann warning

* Integer constructor

* JavaX annotation dependency

* javax.xml.bind was removed in Java 11

Using Guava as a replacement, since it is already a project dependency.

* JDK 11 no longer has a separate JRE tree

* Remove unused jdk_nix import

* remove now redundant jdk11_nix

* Java 8 --> 9 increased Instant.now() precision

See https://bugs.openjdk.java.net/browse/JDK-8068730

The precision of `Instant.now()` increased between Java 8 and Java 9.
On Linux and MacOS this doesn't seem to be a problem, as the precision
still seems to be at micro seconds. However, on Windows this now causes
errors of the following form:
```
java.lang.IllegalArgumentException: Conversion of Instant
2021-11-05T13:58:56.726875100Z to microsecond granularity would result
in loss of precision.
```
Suggesting that it now offers sub-microsecond precision.

`TimestampConversion.instantToMicros` had a check to fail if the
conversion lead to a loss of precision. In the specific failing test
case this is not a concern, so this adds a `roundInstantToMicros`
variant that avoids this kind of error.

* TMP round timestamps

* Revert "TMP round timestamps"

This reverts commit af8e261278.

* Skip versions before 1.6.0 in migration tests

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-18 14:48:37 +00:00
Moritz Kiefer
91b4fb9acf
Backport: Skip protobuf compatibility check for PRs to non-main (#11772)
Backport from #11770

changelog_begin
changelog_end

Co-authored-by: Nicu Reut <nicu.reut@digitalasset.com>
2021-11-18 14:33:45 +00:00
Moritz Kiefer
a3556a57ae
Retry release signature checks (#11771)
changelog_begin
changelog_end
2021-11-18 14:09:42 +00:00
nicu-da
8f458d8d2a
[ledger-api] Include the completion offset in the command_service.proto responses [KVL-1171] (#11658)
CHANGELOG_BEGIN
[ledger-api] - Include the completion offset in the responses from the command_service.proto
CHANGELOG_END
2021-11-18 04:37:26 -08:00
Samir Talwar
e891180fb6
participant-state: Remove the v1 API. (#11553)
CHANGELOG_BEGIN
- [Integration Kit] v1 of the participant state API is no longer
  supported. You will need to upgrade to v2.
CHANGELOG_END
2021-11-18 11:49:33 +00:00
Moritz Kiefer
869b8054c6
Bump sandbox acquisition timeout of trigger service tests to 1m (#11764)
This matches the timeouts we set in SandboxNextFixture and I’ve seen
the 30s timeouts be insufficient on CI.

changelog_begin
changelog_end
2021-11-18 11:43:26 +00:00
Miklos
4106222ab8
Fix docs regarding deduplication periods [KVL-1194] (#11738)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 11:45:01 +01:00
Moritz Kiefer
186ba10d19
Fix missing encoding of nested maps in typescript bindings (#11746)
The encoder just took the keys & values as is which clearly falls
apart once those actually contain anything else that requires encoding

changelog_begin

- [Typescript Bindings] Fix an issue where nested maps did not get
  encoded properly before sent to the JSON API which caused requests
  to fail with a decoding error on the JSON API.

changelog_end
2021-11-18 11:32:21 +01:00