Commit Graph

9464 Commits

Author SHA1 Message Date
Sofia Faro
85c4ea0b5c
LF spce: Make controller/observer errors fatal (#13192)
changelog_begin
changelog_end
2022-03-08 12:32:10 +00:00
pbatko-da
37c645333f
Use an error code when AkkaGrpc services get closed (#13175)
changelog_begin
Ledger API Specification: Streaming endpoints will use error code 'SERVER_IS_SHUTTING_DOWN' when the server
is being shut down, whereas before an exception without an error code was used.
Grpc status code in use remains 'UNAVAILABLE'.
changelog_end
2022-03-08 12:48:22 +01:00
Sofia Faro
190fd2487c
LF: Add interface preconditions to spec (#13173)
* LF: Add interface preconditions to spec.

Part of #11349

changelog_begin
changelog_end

* two should be True

* Incorporate remy suggestion
2022-03-08 10:11:54 +00:00
Simon Maxen
ecb5c1b7d4
Rename SqlExecutor to DbDispatcher (#13184)
changelog_begin
changelog_end

report health
2022-03-08 09:00:14 +00:00
azure-pipelines[bot]
5e8284003e
update NOTICES file (#13186)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-08 08:25:06 +00:00
Robin Krom
878754e9ac
interfaces: tests: no interfaces below 1.dev (#13179)
We add a check for the decoder that tests that implementations in
templates are only accepted in 1.dev.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-07 21:26:39 +00:00
Robin Krom
17e651c20a
release instructions: fix line numbers (#13162)
line numbers seem to have changed because of an added comment.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-07 21:48:57 +01:00
Moritz Kiefer
e44b6ef61f
Switch daml script multi-participant tests to Canton (#13171)
* Switch daml script multi-participant tests to Canton

ledger-on-memory is moving repos together with kvutils so this doesn’t
work anymore. Sandbox on X does not (yet) have multi-participant
support so this is our only option.

At a later point, we may want to switch back to sandbox on x once it
supports multiple participants.

changelog_begin
changelog_end

* more startup attempts

changelog_begin
changelog_end
2022-03-07 20:34:17 +01:00
Remy
d5471076ad
Speedy: Factorize fetch part between fetch by template and by itnerface (#13148)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-07 20:32:47 +01:00
Sergey Kisel
235254998f
Fix debug logging in ApiTransactionService (#13174)
* Fix debug logging in `ApiTransactionService`

changelog_begin
changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-07 18:29:33 +01:00
nickchapman-da
9e71184582
Thorough stack-safety testing for all speedy compiler phases. (#13168)
changelog_begin
changelog_end
2022-03-07 15:53:35 +00:00
pbatko-da
c7c211e4df
Remove most of ErrorFactories [DPP-606] (#13146)
changelog_begin
changelog_end
2022-03-07 16:15:21 +01:00
Stewart Stewart
0a52e56ca1
Make http.domain a package (Fixes #11151) (#13164)
Use a package instead of object for organization so the namespace
remains open. Note that in Scala 3, the val/type aliases in this diff
can become export statements.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Stewart Stewart <stewart.stewart@digitalasset.com>
2022-03-07 09:44:31 -05:00
Victor Peter Rouven Müller
fdb5cdae0a
[JSON-API] Normalize token parsing & remove custom parsing code (#13161)
* Normalize token parsing & remove custom parsing code

changelog_begin

- [HTTP-JSON] custom claim tokens without ledger id are now correctly recognized as such and not as user tokens

changelog_end

* Add test to check that tokens without ledger id work correctly

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

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

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

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

* Remove the overload of jwtForParties & change how the wihtoutNamespace JWT is constructed

* Remove unnecessary code line

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-07 13:35:37 +01:00
azure-pipelines[bot]
7ce81173c1
update NOTICES file (#13167)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-07 07:05:03 +00:00
tudor-da
1f1e50514b
Latency test implementation in LedgerApiBenchTool [DPP-947] (#13150)
* Latency test implementation in LedgerApiBenchTool

changelog_begin
changelog_end

* Addressed review comments
2022-03-04 18:53:10 +01:00
Gary Verhaegen
53557dd7de
shut down ElasticSearch (#13151)
The cluster shuts down about once every two weeks and takes a couple
hous to get back up. It's been off for a few days right now and as far
as I'm aware nobody noticed.

My personal assessment is that this is costing us more in maintenance
(not to mention running) costs than what we're getting out of it.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 17:14:15 +01:00
azure-pipelines[bot]
247ec1150e
rotate release duty after 2022-03-02 (#13119)
@robin-da is taking care of testing today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-04 14:29:03 +01:00
Gary Verhaegen
54dc19deb8
add release instructions to release notification (#13160)
Because we can't expect people to magically know where to find them.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 11:33:15 +00:00
pbatko-da
15aa300fba
Use DamlContextualizedErrorLogger.forTesting (#13137)
changelog_begin
changelog_end
2022-03-04 12:24:08 +01:00
Gary Verhaegen
0002b7ebae
guard nightly (#13158)
In some cases we may end up with the tip of the main branch built as a
split release manually. When Azure then tries to run it, the release
fails (typically on the upload to NPM step).

Normally, Azure is set to run this only once per commit, but that only
applies when the run is successful. So if it breaks in a reproducible
way (e.g. because the version already exists on NPM), Azure will keep
trying every day.

This PR adds a simple guard that makes the nightly build _not_ a release
commit if the reelease already exists, which should short-circuit most
of the jobs in the build and finish successfully.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 11:16:01 +00:00
azure-pipelines[bot]
2c50f9e75c
update NOTICES file (#13155)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-04 09:46:54 +00:00
pbatko-da
af27f5d926
Make ErrorFactories into an object in preparation for its removal. [DPP-606] (#13143)
changelog_begin
changelog_end
2022-03-04 09:35:38 +01:00
pbatko-da
e6db32719b
[User management] Rename --max-users-page-size flag to conform to established pattern [DPP-944] (#13130)
changelog_begin
changelog_end
2022-03-03 23:09:20 +01:00
pbatko-da
56306eb387
[User management] More race condition tests. Simplifications in the backend. (#13140)
changelog_begin
changelog_end
2022-03-03 22:48:11 +01:00
Remy
3e3fccacfd
LF: Make exceptions in choice's controller/obervser uncatchable (#13106)
fixes #13099

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-03 18:37:12 +01:00
Brian Healey
7c8221e931
Upgrade akka_http version to 10.2.8 (#13149)
CHANGELOG_BEGIN
Upgrade akka_http version to 10.2.8
CHANGELOG_END
2022-03-03 17:15:14 +00:00
Victor Peter Rouven Müller
0dc167fa48
[JSON-API] Remove dependency on user provided tokens for the perf runner & refactor main (#13114)
* Don't error when user tokens are provided for the perf runner

changelog_begin
changelog_end

* Better token parsing error handling & extract user id to allocate the user if so

* make the code prettier

* Fix & simplify token parsing

* fix formatting of bazel file

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>

* correctly handle the response of createUser & don't throw if no LedgerId was found in the token

* Wrap exceptions in Futures

* Refactor Main.scala of the perf runner completely & remove dependency on user provided JWT's

* Minimize diff

* simplify code further

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

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

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

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

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

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

* Fix build

* Don't pass a jwt to the perf runner anymore everywhere it was used & fix ledger id to be right

* Minimize diff

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-03 16:12:40 +00:00
Kamil Bozek
825bf08846
Fix executor future scheduling [DPP-945] (#13138)
* Run Engine execution in a provided ExecutionContext

CHANGELOG_BEGIN
CHANGELOG_END

* Remove the workaround
2022-03-03 17:06:45 +01:00
Sofia Faro
b2d6f8014c
LF: Use template parameter (this) in method bodies. (#13142)
* Use `this` param in method bodies in LF.

Instead of having method bodies be functions from the template, have them reuse the existing template parameter (usually `this`).

Fixes #13123

changelog_begin
changelog_end

* fix validation-test
2022-03-03 13:50:59 +00:00
Moisés Ackerman
7ca26b01ce
make interface declaration where optional (#13129)
* Extend InterfaceSyntax test file with interfaces declared without 'where'

changelog_begin
changelog_end
2022-03-03 11:09:56 +00:00
pbatko-da
a84c2cd68f
Add tests and use ErrorDetails.matches (#13139)
changelog_begin
changelog_end
2022-03-03 09:33:37 +01:00
azure-pipelines[bot]
6fd6fefce7
update NOTICES file (#13141)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-03 09:24:29 +01:00
pbatko-da
96029b7cf3
[Docs] Expand User Management service section (and remove a duplicate section) [DPP-943] (#13108) 2022-03-02 18:59:40 +01:00
Hubert Slojewski
9881e7c64f
Remove ledger-on-sql [KVL-1350] (#13124) 2022-03-02 17:05:12 +01:00
Moisés Ackerman
2dbd91aab9
Interface methods can use plain function declaration syntax (#13102)
* Update 'implements' blocks to use new syntax

* Add InterfaceSyntax test case

* Add InterfaceMultipleMethodDeclsError test case

* Add InterfaceDifferentNumArgsError test case

changelog_begin
changelog_end
2022-03-02 15:59:01 +00:00
Moritz Kiefer
7acc6a9009
Pipe hpp through package_app (#13128)
This is needed so shared libraries are properly resolved and this
actually works outside of our build. Same issue that broke
damlc_legacy originally and we had someone trying to use cpp on their
own project (whether they should is another question but having it
half working is even worse).

I don’t know how to write a test for this unfortunately. It would only
fail if our nix store is not available which is pretty hard to
simulate. I could spin up a docker image or something but that doesn’t
seem worth the trouble.

fixes #13100

changelog_begin
changelog_end
2022-03-02 16:04:12 +01:00
Bernhard Elsner
140360fa0c
Fix a few docs redirects (#13126)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-02 15:16:56 +01:00
Robert Autenrieth
7fc1cd2441
DPP-931 Resolve testing uncertainties (#13109)
* Address todos

changelog_begin
changelog_end

* Fix test

* Reverse bad change
2022-03-02 13:00:42 +01:00
Stefano Baghino
f5c4755b76
Improve docs of auth middleware and trigger service (#13111)
* Improve docs of auth middleware and trigger service

changelog_begin
changelog_end

Fix #13049
Fix #13048

Several improvements to the documentation for these two services. The main aim was
to add, where needed, references to the new user management service. Ultimately,
only the auth middleware really needed to add a note about it, since to the trigger
service this is (so far) completely transparent.

For the rest, I took advantage of the chance to polish the docs a bit and make a few
improvements (that I will describe more in depth in a self-review).

* Prevent copy-pasting drama.

Thanks @S11001001

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

* Address https://github.com/digital-asset/daml/pull/13111#discussion_r816967559

* Address https://github.com/digital-asset/daml/pull/13111#discussion_r816970609

* Address https://github.com/digital-asset/daml/pull/13111#discussion_r816973727

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-02 11:51:58 +00:00
Sofia Faro
8075a64f7f
LF Spec: Add interface expressions (#13103)
* LF Spec: Add interface expressions

This PR adds type rules and operational semantics for interface
expressions (including updates). The only thing I haven't added yet is
the operational semantics for exercise interface, and the operational
semantics for interface preconditions.

changelog_begin
changelog_end

* typo

* spurious duplicate

* minor edits

* review suggestions
2022-03-02 11:20:07 +00:00
Moritz Kiefer
6bb74786b9
Document docs HEAD build (#13121)
I used that script a few times myself and had a few people ask for it
so lets document it.

changelog_begin
changelog_end
2022-03-02 10:32:00 +01:00
Raymond Roestenburg
e4d05e7924
Notes for macOS setup of Nix in the main README. (#13051)
* Notes for macOS setup of Nix.

* Some more notes on importing a project in Intellij.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-02 09:49:12 +01:00
azure-pipelines[bot]
4ca3fe73b4
update NOTICES file (#13120)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-02 08:16:40 +01:00
tudor-da
681b584292
Move unit tests to corresponding implementation package (#13117)
changelog_begin
changelog_end
2022-03-02 05:21:16 +01:00
Gary Verhaegen
091a5ac752
appr: add Stewart (#13116)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-01 23:11:54 +00:00
Moritz Kiefer
de21dbf1ae
Release SDK 2.0.0 (#13110)
changelog_begin
changelog_end
2022-03-01 19:06:51 +00:00
tudor-da
ea48173350
Switch daml-lf/engine and leger-api-tests/tool not depend on kvutils (#13107)
changelog_begin
changelog_end
2022-03-01 15:41:12 +01:00
tudor-da
6da1cde1b3
Simplify IndexService hierarchy [DPP-932] (#13043)
* Squash LedgerBackedIndexService, SpannedIndexService and MeteredReadOnlyLedger
into ReadOnlyLedgerImpl

changelog_begin
changelog_end

* Rename ReadOnlyLedgerImpl to IndexServiceImpl

* Metrics cleanup
* Remove redundant metered layer stemming from MeteredReadOnlyLedger

* Simplified getLedgerId

* Addressed Marton's review comments
2022-03-01 14:30:30 +01:00
Victor Peter Rouven Müller
e1ccc2f4f4
duplicate json-api tests for full-lifecycle user token testing (#12922)
* WIP

* First version that compiles (with debug print statements)

* Revert changes on the failure tests

* Make all tests pass with some major cleanup of the new code

* Remove debug prints & outcommented code

* Make decoding / encoding test also compatible with user token tests

changelog_begin
changelog_end

* Minimize diff

* Fix oracle tests

* leave note for followup

* Update ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-01 11:05:58 +00:00