Commit Graph

272 Commits

Author SHA1 Message Date
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
Moritz Kiefer
42693452ce
Drop cleanup of node_modules (#10195)
This is months old by now and I think it might be non-deterministic
forcing unnecessary rebuilds.

changelog_begin
changelog_end
2021-07-07 10:15:44 +02:00
azure-pipelines[bot]
e4c8c390f2
update compat versions for 1.14.1-snapshot.20210706.7133.0.8ec16e94 (#10196)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-07 08:34:25 +02:00
azure-pipelines[bot]
05a72a3a15
update compat versions for 1.15.0-snapshot.20210705.7286.0.62aabcc4 (#10184)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-06 10:25:48 +02:00
Moritz Kiefer
64497f6c10
Only run sandbox(classic)? on postgres tests on Linx (#10178)
They keep causing timeouts on MacOS and nobody seems to consider them
useful enough to investigate. For now I only disabled the postgres
tests because I haven’t seen the others time out but if they do I’ll
add them as well

changelog_begin
changelog_end
2021-07-05 13:41:59 +00:00
azure-pipelines[bot]
b88ad58712
update compat versions for 1.15.0-snapshot.20210630.7261.0.84e1f3a7 (#10151)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-30 19:53:51 +02:00
Stefano Baghino
bb4641756f
Daml assistant capitalization (#10140)
changelog_begin
changelog_end

- DAML -> daml
- Assistant -> assistant

The capitalization of the latter fixed one occurrence of a capitalized 'A'
which was inconsistent with the vast majority of uncapitalized 'a's.
2021-06-29 14:32:44 +02:00
Moritz Kiefer
46a66e2f2a
Upgrade jest to the latest version (#10107)
This ends up transitively bumping yargs-parser which has a
vulnerability but more generally I also just like being on the latest version.

changelog_begin
changelog_end
2021-06-24 11:16:29 +00:00
azure-pipelines[bot]
84e329885f
update compat versions for 1.11.2 (#10104)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-24 13:07:03 +02:00
Remy
a6b536f3c4
Compiler: Make LF 1.13 the default output (#9907)
* Compiler: Roll LF Version

Fix #8591

CHANGELOG_BEGIN
- [Compiler] Default ouput LF version is now 1.13
CHANGELOG_END
2021-06-24 11:58:50 +02:00
Moritz Kiefer
3d79cbf2b1
Bump compat versions (#10096)
We need to do the same override for the gRPC version we do on main to
resolve conflicts.

changelog_begin
changelog_end
2021-06-23 22:12:04 +02:00
azure-pipelines[bot]
7eb2ce72a9
update compat versions for 1.15.0-snapshot.20210615.7169.0.adeba206 (#10028)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-22 17:44:18 +02:00
Gary Verhaegen
e12a449c81
s/DABL/Daml Hub/ (#10062)
It's been long enough.

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-21 16:37:17 +02:00
Moritz Kiefer
997a7d449c
Use symlinks on Windows (#9969)
changelog_begin
changelog_end
2021-06-11 16:06:06 +00:00
azure-pipelines[bot]
15f9dfb963
update compat versions for 1.14.0-snapshot.20210602.7086.0.f36f556b (#9900)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-07 12:58:31 +02:00
Remy
7bc925e4d2
LF: Factorize the logic for AST lookup (#9871)
Factorize the logic for AST lookup in
 - compiler 
 - type checker 
 - preprocessor
 - script triggers 
 - some tests

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-03 13:32:56 +02:00
Stefano Baghino
c0fccfc671
Switch Scala version Bazel config (#9848)
* Switch Scala version Bazel config

changelog_begin
changelog_end

This allows to easily test with Scala 2.12.x locally. The `scala_2_13` Bazel
configuration is no longer needed becase now Scala 2.13.x is the default.

* Address https://github.com/digital-asset/daml/pull/9848#discussion_r642381690
2021-05-31 10:50:54 +00:00