* restate the submit stage as a Flow and derived Sink
* take submit out of the trigger-to-submit flow
* type for the failures produced directly by command submission
* directly connect the msgSource failure queue to the submitter output
* parens
* slow down submission as we exceed max parallel submissions
* restricting alterF so it will be usable with ConcurrentMap
* disable buffer for the delay
* split out the delay function
* drafting a retry loop
* degenerate test for retry loop, factoring the forAllFuture utility
* map input to retrying properly
* make retrying accessible to tests
* test happy path and fix off-by-one
* further tests for retrying
* reveal that elements can get lost
* more determinism in test
* let failures block further elements from being attempted
- Previously failures would go into a separate queue, where they awaited expiry
of their delay and further initial upstream elements were given their first
tries. However, closing the upstream could mean that queue was dropped, and
detecting that situation is not trivial. So, instead, we don't use a separate
queue.
* plug retrying into the trigger submission flow
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* remove throttle; pendingCommandIds may leak
* report random parameter on failure
* revert comment about throttling
* explanation for fail in the error queue
- suggested by @cocreature; thanks
* Add a warning for GHC.Types.Symbol
CHANGELOG_BEGIN
- [DAML Compiler] Added a warning for references to
the GHC.Types.Symbol kind since these cannot be
preserved across data-dependencies.
CHANGELOG_END
* lint
* Address review comments
* fix LFNameCollisions test
* improve LFNameCollisions fix
* Upgrade ledger-api-test-tool-on-canton to the canton 0.19.0 release
- Reflecting changes related to the Community edition of canton
- Testing full ContractKeysIT in a separate canton environment with
unique contract keys. The ability to run multiple canton environments
will come in handy when we introduce the participant pruning test suite.
- Slight canton configuration changes
CHANGELOG_BEGIN
CHANGELOG_END
* Formatting
* Review feedback by Samir
* Fixup
* damlc: fix: relative output path relative to cwd
This fixes#7913. Build output path were considered relative to the
project root instead of the current working directory.
CHANGELOG_BEGIN
CHANGELOG_END
* adding a test
Remove file describing how contract key will be implement. The file
is not usefull as contract key have been fully implemented. Futhermore
the file contains plenty of out of date information.
CHANGELOG_BEGIN
CHANGELOG_END
This PR prepares the change of inference algorithm described #7788
where each node is version independently. This PR associates to each
node of `VersionedTransaction` a version. In the current state, all
nodes are associated to the version of the transaction itself. The
inference algorithm (that will make those versions potentially
distinct) will be implemented in an upcoming PR.
CHANGELOG_BEGIN
CHANGELOG_END
* oauth error response
* oauth server parties parameter
* implement request denial in oauth test server
* Test oauth test server for access denied
* test unauthorized party on auth middleware
* Handle OAuth2 login flow error response in auth middleware
* Forward login error to auth middleware client
* fmt
* fix server test
* fmt
* Handle login failure in trigger service
* Test unauthorized trigger start
* Cleanup authCallback
* Update authentication specification
- The auth middleware accepts an arbitrary callback URI on /login
- The auth middleware will forward OAuth2 authorization failures to the
client service.
changelog_begin
changelog_end
* Update triggers/service/authentication.md
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This PR fixes two bugs in the type checker:
- Fetch are now rejected if the type constructor does not match a
template
- to_any, from_any, and type_rep are now rejected if the type
parameter contains synonyms.
Additionally, this PR adds the type of the validation error that each
test case should throw in the test that ill formed expression are
properly rejected. In the way we fix some wrong test cases.
CHANGELOG_BEGIN
CHANGELOG_END
* daml ledger: implementation of ledger commands
Implementation of the remaining daml ledger commands via HTTP JSON
service endpoints instead of gRPC.
Fixes#4824 .
CHANGELOG_BEGIN
[daml assistant] `daml ledger` commands can now also be run against the JSON API instead of the gRPC API.
CHANGELOG_END
* damlc: Check DAML-LF pattern matches for exhaustiveness
`damlc` has always produced exhaustive pattern matches in DAML-LF since
GHC adds a default branch with a call to `error` message as soon as a
pattern match is not exhaustive. It was a complete oversight on our
side that we did not enforce this properly in DAML-LF. Since `damlc`
has never produced non-exhaustive pattern matches, enforcing this now
and for all DAML-LF versions is only theoretically a breaking change,
namely if people hand-crafted DAML-LF, but not practically.
This check is as under-tested as the rest of our Haskell implementation
of the DAML-LF type checker. Well, all our other tests implicitly check
that the type checker does not give false errors. However, we have no
tests ensuring that the type checker is not too permissive. Fixing this
situation would require a big time investment since we currently don't
have a simple way to produce DAML-LF without going through GHC, which
will always produe well-typed DAML-LF.
I will update the DAML-LF specification wrt pattern matching
exhaustiveness in a separete PR.
This PR does not have a changelog entry since there's no impact for our
users.
CHANGELOG_BEGIN
CHANGELOG_END
* Make check linear in match size not constructor number
CHANGELOG_BEGIN
CHANGELOG_END
* Move lookupWithIndex in Data.List.Extended
CHANGELOG_BEGIN
CHANGELOG_END
* Implement the suggestions
CHANGELOG_BEGIN
CHANGELOG_END
* assistant: prompt users to automatically update PATH
We ask the Max/Linux users on installation if we should update their
PATH environment variable to point to the assistant binary and
automatically do so when the answer is affirmative.
CHANGELOG_BEGIN
CHANGELOG_END
* set .profile insetad .bashrc
* add a case for sh
* fix tests
CHANGELOG_BEGIN
CHANGELOG_END
* use imports only on nix systems
* update windows updatePath function for YesNoAuto flag.
CHANGELOG_BEGIN
CHANGELOG_END
* Validations for state updates, indexing, --skip-byte-checking
CHANGELOG_BEGIN
CHANGELOG_END
* Document new integrity checker options
* Remove v2 from the bazel target in README
* Address some review comments
* Refactor integrity checker into published "tools" lib + binary
CHANGELOG_BEGIN
CHANGELOG_END
* Refine split
* Refactor integrity checker into published "tools" lib + binary
CHANGELOG_BEGIN
CHANGELOG_END
* Refine split
* Add --index-only, --jdbc-url and --full-metrics support to IntegrityChecker
CHANGELOG_BEGIN
CHANGELOG_END
* Tidy up
* Tidy up
* Address review comments
* Code tidying (do not inject config just the variable needed, better readability for multi-line if/else).
* Address review comments
Co-authored-by: Miklos Erdelyi <miklos.erdelyi@digitalasset.com>
Note: this file is meant to represent the content on [Docker Hub], but
syncing is currently a manual process. I will propagate once this is
approved and merged.
[Docker Hub]: https://hub.docker.com/repository/docker/digitalasset/daml-sdk
CHANGELOG_BEGIN
CHANGELOG_END
* Document new integrity checker options
* Remove v2 from the bazel target in README
* Refactor integrity checker into published "tools" lib + binary
CHANGELOG_BEGIN
CHANGELOG_END
* Refine split
* Release tools lib
* Generalize IntegrityChecker.run
* Use glob for test source definition
* Widen glob for tools-tests to all (future) tool tests, not just integritycheck
* Simplify test source globs
* Simplify tools lib source glob
* Fix build
* Remove export.v2
* Validations for state updates, indexing, --skip-byte-checking
CHANGELOG_BEGIN
CHANGELOG_END
* Tidy up
* Skip non-log entries when processing updates
* Tidy up
* Tidy up
* Tidy up
* Document new integrity checker options
* Remove v2 from the bazel target in README
* Tidy up
* Address review comments
* Add LogAppendingReadServiceFactorySpec
* Fix header
* Generalize IntegrityChecker.run
* Export a run utility that can take a parsed Config
* Fix test definition
* Address some review comments
* Add test for KeyValueParticipantStateReader in skipping-non-log-entries mode
* Enable, fix and improve LogAppendingReadServiceFactorySpec
* Tidy up
* Check the trigger dao migrations digest
Following the example of the corresponding ledger on SQL tests.
The digests had to be updated as both of them had gone out of sync.
The init digest presumably due to the change in #7226 and the one for
adding the access token during review of #7890.
changelog_begin
changelog_end
* define abstract migrations test
* Use abstract migrations test in trigger service tests
* use abstract migrations test in ledger on SQL
* Retain check for number of .sql resources
* Factor out the hash-migrations script
* Consistent shell settings
Addressing review comment
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* com.digitalasset.platform --> com.daml.platform in logbacks
* correct some broken running scala test examples
* correct com.digitalasset.platform broken links
CHANGELOG_BEGIN
Correct some remaining package name references to
com.digitalasset.platform in logback and readme file
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* Haskell: Add hlint rule to suggest foldl' over foldl
`foldl` is lazy in a way that almost never is what you want since it
can cause space leaks without any benefit. `foldl'` does not have this
problem. See https://www.well-typed.com/blog/2014/04/fixing-foldl/ for
more details.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix all existing occurrences of foldl
CHANGELOG_BEGIN
CHANGELOG_END
- Exercises' results are checked after the children have been checked.
- output the mismatching nodes in case of comparison failure.
CHANGELOG_BEGIN
CHANGELOG_END
Currently, we're warning that both extensions might not work with
`data-dependencies`. However, we have tests that demonstrate that both
extensions actually do work with `data-dependencies`. Since there's
been customer demand to remove these warnings, we'll do so.
CHANGELOG_BEGIN
[damlc] Don't warn anymore that the language extensions TypeOperators
and UndecidableInstances might not work with `data-dependencies`.
CHANGELOG_END
fixes#7097
changelog_begin
- [Triggers] The trigger service now has a `--port-file` option
matching the corresponding option in the JSON API.
changelog_end
This allows you to write somewhat useful update functions since you
can inspect the transactions. Created and Archived are kept abstract
but we expose fromCreated/fromArchived to interact with them.
fixes#6968
changelog_begin
- [DAML Triggers] The `Daml.Trigger` module now reexports `Event`
which avoids having to import `Daml.Trigger.LowLevel` for implementing
a non-trivial `updateState` function.
changelog_end
* Bump timeouts in build-and-lint’s
We’ve seen some timeouts on CI so let’s bump everything to 100ms and
see if that fixes it. If it doesn’t, we can increase those 100ms as well.
changelog_begin
changelog_end
* Fix race on registering open event
changelog_begin
changelog_end
Limiting this to a single one makes little sense and while you can
work around it by uploading more packages, that can be annoying during
development.
fixes#6332
changelog_begin
- [Triggers] The trigger service now accepts multiple `--dar`` options.
changelog_end
The packaging test suite has become just so big that it regularly
exceeds its 15 min timeout. There are some deeper issues here, for
instance that we set up tons of tiny DAML projects and call
`daml build` on each of them. Each of those builds initializes a
package database, which is one of the things that seem to take
noticable time. Unfortunately, fixing these issues is a bigger effort.
This PR is more of a band aid rather than a proper solution: split the
packaging tests into two parts: the packaging tests and the tests for
data-depenendencies. Effectively, this amounts to giving the old
packaging test suite a 30 min time budges, but at least the two parts
can now be run in parallel.
CHANGELOG_BEGIN
CHANGELOG_END
* Test all four trigger service configurations
- non-authenticated with in-memory backend
- non-authenticated with database backend
- authenticated with in-memory backend
- authenticated with database backend
changelog_begin
changelog_end
* add access token to trigger dao
* Simplify readRunningTriggers
* fmt
* Rename V2__Add_access_token.sha25 to V2__Add_access_token.sha256
* Apply suggestions from code review
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Getting a pattern match failure here if you accidentally pass in an
archived contract is a bit cruel and now that this is DAML Script
where we can handle the failure, we can do better.
changelog_begin
changelog_end
* DALF Reader: Refactor decoder environment
Currently, the module to be decoded is part of the decoder environment.
This turned out to be unpleasant during my attempts to implement
interning for types since decoding the type interning table does not
happen in the context of a module.
This PR moves the module out of the decoder environment and passes it
to the decoder function for modules directly. Unfornatunately, we still
need to keep the module name in the environment since that is used as a
default when decoding location information. We solve this problem by
making the module name in the environment optional and always filling
it in when decoding in actual module.
CHANGELOG_BEGIN
CHANGELOG_END
* Adapt tests
CHANGELOG_BEGIN
CHANGELOG_END
* Follow Remy's suggestion
CHANGELOG_BEGIN
CHANGELOG_END
* Make HealthService public
DABL patches the rest adapter so making this public helps them plug it
together with other things.
Also removes some garbage debug print which I forgot to remove
🤦
changelog_begin
changelog_end
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/HealthService.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* No logging
changelog_begin
changelog_end
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Separate trigger service test fixture
Define a dedicated fixture per resource instead of generating all
resources in a single fixture function. This allows to control the
lifetime of resources individually.
Reuse the same sandbox and toxiproxy and auth middleware for the test
suite instead of restarting new resources for each test case. This is to
reduce overall test runtime.
changelog_begin
changelog_end
* fix exec context
changelog_begin
changelog_end
* Use owned resources where appropriate
Avoid Await result and use owned resources instead.
* Reduce test timeout
* Be more patient for Windows
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* assistant tests: Testing hot-reload
This adds a test to the assistant integration tests for testing the
hot-reload feature.
CHANGELOG_BEGIN
CHANGELOG_END
* hlint
This PR drops support for Transaction version 1 to 9. This is a
breaking change that may affect only ledger created with a pre SDK
1.0.0. No Sandbox-based ledger is affected by this change.
This advances the state of #7788
This breaking change was approved by the architecture committed.
CHANGELOG_BEGIN
CHANGELOG_END
* LF: Rotate type checking of case expressions by 90 degrees
This reproduces changes made to the Haskell type checker (in #7873)
into the Scala type checker.
CHANGELOG_BEGIN
CHANGELOG_END
Currently, the Haskell implementation of the DAML-LF type checker
first branches on the pattern and then on the type of the scrutinee.
This PR changes it to first branch on the type of the scrutinee and
then on the pattern. This allows for destructing the type of the
scrutinee only once intead of repeating it for each pattern. This
should be good for performance, which is a nice side effect of this
change.
The main reason why I'm changing this is because we want to implement
an exhaustiveness check. This seems rather complicated to achieve with
the current implementation and will be significantly easier after this
change.
This PR is purely a refactoring and does not change the semantics of
amnything. In particular, it does not touch the decision that default
patterns match on anything, even no other pattern would match on the
value.
CHANGELOG_BEGIN
CHANGELOG_END
There is no other way to test this code than to make a release. This is
expected to be identical to 1.7.0-snapshot.20201103.5565.0.e75d42dd,
with the version number being the only difference.
CHANGELOG_BEGIN
CHANGELOG_END
Although I _really like_ making releases, particularly the testing on Windows, I think it's only fair if I don't have all of them for myself but share them with the team.
CHANGELOG_BEGIN
CHANGELOG_END
Nobody should be using it anyway, but at least now they can trust it's
from us. If they bother to check.
CHANGELOG_BEGIN
- The SDK Docker image is now signed. Reminder: this is a dev-only
image, with absolutely no support for any kind of production use-case.
To verify the signature, use the `docker trust inspect` command.
You can also set the `DOCKER_CONTENT_TRUST` environment variable to 1
to instruct Docker commands to only pull and run signed images. Keep
in mind, however, that this only checks that there is a signature, not
that the signer is who you expect it to be. For optimal security, you
should manually check the signature once with `docker trust inspect
--pretty` and then pin the image hash rather than relying on tags.
The expected output of the `docker sign inspect` command should
mention a signer named `automation` with a public key ID matching
533a6e09faa512f974f217668580da1ceb6aa5b00aad34ea1240afc7d249703f
(note that the `--pretty` output only shows the first 12 chars) and a
repository key matching
f5dc2aee6aed2d05d7eda75db7aa2b3fac7fc67afbb880d03535d5a5295a0d3b.
CHANGELOG_END
We only expose the DAML values to users which don’t depend on this, so
we might as well avoid the unnecessary costs associated with verbose
mode especially since those are expected to increase in the
foreseeable future.
changelog_begin
changelog_end