Turns out bash is hard and I’m stupid :sadpanda:
We need to write thoutput to stderr, otherwise this ends up in the
JSON output which obviously is not valid JSON.
changelog_begin
changelog_end
We changed the patch to target more than one file which made the
checkout insufficient for restoring the state and then the following
git checkout of current fails with:
```
error: Your local changes to the following files would be overwritten by checkout:
stack-snapshot.yaml
```
A git reset --hard should make sure everything gets reset.
changelog_begin
changelog_end
* ledger-on-memory: Don't bother with fingerprints.
Instead, just compare values during post-execution.
This has no semantic change, as the "fingerprints" were simply the
serialized bytestrings of the DAML state values. We now just compare the
DAML state values instead.
This change also removes fingerprints entirely from the kvutils code.
Ledgers that use fingerprinting can (and already do) can transform the
state values to include those fingerprints, if necessary.
CHANGELOG_BEGIN
- [Integration Kit] kvutils no longer supports fingerprints directly.
Instead, if the ledger fingerprints the code, you can use the newer,
more generic APIs to transform the state values to include those
fingerprints, if necessary.
CHANGELOG_END
* kvutils: Make `PreExecutingSubmissionValidator` non-final.
It doesn't have a corresponding interface/trait, and it's useful to be
able to mock it.
* hotreload: archive active contracts
Fixes#8162. This archives all active contracts on the ledger when a
hotreload is performed. A hidden command `reset` is added to `daml
ledger` to perform the reset against a running sandbox.
CHANGELOG_BEGIN
CHANGELOG_END
* don't reset when no parties are allocated
* hlint
* reuse tokenFor
* remove unused imports
* add applicationId to token
* remove readAs field from command
* use uuid as cmdId
* remove token from reset command
* batch cmds in size of 100
* remove comment about todo, remove readAs from token
* Make middleware callback URI configurable
changelog_begin
changelog_end
* Make trigger service callback URI configurable
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Also disables auto-install on Windows, since installation-related
errors range from "simple error message" to "program hangs forever",
and users can bypass "daml install" by downloading the new installer.
changelog_begin
- [DAML Assistant] The update-check is disabled by default for
newer installations. In addition, auto-install is disabled by
default on Windows. See here for instructions on how to
configure these settings manually: https://docs.daml.com/tools/assistant.html#global-config-file-daml-config-yaml
changelog_end
* Shutdown the GrpcServer and LedgerClient, even if there are active subscriptions.
* Shutdown ledger client in navigator integration test.
* When shutting down GrpcServer, await termination for 1 second to give the reset service time to gracefully complete an ongoing reset request.
changelog_begin
changelog_end
Today the [perf check failed], but we got no notification of it. I'm not
sure what's happening as I can't reproduce any of it locally: not only
does the `bazel run` command work for me (despite the ghc-lib URL
returning a 404 when I try it manually), I also can't reproduce the fact
that Bash, on CI, doesn't seem to fail on either the `bazel run` error
or the fact that on the next line `cat` tries to access a file that
doesn't exist (for which CI does print the error message).
This PR does two things:
- Add an explicit check that _should_ get Bash to actually fail should
this happen again in the future. It is not a great fix but at least
we'll know if it happens again (to the best of my knowledge today was
the first time we hit this).
- Amend the existing patch we apply on the baseline commit to use the
GCS-hosted ghc-lib packages.
CHANGELOG_BEGIN
CHANGELOG_END
[perf check failed]: https://dev.azure.com/digitalasset/daml/_build/results?buildId=64395&view=results
* Port //daml-lf/data to Scala 2.13
changelog_begin
changelog_end
* factor common ImmArraySeq code to version-agnostic file
- ImmArraySeq itself is agnostic; the 2.12 and 2.13 versions contain
implementation mixins/superclasses for parts that must be specific. The 2.13
version will collapse into the agnostic version when 2.12 support is no longer
desired
* factor common InsertOrdMap code to version-agnostic file
- InsertOrdMap itself is agnostic; the 2.12 and 2.13 versions contain
implementation mixins/superclasses for parts that must be specific. The 2.13
version will collapse into the agnostic version when 2.12 support is no longer
desired
* factor common InsertOrdSet code to version-agnostic file
- InsertOrdSet itself is agnostic; the 2.12 and 2.13 versions contain
implementation mixins/superclasses for parts that must be specific. The 2.13
version will collapse into the agnostic version when 2.12 support is no longer
desired
* factor Map removal
* Move ImmArraySeq back into ImmArray
changelog_begin
changelog_end
* Type assertion instead of symbol
changelog_begin
changelog_end
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Support multi-party submissions in DAML Script over JSON API
changelog_begin
- [DAML Script] Multi-party submissions are now also supported over
the JSON API.
changelog_end
* Fix outdated comment
changelog_begin
changelog_end
* ledger-on-memory: Create type aliases for caches.
* kvutils: Move caching out of the committer and into the constructor.
* kvutils: Move `reader.map` into the conflict detector.
* kvutils: Remove `LogResult` from the `PreExecutingValidatingCommitter`.
By making it covariant, we can just use `Any`, as we don't care about
the actual type.
* kvutils: Pull the state type out of `PreExecutingValidatingCommitter`.
It is now generic over state types.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Let users pass an `Iterable`, not just a `Seq`, to StateReader.
* kvutils: Avoid serializing keys and values except when necessary.
This simplifies the state-reading operations considerably.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Remove knowledge on fingerprints from conflict detection.
Generics forever.
* kvutils: Move FingerprintedReadSet.
* kvutils: Remove the `fingerprint` test helper.
* kvutils: Make equality-based post execution even more generic.
* kvutils: Be less variant in the PostExecutionConflictDetector types.
* Support multi-party submissions in the JSON API
changelog_begin
- [JSON API] Add support for multi-party submissions by allowing for
multiple actAs parties in the token and passing on readAs to the
ledger.
changelog_end
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/EndpointsCompanion.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Update protobuf to throw exceptions directly.
Part of #8020. This PR changes the exception protobuf and AST (Haskell
side) to make exceptions be thrown directly via a primitive expression
(EThrow), instead of wrapping them up via AnyException.
changelog_begin
changelog_end
* Rename MakeAnyException to ToAnyException
* update EToAnyException field names
* Missing stuff
* missing scala case
* Make AnyException unserializable
* reindex protobuf builtins
* meaningless change
* refrobulate
* change pretty
* Remove single-party check
CHANGELOG_BEGIN
- [Ledger API] The ledger API now supports multi-party submissions.
In order to use multi-party submissions, use the new act_as and
read_as fields in submission requests.
CHANGELOG_END
* Remove usage of temporary SubmitterInfo methods
* Fix validator tests
* Fix auth test
* Add multi-party tests to the ledger API
* Fix compile errors
* Improve tests
* Remove temporary single-party method from SubmitterInfo
* Remove temporary single-party method from SubmitterInfo companion object
* Remove temporary single-party method from TxEntry
* Run multi-party submission ITs for ledger-on-memory and ledger-on-sql
* Minor improvement
Co-authored-by: Kamil Bozek <kamil.bozek@digitalasset.com>
* install script: check available disk space
This fixes#6993. We check that /tmp offers enough space to extract the
sdk tarball and fail otherwise. An alternative extraction directory can
be set by setting the TEMPDIR environment variable.
CHANGELOG_BEGIN
CHANGELOG_END
* don't remove user specified directory
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-assistant/get-daml.sh
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* kvutils: Remove fingerprints from the pre-executing validator.
The submission validator doesn't care about fingerprints, it only needs
to know about them in order to discard them from the state value. This
introduces a new typeclass, `HasDamlStateValue`, which can be customized
for various state value types to make submission validation generic.
A little more code for now, but we're setting things up so it can be
deleted later.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Add more comments for `PreExecutingSubmissionValidator`.
* Make choice observers mandatory when available.
This is an invariant of the DAML-LF proto.
The haskell AST allows missing choice observers for any version, because the AST represents what was written in the syntax. However, if we are targeting a new DAML-LF version (>= `featureChoiceObservers`) then `Nothing` is converted to `Just (ENil TParty)` by the haskell encoder (`EncodeV1.hs`) to satisfy the proto invariant.
On the scala side, the decoder (`DecodeV1.scala`) now insists that choice observers are present when_ the version is new. (>= `LV.Features.choiceObservers`).
changelog_begin
changelog_end
* LF: LF encoder generate always choice observer if lf >= 1.dev (#8318)
This is a follow up of #8316.
This advances the state of #7709
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Remy <remy.haemmerle@daml.com>
See [discourse].
[discourse]: https://discuss.daml.com/t/best-practice-for-getting-ledger-state-in-multiple-nested-react-components/1814/3
CHANGELOG_BEGIN
* [JavaScript Client Libraries] When using our React wrapper from
TypeScript, users could end up having to manually reconstruct a
`QueryResult` type for a specific template, leading to code looking
like (assuming a `User` template):
```
const allUser: QueryResult<User.User, User.User.Key, typeof User.User.templateId> = useStreamQueries(User.User);
```
Our codegen will now generate an additional type definition per
template such that the above can be rewritten as
```
const allUser: User.User.QueryResult = useStreamQueries(User.User);
```
Developers using our JavaScript bindings directly (i.e. without taking
advantage of the TS type definitions) are not affected. Existing
(long-form) type declaractions will also keep working.
Note: In order to make this change, we had to move the definition of
the `QueryResult` type from the `@daml/react` package to the
`@daml/ledger` package. However, the `@daml/react` package is still
exporting it as before, so this is a backwards-compatible change.
CHANGELOG_END
@sofiafaro-da is taking care of 1.8.0-snapshot.20201215.5907.0.a6ed34c5 (#8306), so they get pushed back to the end of the line.
Please do not merge this before #8306.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
The previous escaping syntax doesn’t seem to work (after the first
layer you no longer have a variable) and has broken our build
reporting completely.
changelog_begin
changelog_end
* Extract actor system and execution context from request context
* Extract actor system and execution context from request context
* Extract actor system, materializer, and execution context from request context
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
When including commit titles in Slack messages, care has to be taken to
escape what Slack considers [control characters], namely `&`, `>` & `<`.
[control characters]: https://api.slack.com/reference/surfaces/formatting#escaping
CHANGELOG_BEGIN
CHANGELOG_END
We're rotating the nix key used by CI to sign our artifacts. This is step
1: add the new public key.
Step 2 will be to update the CI configuration to use the new key, and
step 3 will be the removal of the old key from this conf file.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Move read set generation to the commit strategy.
* kvutils: Make the submission validator abstract over the read set.
* kvutils: Split post-execution conflict detection from finalization.
* kvutils: Ignore the read set in the post-execution finalizer.
* kvutils: Extract a trait for conflict detection.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Extract out a trait for post-execution finalization.
* kvutils: Generalize the write set in PreExecutingValidatingCommitter.
* kvutils: In submission validation, create the input state once.
* kvutils: Generalize PreExecutingCommitStrategy over keys and values.
* kvutils: Extract KeyNotPresentInInputException to the top level.
* kvutils: Inline type aliases where they're only used once or twice.
* kvutils: Improve naming and commentary around post-execution.
* damlc: Don't warn on ExplicitNamespaces extension
Since we allow the `TypeOperators` extension, which implies
`ExplicitNamespaces`, there is no point in warning in warning about
the latter.
There's not much to test for this wrt to `data-dependencies` since we
don't reconstruct export lists.
CHANGELOG_BEGIN
damlc: Don't warn on ExplicitNamespaces extensions anymore.
CHANGELOG_END
* Fix a test expecting a warning about ExplicitNamespaces
CHANGELOG_BEGIN
CHANGELOG_END
This is not intended for general consumption.
This reverts the following PRs, in reverse order:
- #8082
- #8146
- #8153
- #8180
- #8194
CHANGELOG_BEGIN
- [Integration Kit] Reverted a fix to the kvutils input state that
caused performance degradation on some ledgers. This is a temporary
measure that we do not expect to be used outside of very specific
circumstances, as it can trade correctness for performance if the
semantics are not completely understood.
CHANGELOG_END
* Do not checkout release commit in scala 2.13
At least for now, this fails because older commits don’t have the
necessary infrastructure so far. At some point we probably do want to
run this on release commits but that can wait a bit and this unblocks
release PRs for bugfix releases.
changelog_begin
changelog_end
* Update azure-pipelines.yml
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
* kvutils: Remove QueryableReadSet, and simplify caching a little.
* kvutils: Generalize the caching ledger state reader.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Make StateReader even more general (no Option).
* kvutils: Convert LedgerStateReaderWithFingerprints to a type alias.
And DamlLedgerStateReaderWithFingerprints too.
* kvutils: Replace LedgerStateReaderWithFingerprintsFromValues.
With LedgerStateOperationsReader and a `.map`.
* kvutils: Replace RawToDamlLedgerStateReaderWithFingerprintsAdapter.
With a `.comapKeys`.
* kvutils: Delete duplicate caching code.
* caching: Move `Cache#get` into its own subtrait.
This method is used by the submission validator, but not by the
caching state readers.
* caching: Move cache mapping from CachingStateReader into Cache.
* caching: Remove an over-eager comment.
* kvutils: Rename `StateReader#comapKeys` to `contramapKeys`.
I got contravariant functors confused with cofunctors.
* caching: Add Scaladoc and improve parameter names in MappedCache.
* kvutils: Adapters everywhere!
* caching: Rename the base test class.