Commit Graph

288 Commits

Author SHA1 Message Date
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
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
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
nicu-da
df65d02c4e
Exclude dedup tests affected by current changes (#11471)
CHANGELOG_BEGIN

CHANGELOG_END
2021-10-29 21:28:56 +02:00
nicu-da
6126fc2230
Remove append only prefix from conformance tests [KVL-1152] (#11424)
CHANGELOG_BEGIN
[api-test-tool] - remove AppendOnly prefix from test suites as the append-only schema is the only one left
CHANGELOG_END
2021-10-28 02:24:42 -07:00
Moritz Kiefer
926655d3c3
Drop daml ledger timeout tests from compat tests (#11441)
Testing the compatibility of the timeout flag is pretty useless and it
keeps flaking.

changelog_begin
changelog_end
2021-10-28 09:11:45 +00:00
Moritz Kiefer
15cb84093b
Switch back to binary execution logs (#11440)
We are seeing lots of OOM issues on Windows after having switched to
the JSON format. They seem to happen after the actual build has
happened while writing out the exec log so trying to revert back to
the binary format seems promising.

changelog_begin
changelog_end
2021-10-28 08:55:35 +00:00
Moritz Kiefer
a600f75c9f
Bump bazel memory limit to 3gb (#11436)
* Bump bazel memory limit to 3gb

We keep getting oom’s on Windows from Bazel itself afaict. I suspect
our build has just gotten too big. Having to increase the memory is a
bit worrying but it also doesn’t seem reasonable to expect the memory
size to stay indepenent of the build size.

changelog_begin
changelog_end

* copypasta

changelog_begin
changelog_end
2021-10-27 16:33:21 +00:00
azure-pipelines[bot]
b3375fd2a1
update compat versions for 1.18.0-snapshot.20211013.8071.0.514e8b50 (#11237)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-14 16:33:01 +02:00
Stefano Baghino
387d0e8f6c
Make compatibility migrations eternal (#11242)
Not sure whether this is a good choice but I could not
find anything between `long` and `eternal`.

changelog_begin
changelog_end
2021-10-14 10:12:22 +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
fabiotudone-da
4295ecd1d0
Fix compatibility exclusions introduced by #11095 [KVL-1083] (#11141)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-06 21:58:33 +02: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
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
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
azure-pipelines[bot]
4b31bf088f
update compat versions for 1.17.0 (#11075)
* update compat versions for 1.17.0

CHANGELOG_BEGIN
CHANGELOG_END

* add exclusions

* Revert "add exclusions"

This reverts commit 13a5083081.

* Fix command dedup for kv sandbox

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-09-30 16:14:45 +00:00
Gary Verhaegen
79080839c1
add Auth0 support to create-daml-app (#10673)
As I was adding support to a sample app for the third time, I decided I
might as well clean it up a bit and add support for everyone.

This is completely optional, activated by (build-time) environment
variables, and should be trivial to remove for users who don't care
about it. In an ideal world we'd have options to `daml new` and this
would be one, but I think adding it out-of-the-box is a better
alternative than letting people figure this out on their own.

CHANGELOG_BEGIN
- The `create-daml-app` template now includes support for a third
  authentication scheme (in addition to the existing "dev mode" and Daml
  Hub support): Auth0.
CHANGELOG_END
2021-09-14 15:56:45 +02:00
nicu-da
37a1cb21b3
compatibility-tests - Exclude CommandDeduplicationIT from running for existing 1.17 snapshots (#10866)
Reason: in between snapshots there was a proto change (field number change) which broke compatibility

CHANGELOG_BEGIN

CHANGELOG_END
2021-09-14 06:58:42 +00:00
Hubert Slojewski
b50bb8e437
Populate definite_answer in ApiException [KVL-1004] (#10832)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-13 16:28:39 +00:00
Hubert Slojewski
d9178d2ac2
Clarify version usage in test tool exclusion docs (#10858)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-13 11:30:00 +00:00
Moritz Kiefer
c113954a35
Clarify docs for test tool exclusions (#10855)
* Clarify docs for test tool exclusions

changelog_begin
changelog_end

* clarify 0.0.0

changelog_begin
changelog_end
2021-09-13 10:12:20 +00:00
Moritz Kiefer
0800504955
Fix DuplicateSubmissionID test exclusions (#10819)
0db15e6759
renamed those tests so we need to adjust for it.

changelog_begin
changelog_end
2021-09-08 18:28:10 +02:00
Robert Autenrieth
cdf4bf1138
Check compatibility of timestamps (#10793)
changelog_begin
changelog_end
2021-09-07 08:58:42 +02:00
Moritz Kiefer
23b0fe7ac2
Fix exclusions for command service tests (#10777)
changelog_begin
changelog_end
2021-09-06 10:54:43 +02:00
Moritz Kiefer
751587125f
Fix exclusions for command dedup in compat tests (#10767)
We need to differentiate between 3 cases:

1. Ledger API test tool versions that only support exclusion of whole
suites.
2. Ledger API test tool versions where the tests had different names.
3. and the current state

changelog_begin
changelog_end
2021-09-03 14:04:46 +00:00
Moritz Kiefer
50fecfb9ef
Wrap missing label names in quotes (#10749)
* Wrap missing label names in quotes

See
https://discuss.daml.com/t/why-might-i-be-getting-missing-record-label-identity-from-the-ledger-api-when-submitting-a-command/3059/5
this has caused some confusion for users since it’s not obvious that
it is the label name if you have a very generic label name like
`identity`.

I have no strong feelings on whether this should be single or double
quotes so happy to change it.

changelog_begin
changelog_end
2021-09-03 13:52:55 +00:00
Victor Peter Rouven Müller
5595d55c79
[JSON-API] Use the token from incoming requests to update the package list (#10602)
* Use the token from incoming requests to update the package list

changelog_begin
changelog_end

* Lazily initialize the ledger client

* Fix ee integration tests

* Fix package reloading behaviour by using a semaphore to check for ongoing updates

* Refactor out the semaphore code into a concurrency utility class

* Use correct locking for the updateTask so every thread always uses an up to date task

* Remove unused imports in utils.Concurrent & remove packages from the tests

* Hide & mark the token file cli option deprecated because we dont need it anymore and only keep it so client deployment code doesn't break

* Fix scala 2.12 build by adding more type annotations

* Update ledger-service/http-json-cli/src/main/scala/com/daml/http/OptionParser.scala

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

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/PackageService.scala

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

* Readd pgkManagementClient after it was removed accidentally (but now it's lazy)

* Remove concurrent object & use atomic boolean instead of a mutex because it makes more sense

* Replace semaphore with countdownlatch

* Refactor the caching into a separate class

* Use Instant instead of LocalDateTime

* Remove that ** of bad synchonization and do stupid simple synchronization because it JUST WORKS, besides adapt when we want to reload

* Remove await in tests because it can result in buggy tests

* remove unused code in WebSocketService.scala

* Unhide the access-token-file option as per request of Stefano

* Less implicit jwts per request of Stefano

* Try making some code more readable as by request of Akshay

* Use more shark because it expresses better than flatMaps if I don't need the arg

* Move defs in predicate in WebsocketService.scala around

* Try to minimize diff further in WebsocketService.scala

* Fix build and minimize diff in WebSocketService.scala further

* Minimize diff of function getTransactionSourceForParty in WebSocketService.scala

* Share the ec in WebSocketService.scala to minimize the diff

* Minimize in function predicate in WebSocketService.scala

* Further minimize in function predicate in WebSocketService.scala

* Change some case classes to be normal classes but with apply method

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/PackageService.scala

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

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/Endpoints.scala

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

* Get rid of implicit jwt tokens, the world is already confusing and full of implicits enough

* Improve readability

* Integrate the new LedgerClient which does not depend on a leder id

* Fix tests

* Apply suggestions from code review

thanks to @S11001001

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

* Apply further review comments

* Remove outcommented code

* Deprecate access token file option in the description too

changelog_begin

- [JSON API] The cli option `--access-token-file` is now deprecated. It
    is not needed anymore and you can safely remove it. Reason is that
    the operations which prior required a token at startup are now done
    on demand using the token of the incoming request.

changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-09-03 10:12:01 +00:00
nicu-da
d2180cf60b
Update exclusion for command deduplication to include full version range (#10750)
CHANGELOG_BEGIN

CHANGELOG_END
2021-09-02 05:56:44 -07:00
nicu-da
41881ba2ba
Command dedup: migrate kvutils to use v2 services [KVL-1049] (#10679)
* Add deduplication and submission id to the proto submitter info so we can build the v2 completion info

* Use v2 rejections and store the enriched model in protobuf

* Update v1 SubmissionResult to v2 SubmissionResult

* Update v1 imports to v2 imports

* Enable API deduplication for ledgers that don't have it implemented yet (all kv)

* Update tests for new rejections

* Disable buf check for oneof

* Code review - fix formatting and test assertions

* Update imports for proto changes

* Add tests for rejection conversions

* Use entry id as submission id when submission id is missing

* Calculate deduplication period for rejection based on the set deduplicate until by calculating the duration relative to record time

* Code review consistent naming and comments
* Submission id is optional in the completion info

the submissionId is not set for participant.state.v1 entries, therefore for the transition from v1 to the v2 API we need to account for the missing submission ids by making it optional in the completion info.

* Update messages and grpc status codes for rejections to keep backward compatibility

* Deprecate proto deduplicate_until
* Set deduplication value in the commit context for all the deduplication periods. This change allows us to re-enable the committer deduplication tests

* Set ledger configuration for tests

* Command dedup: In the committer set the deduplicate until context value based on the given deduplication period [KVL-1049] (#10743)


CHANGELOG_BEGIN
participant-state:  
- Migrate to use only v2 Read/Write Services. This includes the use of new models for rejections/updates/submission results.
- Calculate deduplicate until for committer side deduplication based on the submitter given deduplication period
   -  if using the deprecated deduplicateUntil then just set the given timestamp
   -  if using duration then calculate the new deduplicateUntil by using the formula (submissionTime + deduplicationDuration + minSkew)
  -   if using offset deduplication then calculate deduplicateUntil by using the formula (submissionTime + maxDeduplicationDuration + minSkew)
  -  if the deduplication period is not set then we don't set deduplicateUntil
- Emit completions with status `ALREADY_EXISTS` for duplicate commands

CHANGELOG_END
2021-09-02 04:44:55 -07:00
azure-pipelines[bot]
12cb92b431
update compat versions for 1.17.0-snapshot.20210831.7702.0.f058c2f1 (#10737)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-09-01 10:49:09 +00:00
Andreas Herrmann
0b7980d6eb
Update rules_haskell (#10674)
* update rules_haskell

changelog_begin
changelog_end

* Build proto3-suite lib and exe in same repo

changelog_begin
changelog_end

* drop unneeded stack_snapshot packages

* Use packages.bzl consistently

* Sort stack_snapshot attribute values

* Remove unused constant

* drop unneeded stack_snapshot packages in compat

changelog_begin
changelog_end

* Sort stack_snapshot attribute values in compat

* Remove redundant dicts.add in compat

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-26 10:41:58 +02:00
azure-pipelines[bot]
52e7a6d928
update compat versions for 1.17.0-snapshot.20210824.7647.0.640fb683 (#10667)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-25 16:29:37 +02:00
azure-pipelines[bot]
01b6e89551
update compat versions for 1.17.0-snapshot.20210817.7604.0.0c187853 (#10610)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-20 14:27:19 +02:00
Moritz Kiefer
569612ab73
Drop broken symlink config (#10616)
This doesn’t do anything other than produce a warning.

changelog_begin
changelog_end
2021-08-19 08:40:09 +00:00
Samir Talwar
41e60f7302
Upgrade to Scala 2.12.14 and 2.13.6. (#10573)
* Upgrade to Scala 2.12.14.

* Upgrade Scala to 2.13.6.

CHANGELOG_BEGIN
CHANGELOG_END

* compability: Re-pin the Maven dependencies.
2021-08-12 14:25:53 +00:00
Andreas Herrmann
4e1a90dffd
Enable --incompatible_remote_results_ignore_disk (#10571)
* Enable --incompatible_remote_results_ignore_disk

> If set to true, --noremote_upload_local_results and --noremote_accept_cached will not apply to the disk cache. If a combined cache is used: --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. --noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache. See #8216 for details.

changelog_begin
changelog_end

* Fix compatibility workspace

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-12 12:35:05 +00:00
azure-pipelines[bot]
76ecb44fbd
update compat versions for 1.17.0-snapshot.20210811.7565.0.f1a55aa4 (#10563)
* update compat versions for 1.17.0-snapshot.20210811.7565.0.f1a55aa4

CHANGELOG_BEGIN
CHANGELOG_END

* fix Scala code

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-08-12 12:33:37 +02:00
Moritz Kiefer
86a03fa7c0
Bump bazel max jvm memory (#10569)
* Bump bazel max jvm memory

I kept the starting memory the same. Happy to bump that as well if you
think it makes sense.

changelog_begin
changelog_end

* Bump xms as well

changelog_begin
changelog_end
2021-08-12 09:31:19 +00:00
Andreas Herrmann
881d0aba91
Upgrade rules_haskell and rules_nixpkgs (#10517)
* Update rules_haskell & rules_nixpkgs

changelog_begin
changelog_end

* remove unused patch

* Remove the strict-source-names patch

This patch was largely motivated by issues with directory outputs on
Windows occasionally producing empty outputs that would poison the
remote cache. However, we have continued seeing this type of issue
despite this patch and have since resorted to a regular fixup job that
cleans such empty items out of the cache.

With that the strongest motivation with this change is no longer valid
and it doesn't seem worth it to maintain it any longer.

changelog_begin
changelog_end

* Remove windows-remove-fake-libs patch

This patch was upstreamed.

* Update windows-extra-libraries patch

The GHC bindist patch is no longer required as it applied to GHC version
8.10.3 but we are using 8.10.4 instead.

* Remove cc-wrapper-windows patch

This was upstreamed.

* Remove protobuf-source patch

This was upstreamed

* Keep patches in sync between daml and compatibility

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-09 15:19:17 +02:00
azure-pipelines[bot]
2d2579776b
update compat versions for 1.16.0-snapshot.20210805.7501.0.48050ad7 (#10505)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-09 08:42:16 +02:00
azure-pipelines[bot]
8c55e011e8
update compat versions for 1.16.0-snapshot.20210802.7499.0.5157ad6d (#10464)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-03 15:06:39 +02:00
Remy
a929b25b41
Fix compatibility test (#10446)
* Fix compatibility test

CHANGELOG_BEGIN
CHANGELOG_END

* a bit more fixes
2021-07-29 18:33:53 +02:00
Moritz Kiefer
9cb83100f1
Patch transitive protobuf dependency (#10441)
Part 2 of #10437

changelog_begin
changelog_end
2021-07-28 17:11:10 +00:00
azure-pipelines[bot]
8cf3076486
update compat versions for 1.16.0-snapshot.20210727.7476.0.b5e9d861 (#10431)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-28 16:05:07 +02:00
Remy
cf7b1bb8b5
LF: ValueDecoder set recursion limit for values. (#10393)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-28 12:14:15 +02:00
azure-pipelines[bot]
e8247afc6e
update compat versions for 1.16.0-snapshot.20210720.7404.0.b7cf42d1 (#10354)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-22 17:00:52 +02:00
azure-pipelines[bot]
84094e0b6b
update compat versions for 1.15.0 (#10281)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-15 08:44:45 +02:00
mziolekda
2271f93b69
Fix crash on duplicate submissionId (#10242)
* CHANGELOG_BEGIN
Fix crash in ConfigManagement- and PackageManagement- services on duplicate submissionsIds from different participants.
Extend ledger-api-test-tool to cover the duplicate submissionId cases.
CHANGELOG_END

* Addressing review comments and fixing failing tests

* format

* address more review comments

* adopt after rebase to main
2021-07-14 14:12:31 +00:00
azure-pipelines[bot]
7f4bc2a472
update compat versions for 1.14.2 (#10233)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-12 08:24:55 +02:00
azure-pipelines[bot]
89d87ad17c
update compat versions for 1.14.2-snapshot.20210708.7135.0.aa297840 (#10223)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-09 11:21:49 +02:00