* damlc: incremental package db initialization
We keep a hash over all dependencies of a project in the package
database metadata and only recompute the package database if a
dependency changes, i.e. the computed hash changes.
Fixes#4413.
Fixes#8409.
CHANGELOG_BEGIN
CHANGELOG_END
* using Fingerprint
* added tests
* format
* use SdkVersion instead of hardcoded version
* added a reference in tests
* factored out project file template
* Bump Maven timeouts and retries
Chosen fairly arbitrarily, I don’t have a good idea what sensible
values are but given that we keep running into issues the current ones
are apparently too low.
changelog_begin
changelog_end
* sync up comment with code
changelog_begin
changelog_end
* s/f/0/
changelog_begin
changelog_end
* Add choice observers in the ledger model.
To keep the distinction between "observer" and "choice observer"
clear I'm trying to always refer to the former as "contract observer".
The section on divulgence should probably be reworked to favor choice
observers at some point, but I'm not sure how to do that.
changelog_begin
changelog_end
* s/observer/contract observer
* Separate out the choice observer case of informees
* apply suggestion from @oggy-
* specifying choice observers in DAML contract model
* use logging context for additional data
* log workflow id in a cheaper debug message
* revert the logging in the KeyValueParticipantStateWriter
CHANGELOG_BEGIN
CHANGELOG_ENd
* release 1.9.0-snapshot.20210119.6103.0.cdcf090b
This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging.
@nickchapman-da is in charge of this release.
CHANGELOG_BEGIN
CHANGELOG_END
* Bump version, changing prefix from 1.9 to 1.10
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
The default timeout of 250ms turned out to be problematic for Canton.
Therefore, I'm moving the hard coded 250ms up such that we can override
it from within the Canton code. Other users shouldn't be affected by the
change. Therefore, this is just an internal code change.
Additionally, I've added two new performance targets for the performance
envelope test.
Related to https://github.com/DACH-NY/canton/issues/4996
CHANGELOG_BEGIN
- Made the database connection timeout configurable.
CHANGELOG_END
Current reports look like:
```
Disk cache small enough:\n20G/home/vsts/.bazel-cache
```
because `echo` does not convert `\n`. An alternative would be to replace
`echo` with `printf`, but I have had enough issues with
subshells-in-strings lately that I prefer just avoiding them when
possible.
CHANGELOG_BEGIN
CHANGELOG_END
The ContractInstance is a concept a bit off. For instance it is not
clear why `agreementText` is more important for a contract that the
signatories, the stackholder or the key. In this PR, we get ride of
the ContractInstance inside LF code, except from the Engine/Ledger API
(com.daml.lf.engine.ResultNeedContract$)
CHANGELOG_BEGIN
CHANGELOG_END
* Don't always redirect to /login automatically
The redirect mode can be configured to never redirect, always redirect,
or redirect based on the request type (redirect for text/html).
In case of no redirect the auth middleware client will reply with 401
Unauthorized with a custom WWW-Authenticate challenge to login on the
auth middleware.
* Make login to redirect configurable on trigger service
By default the trigger service will redirect for HTML requests and not
redirect for JSON requests. The test suite uses automatic redirect as
the OAuth2 test server works without user interaction.
changelog_begin
changelog_end
* Preserve path and query in authMiddlewareUri
This is necessary if the auth middleware lies behind a reverse proxy
with a path prefix or a similar setup.
* Bump default auth middleware login timeout
One minute was to short for a login cycle that requires manual user
input.
* Set token cookie properties
`path = "/"` is required so that the `/login` endpoint can reliably
override the cookie value for other endoints such as `/cb` or
`/v1/triggers`.
* Test redirectToLogin modes
* Redirect on HTML
https://github.com/digital-asset/daml/pull/8532#discussion_r559368335
* Use pass/reject in onRedirectToLogin
8db2bff9af (r559370308)
* default login timeout 5min
https://github.com/digital-asset/daml/pull/8532#discussion_r559535511
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* fix: project parties are not required
This fixes a bug in daml assistant. `daml deploy` would fail if there
were no project parties listed in the daml.yaml project config file. Now
project parties are not required anymore.
Fixes#8487.
CHANGELOG_BEGIN
CHANGELOG_END
* added an integration test
We use the new cache folder specified with `DAML_CACHE` defaulting to
`.cache/daml` as a new cache folder for the assistant to store available
versions etc.
This does not migrate an existing cache folder and just starts a new
one.
CHANGELOG_BEGIN
CHANGELOG_END
I discovered yesterday that the `snapshots.json` (and actually also the
`versions.json`) file is no longer purely internal to the docs process,
as it was meant to be, but is now depended upon by the assistant. This
means the renaming from `snapshots.json` to `hidden.json` cannot happen,
and we reverted that yesterday in #8513 (& #8514), though that was done
in a bit of a hurry. This PR aims at cleaning up the resulting mess and
achieve a better long-term end state.
I will be manually removing the `hidden.json` file as soon as this is
merged, so that nothing ends up depending on _that_. There is no
occurrence of `hidden.json` outside this docs cron so hopefully this
works out.
CHANGELOG_BEGIN
CHANGELOG_END
This is the equivalent of #8515 for Linux. There was some concern that
`bazel` would be upset at having that cache removed, so I spent a fair
amount of time trying to break it (on a Linux VM, as for some reason
`bazel` chooses not to use `~/.cache` on macOS). I could not make
`bazel` unhappy by deleting the whole thing. Deleting random files,
however, did end up producing error messages along the lines of:
```
$ bazel build //...
FATAL: corrupt installation: file '/home/vagrant/.cache/bazel/_bazel_vagrant/install/73d06d52dbf3a8e6ed43f5bf5f115eb0/embedded_tools/src/BUILD' is missing or modified. Please remove '/home/vagrant/.cache/bazel/_bazel_vagrant/install/73d06d52dbf3a8e6ed43f5bf5f115eb0' and try again.
```
which suggest busting the entire thing as a solution, so I think we're
safe here.
CHANGELOG_BEGIN
CHANGELOG_END
* telemetry: use an extra cache directory for telemetry
If the sdk's `.daml` directory is not writable, telemetry fails and
kills the IDE. We add a new assistant environment variable "DAML_CACHE".
If set, this directory is used for telemetry cache data.
Fixes#8396.
CHANGELOG_BEGIN
CHANGELOG_END
* try creating directory
* check for already existing machine id file
* set DAML_CACHE to read-only in assistant integration tests
This includes the following changes:
1. The Decoder was not verifying the value inside a node use the exact
same version as the node itself.
2. We use the node version directly in the node encoder (instead of
used versionedX node methods).
3. We avoid used of .asJava in the encoder.
4. We add test for testing the decode verify 1.
CHANGELOG_BEGIN
CHANGELOG_END
Expand usage of parallel unnesting on participant_contracts and participant_contract_witnesses tables
CHANGELOG_BEGIN
* providing postgresql insert statement based on unnesting for participant_contracts and participant_contract_witnesses tables
* slightly refactored Tables objects to keep compatiblity w H2 database
* provided implicits for arrays types resolution because of performance reasons
CHANGELOG_END
Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
Hopefully this works around our recent CI disk space issues, while 80GB
should be large enough that it only happens once per machine per day, so
perf shouldn't be impacted too much.
CHANGELOG_BEGIN
CHANGELOG_END
* Update both hidden.json and snapshots.json
The assistant relies on the latter, our docs cronjob on the former. I
have no idea why we have two but keeping them in sync should be fine.
changelog_begin
changelog_end
* maybe I should test if my code compiles before pushing
changelog_begin
changelog_end
Quoting @cocreature on Slack:
> the fact that --with-dlint is exposed as a public option at all seems
> broken. I don’t think it was ever intended to be one.
CHANGELOG_BEGIN
- [Daml CLI] Three options that were never meant to be public are now
hidden from the output of various `daml xxx --help` commands. The
options still have the same effect when present, so this is not (yet)
a breaking change. Using these options tends to result in very
unhelpful, when not outright broken, dlint configurations, so we expect
existing usage to be low to nonexistent. If you do use them please
share your use-case with us. The options are:
- `--with-dlint`
- `--without-dlint`
- `--allow-overrides`
CHANGELOG_END
This produces a warning in the log that H2database does not support async commit
ever since we pass the flag through the DbDispatcher to the HikariConnection builder.
Disabling the flag when the DbType indicates that the db does not support async commit.
Fixes#8501
CHANGELOG_BEGIN
CHANGELOG_END
* group database queries while still providing the matchedQueries part of the event
* SQL query for multiquery websocket request all at once
* fetchAndPersist responds with a single bookmark
* unify connection imports
* convert DB results to domain, reassociate with proper query indices
* reassociate multiple matches with proper query indices
* make overlap more likely in testing overlap
* simpler matchedQueries merging for multi-query case
* integrate DB query with metadata-ful StreamQuery's
* expose daoAndFetch; better insertDeleteStepSource doc
* more efficient query path for contract key streams
* missed LogHandler
* persist resolved template IDs; glue the prefiltered set into the stream
* ticks and phantom removal need the state from the ACS
* compile SQL queries for query language predicates on WS
- wrong matchedQueries order
* harmonize order of ACS-vector and Positives
* misc compilation conversions
* WebsocketServicePostgresInt mixin
* update (C) date
* test websocket queries under postgres
* looking for new way to compile queries with proper matchedQueries offsets
* model that querying without matchedQueries requires only one SQL query
* SQL path for contract key streams
* nondeterminism
* fix 3 fetch tests with SQL syntax
* nondeterminism mk 2
* fix multi-party query tests by dealing with nondeterminism properly
* temp logs to track down the contract duplication
* match new scalafmt from #8437
* remove completed TODOs
* add changelog
CHANGELOG_BEGIN
- [JSON API] If the JDBC query store is enabled, it will be used to optimize
Websocket queries as well as the previously-supported synchronous queries.
See `issue #8226 <https://github.com/digital-asset/daml/pull/8226>`__.
CHANGELOG_END
* fix up matchedQueries indices
* complete the fast path for by-id queries
* remove AS c
- suggested by @cocreature; thanks
* remove temporary debugging logs
- suggested by @cocreature; thanks
* Port the rest of //ledger/... to Scala 2.13
draw the rest of the fcking owl
Omitted for now are the ledger API test tool which has a dependency
only compatible with 2.12 and the generated code of the Scala
codegen (the codegen compiles and runs with 2.13, the generated code
does not).
changelog_begin
changelog_end
* Less symbols
changelog_begin
changelog_end