Part of #11831. This kills another two uses of sandbox-kv.
Also fixes a daml-helper issue where we weren't passing "localhost" to the
ledger flags, so it was complaining about starting outside of a project.
changelog_begin
changelog_end
* ledger-api-test-tool: Rename "ParticipantFeature" to "Features".
* ledger-api-test-tool: Govern ContractIdIT test runs through a feature.
Rather than making it optional, we can expose a feature that instructs
whether we support certain kinds of contract IDs.
This accidentally works for Canton too as it defaults to "false" for
both options, which holds for Canton.
CHANGELOG_BEGIN
- [Ledger API Test Tool] The "ContractIdIT" test is now run by default,
using ledger feature flags to determine which test cases are run. You
will need to configure the ``StandaloneApiService`` accordingly.
CHANGELOG_END
* ledger-api: Add some documentation to `ContractIdFeatures`.
* compatibility: Update for ContractIdIT.
run-full-compat: true
* ledger-api: Clarify the contract ID features and remove v0 support.
We also remove the tests for v0 contract IDs from ContractIdIT.
* ledger-api-test-tool: Re-introduce tests for v0 contract IDs.
* ledger-api-test-tool: Case class with named parameters in ContractIdIT.
* ledger-api: All ledgers must support suffixed contract IDs.
* compatibilty: Add a start for ContractIdIT.
We can't exclude a test until it exists.
run-full-compat: true
Rather than switching to sandbox-classic for older ledger API test
tool versions we just want to exclude them completely but apparently
I’m too stupid for boolean logic.
changelog_begin
changelog_end
NodeJS 12 is eol in April and there are already packages (e.g. vsce)
that dropped support. We probably should upgrade even further but for
now I’m going with the most conservative approach.
changelog_begin
changelog_end
* Rename daml sandbox to daml sandbox-kv
Also drop the default sandbox on `daml start`
Part of #11831
changelog_begin
changelog_end
* update release test instructions
* try to fix a couple compat tests
* dont need special 0.0.0 logic
* buildifier-fixx
* Migrate migration tests to Sandbox on X
This PR switches the data continuity tests for Sandbox from Sandbox
classic to Sandbox on X for newer versions. (Data continuity between
the two is expected and desired).
changelog_begin
changelog_end
* fmt
changelog_begin
changelog_end
* fix process mgmt
changelog_begin
changelog_end
* .
* Drop `platform-version` support from `daml.yaml`
Doesn’t work properly with Canton sandbox, nobody uses it and product
agreed to deleting it.
changelog_begin
changelog_end
* drop run-platform-jar
changelog_begin
changelog_end
* fix run-jar commands
changelog_begin
changelog_end
* Switch ledger-api-test-tool compat tests to sandbox on x
This only works for HEAD right now not releases because we don’t yet
have a release with sandbox on x. Will fix that on the next snapshot.
It also doesn’t migrate everything. I’ll migrate the other tests in
separate steps.
changelog_begin
changelog_end
* fix windows maybe
changelog_begin
changelog_end
* Fix more stuff
changelog_begin
changelog_end
* and even more stuff
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* Update compatibility/bazel_tools/testing.bzl
Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
* Fix compat test exclusions
Old versions don’t have those tests so we cannot exclude it.
changelog_begin
changelog_end
* more fixes
changelog_begin
changelog_end
* Clarify unhandled exception error message
The previous error doesn’t make it clear that this is an exception in
user code rather than a Scala exception in our code.
Daml-lf exception would technically be more correct but I don’t think
it’s helpful here so I went with Daml exception.
changelog_begin
changelog_end
* adjust ledger api test tool
changelog_begin
changelog_end
* Update test assertions
changelog_begin
changelog_end
* fix another assertion
changelog_begin
changelog_end
changelog_begin
[ledger-api-test-tool] - Merge command deduplication ledger API tests (`KVCommandDeduplicationIT`, `CommandDeduplicationIT`) into a single suite(`CommandDeduplicationIT`) which uses feature descriptors to handle different participant behaviors
changelog_end
Somewhat error-prone, so please review carefully.
Reasons we need this:
- Some file types are not properly handled by the script.
- The only exclusion mechanism we currently have (`NO_AUTO_COPYRIGHT`)
is overly coarse.
CHANGELOG_BEGIN
CHANGELOG_END
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.
I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.
CHANGELOG_BEGIN
CHANGELOG_END
changelog_begin
ledger-api - Remove validation for duration deduplication periods, which was validating that the deduplication duration is smaller than the max deduplication duration. This is now up to the ledger to enforce.
changelog_end
* Only include the latest patch release in compat tests
I don’t really see a good reason to include older patch releases but
happy to be told I’m wrong here is someone has one.
changelog_begin
changelog_end
* Fix sandbox migration references to 1.0.0
changelog_begin
changelog_end
* turns out 1.6.0 is bad as well
changelog_begin
changelog_end
* Drop snapshots from compat tests
We don’t really give strict compatibility guarantees on snapshots and
we actively break them (e.g. you cannot migrate across snapshots). So
this PR stops including snapshots in the compat tests which should
both speed them up a bit and stop irrelevant failures.
changelog_begin
changelog_end
* hlint
changelog_begin
changelog_end
Closes#11317
* Add warning for uses of 'controller ... can' syntax
* Remove uses of 'controller ... can' syntax
* Add test cases for -W{,no-}controller-can
* Update docs to reflect 'controller ... can' syntax deprecation
changelog_begin
* Deprecate 'controller ... can' syntax.
* It will be removed in a future version of Daml.
* Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
* Only run migration tests for stable versions on each PR
The ones that also go through snapshots are still there but only run
on the daily run.
The reason for this PR is that we’ve actually gotten damlc tests
pretty fast now to the point where I’m waiting for the compat tests to
finish on PRs that don’t force conformance test reruns.
changelog_begin
changelog_end
* actually use it …
changelog_begin
changelog_end
* Try to upgrade protobuf docs plugin
changelog_begin
changelog_end
* Fix extension number 65020 is already registered
Building `//ledger-api/grpc-definitions:ledger-api-docs` [failed
with](https://github.com/digital-asset/daml/issues/11761#issuecomment-978947565)
```
panic: proto: extension number 65020 is already registered on message google.protobuf.FieldOptions
```
Go dependencies are now pulled in via Gazelle. By default Gazelle will
generate new proto rules for any `.proto` files encountered in third
party Go dependencies. However, many of these already have pregenerated
`.pb.go` files generate with the appropriate configuration.
The problem can be avoided by configuring Gazelle to not generate new
proto rules, but instead use pre-existing `.pb.go` files.
For reference the field number is set in
[go-proto-validators](32a686adf8/validator.proto (L19))
which is an indirect dependency through protoc-gen-doc.
In this case we need to update protoc-gen-validate to v0.6.2 to include
4f41f10dde
which fixes unknown label errors.
* ./fmt
* Expose gRPC status.proto for Haskell bindings
* Update Gazelle to support embedsrcs on Windows
`protoc-gen-doc` relies on `go:embed` file embedding
2dde01902b/resources.go (L8).
Gazelle supports `embedsrcs`, however, it did not generate the attribute
correctly on Windows due to the different directory separator. This is
fixed in https://github.com/bazelbuild/bazel-gazelle/pull/1101.
* Add gazelle to compatibility workspace
It's loaded into `@daml`'s top-level `BUILD` file and ends up being a
dependency of the compatibility workspace as well.
* shift go_googleapis import
* Delete dead code
protobuf is imported transitively.
* Document how to add Go dependencies
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* [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>
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>
* 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>
CHANGELOG_BEGIN
kvutils - The deduplication duration passed in the command is now used for command deduplication, and is no longer always overwritten with the max deduplication duration. The command deduplication duration can still be extended by the committer to account for time skews.
CHANGELOG_END
* Drop Scala 2.12 support
This only includes the CI/build system infrastructure
changes. Dropping compatibility layers from our code for 2.12 can be
done separately.
This is fine even in the context of backport builds since we already
disable the Scala 2.12 job for those anyway.
fixes#11315
changelog_begin
changelog_end
* Update bazel-java-deps.bzl
Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
* Update rules_scala
Two patches have since been upstreamed and can be removed.
changelog_begin
changelog_end
* JMH deps were moved into a toolchain
https://github.com/bazelbuild/rules_scala/pull/1106
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Use error validators in ApiPackageManagementService
CHANGELOG_BEGIN
CHANGELOG_END
* Exclude PackageManagementServiceIT from compatibility tests after 1.17
CHANGELOG_BEGIN
CHANGELOG_END
* 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>