Commit Graph

8450 Commits

Author SHA1 Message Date
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
nicu-da
dd88ba24c3
kvutils - Backwards looking command deduplication [KVL-1174] (#11634)
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
2021-11-18 02:25:31 -08:00
Samir Talwar
43438c6e24
sandbox: Remove PostgreSQL conformance tests. (#11434)
PostgreSQL is no longer supported. Let's not worry about it too much.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 10:06:18 +00:00
tudor-da
b0a1bf79df
More missing error codes (#11749)
* Missing error codes in Sandbox classic

CHANGELOG_BEGIN
CHANGELOG_END

* Covering more errors above the persistence layer

* Fix wrong contextualizedErrorLoggers

* Compilation fixes
2021-11-18 10:00:43 +00:00
Moritz Kiefer
3366413dd4
Delete empty scala test library (#11747)
changelog_begin
changelog_end
2021-11-18 10:22:35 +01:00
Moritz Kiefer
85979b3d77
Upgrade to Postgres 10 (#11751)
1.18 is out and we’re bumping our requirements to 10 for 2.0 so this
seems like a good time to make the switch.

changelog_begin
changelog_end
2021-11-18 10:03:01 +01:00
Moritz Kiefer
39c596621b
Drop aherrman-da from release rotation (#11756)
changelog_begin
changelog_end
2021-11-18 10:01:12 +01:00
Moritz Kiefer
c8ace8b1cf
Factor kind projector target into a variable (#11759)
Seems nicer than trying to format a string everywhere

changelog_begin
changelog_end
2021-11-18 09:51:43 +01:00
azure-pipelines[bot]
e78bfc7999
update NOTICES file (#11757)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-18 08:03:22 +01:00
Moritz Kiefer
fa7663148a
Drop 2.12 versioned_scala_deps (#11748)
I’ve kept the infrastructure for versioned_scala_deps around because
I’m optimistic and hope that eventually we’ll do another Scala upgrade.

changelog_begin
changelog_end
2021-11-17 22:13:08 +00:00
akshayshirahatti-da
c77e150f60
[JSON-API] ContractDao JMH benchmarks against PG (#11718)
* Changes to port JMH benchmark tests for contract dao to be be run against postgres db.

CHANGELOG_BEGIN
CHANGELOG_END

* add missing libs-scala/ports depenency to ledger-on-sql test suite

* changes based on codereview comments
2021-11-18 00:32:42 +05:30
azure-pipelines[bot]
d60cf70e41
rotate release duty after 1.18.0-snapshot.20211116.8395.0.ccbf7140 (#11734)
@victormueller-da is taking care of 1.18.0-snapshot.20211116.8395.0.ccbf7140 (#11733), so they get pushed back to the end of the line.

Please do not merge this before #11733.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2021-11-17 18:45:24 +01:00
Moritz Kiefer
bb19c0de91
Drop Scala 2.12 support (#11619)
* 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>
2021-11-17 18:38:43 +01:00
Sofia Faro
c2d4ea4ef1
Add separate commands for create/fetch/exercise by template/interface. (#11724)
* Add separate commands wrt by template/interface

Resolves #11674 and #11675

changelog_begin
changelog_end

* remove unnecessary commands
2021-11-17 17:08:24 +00:00
Stephen Compall
7e4acf97fc
link to doc detailing gRPC-to-HTTP code mapping (#11742)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-17 15:44:08 +00:00