@aherrmann-da is taking care of 1.14.0-snapshot.20210525.7017.0.2710fad0 (#9794), so they get pushed back to the end of the line.
Please do not merge this before #9794.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Add reference docs for exceptions
Not that these are reference-style docs so they are deliberately brief
and don’t focus on usecases. I’ll add a section to the Daml intro for
that in a separate PR.
changelog_begin
changelog_end
* Apply suggestions from code review
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* review comments
changelog_begin
changelog_end
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Parallelize daml-assistant integration tests.
This mainly involves avoiding changing the working directory or the environment while inside tests.
AFAIK the daml start tests can't be parallelized without starting up a sandbox instance each time, which seems bad. These tests could be separated from the rest...
The magic number "2" was picked via experimentation:
```
1 threads -> 306 s
2 threads -> 199 s
3 threads -> 198 s
4 threads -> 195 s
```
changelog_begin
changelog_end
* buildifier-fix
* Fix missing microseconds
* More lenient error string matching
* Fix typo
* Fix ledger time tests
Previously, the computed blinding info
did not contain any divulgence, which lead to
no divulgence events being stored.
* Implement JdbcLedgerDao tests for the append-only schema
changelog_begin
changelog_end
* Apply review comment
* Simplified metrics names
* Metrics returning domain values instead of formatted strings
* Always returning metric Value objects with possibly optional contents
* Use the new metric Value classes
* Remove the old metric reporting mechanism
* CHANGELOG_BEGIN
CHANGELOG_END
* Fixed 2.12 build
* Removed random generators from metric tests
* Fixed 2.12 build
* Improved readability of the size metric calculation
* Minor change
* `ledger-api-bench-tool`: max consumption delay SLO [DPP-400] (#9785)
* ServiceLevelObjective trait
* Added copyright to a new file
* A model for combining metrics and objectives in type families
* Mechanism for returning metric violation information
* Return error code when SLOs violated
* Use type parameter for the result of transaction service methods
* max-delay command line parameter for the max delay SLO
* Logging violated objectives in the final report
* Simplified size rate metric value
* CHANGELOG_BEGIN
- [Integration Kit] - ledger-api-bench-tool - new parameter max-delay for specifying the service-level objective for max delay
CHANGELOG_END
* Fixed tests
* Simplified MetricsManager.Message trait
* Fixed build errors
* Changed objectives violated message
* Removed DelayObjective trait
* Comments improvement
* Ordering for MaxDelay.Value
* Removed redundant method from the ServiceLevelObjective trait
Note that it only has rules for normalizing `create` and `exercise`, but that's because the LF spec only has `create` and `exercise` actions for now.
changelog_begin
changelog_end
* Normalize rollbacks: first draft
CHANGELOG_BEGIN
CHANGELOG_END
NormalizeRollbackSpec, WIP
WIP2
adapt to asVersionedTransaction
first stab at traversal for normalize-rollbacks... implement normalization rule #1
adapt existing testcase for rollback normalization rule #1
pluralize spec filename
temp disable rollback normalization
methodically test normalization rule #1
lots more tests
spec: check all 3 norm conditions
cleanup test/Shape code a bit
implement normalization rules #2 and #3 (using canonical types) and enable tests
add some comments and some 8020 todo markers
* add 2 more testcases from Sofia
* ensure tx produced when normalizing rollbacks has increasing node-ids when listed in pre-order
* enable rollback normalization in interpreter
* manage state functionaly for the created tx (counter & node-map)
* un-nest sub defs from normalizeTx (we can because we removed the mutable state)
* rename: force* --> push*
* introduce CPS for push functions
* introduce trampolines for push functions to be stack safe
* one more bounce
* ensure generated node-ids start from 0
* test that transaction node-ids start from 0
* add commets about pass1/2; move makeRoll (part of pass 1) earlier in file
* intro CPS for pass-1 over original tx
* intro trampolines for pass-1. everything is stack safe now
* clarify comment
* remove make stack-safe todo
* be more private
* factorize/share Trampoline implementation with previous implementation in speedy.Anf
* prefer Vector over List, for better algorithmic complexity
* make Trampoline private to lf
* new perf test module LargeAcs to shift many-contract creation to Daml-side
* using MakeIouRange to make blocks of (more or less constant) Ious
* syntax and bad variable quasiquoting
* ACS data distribution plans
* run with 100k contracts, same template, 1% observer frequency
* use CanAssert instead of CanAbort
* query under proper alternative jwt
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* make sure the database accurately represents the ACS
* Update LF spec for exceptions.
The changes here are:
* Removing the built-in exception types
* Changing the result in the operational semantics to include both an "exception thrown" case and a "fatal error" case.
* Cleaning up the semantics of create/exercise/etc and try/catch.
Not included in this PR is anything to do with built-in arithmetic exceptions. There's room to add it in the future (as a value of AnyException type), but I would do it in a follow-up PR.
changelog_begin
changelog_end
* finish renaming Throw cases
* Update type ordering for AnyException.
* Make succ/pred throw an ArithmeticError on overflow.
Part of #8020.
This is the only remaining case in daml-prim & daml-stdlib where it seems correct to me to throw a different exception type rather than `GeneralError`.
changelog_begin
changelog_end
* Fix Enum
* Add ledger API test tool tests for rollback projections
This adds 3 tests for projections under rollback nodes.
The first one is relatively clear hopefully and tests divulgence.
The other two are a bit more intricate. For both of those we can also
not test too much via the ledger API since we don’t actually get
access to rollback nodes. However, it still seems useful to at least
exercise those code paths and make sure they don’t do anything
horribbly wrong.
The second test tests the normalization rules from
https://github.com/digital-asset/daml/blob/main/docs/source/concepts/ledger-model/ledger-exceptions.rst#privacy
The last one tests a more complex structure with deeply nested
rollback nodes and different informees.
changelog_begin
changelog_end
* Update ledger/test-common/src/main/daml/semantic/Exceptions.daml
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Make use of nameOf for naming telemetry traces in participant-integration-api
changelog_begin
changelog_end
* Add copyright header to Telemetry.scala
* Add a simple nameof macro lib which has one function to return the fqn of the current method
* Make use of the new nameof lib within the repo to shorten the code further
* Remove old dependency on nameof macro
* Readd lines which have been accidentally removed
* Pretty print daml.yaml in Daml ledger export
changelog_begin
changelog_end
* Use dynamic port in example-export generation
* Add daml.yaml to Daml ledger export golden test
* Sort data-dependencies for reproducibility
* Replace hashes in data-dependencies with a placeholder
To avoid test failure when any of these change.
* normalize data-dependencies path in scala client
So that the bazel build action is more reproducible itself.
* Fix Scala 2.12 build
* Factor out deleteRecursively
changelog_begin
changelog_end
* Generate ledger export in temp-dir
Build actions are not sandboxed in Windows. The ledger export will also
created a directory `deps` to store all the DALFs in. On Windows this
directory may persist across Bazel builds and may cause errors due to
attempts to overwrite an existing directory.
To avoid these issues the ledger export is generated into a temporary
directory and only the wanted files are moved to the expected output
locations in the bazel execroot afterwards.
* Close source
* Use replace instead of replaceFirst
The latter matches regex pattern instead of just substring matching
which fails with Windows paths due to `\` being interpreted as an escape
character.
* Normalize Windows \ to Unix /
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
As everyone knows that has worked on the ledger API test tool, diffx
makes compilation very very slow (>150s for TransactionServiceIT).
As some people (myself included) know, trying to get diffx to not be
slow is also a giant nightmare (have fun debugging mutually recursive
implicits derived by Scala macros)
So this PR takes a different approach:
Drop diffx completely and replace it by munit. This leads to slightly
different diffs but I think they’re close enough and importantly munit
involves absolutely no macros for those diffs so compilation takes 5s
for TransactionServiceIT.
changelog_begin
changelog_end
* 2 seconds rather than 250ms for default hikari connection pool timeout
CHANGELOG_BEGIN
[jdbc ledger] increase default hikari connection pool timeout to 2s from 250ms
CHANGELOG_END
* extract hikari connection timeout configuration
* default of 250ms
* read hikari connection timeout default from config rather than hardcoding for sandbox next
* remove unused import
By relaxing the assertion to two possible GRPC error codes.
Also adds dependency of libs-scala/grpc-utils to test suites.
changelog_begin
changelog_end
Each of these installations is about 1gb so it’s not that unlikely
that this plays a significant factor in our out of disk space errors.
Although I think we cleanup partially so I’m not sure how large the
part of the SDK installation is that gets leftover.
changelog_begin
changelog_end