* sandbox: Clean up `MetricsReporting` a little.
Make sure it closes both reporters, and avoid starting things in a
constructor.
* sandbox: Add hidden options for enable metrics reporting.
* sandbox: Add a disambiguating name to the DB connection/thread pools.
CHANGELOG_BEGIN
- [Sandbox] DB connection pool metrics names have changed slightly, from
``daml.index.db.connection`` to ``daml.index.db.connection.sandbox``.
- [Ledger Integration Kit] DB connection pool metrics names have changed
to disambiguate the StandaloneApiServer from the
StandaloneIndexerServer. The former now has a ``.ledger-api-server``
suffix, and the latter now has a ``.indexer`` suffix.
CHANGELOG_END
* sandbox-next: Use the same metrics registry for the API and indexer.
* sandbox: Give a useful error message on an invalid metrics reporter.
And simplify the error messages.
With the arguments `--client-auth=foo --metrics-reporter=foo`, we now
get the output:
```
Error: Option --client-auth failed when given 'foo'. Must be one of
"none", "optional", or "require".
Error: Option --metrics-reporter failed when given 'foo'. Must be one of
"console", or "csv:PATH".
Try --help for more information.
```
* sandbox: Pull out more helpers in `MetricsReporting`.
* sandbox: Rename MetricsReporter classes so they don't clash.
* sandbox: Wrap the `name` parameter in a `ServerName` tagged string.
For safety. Yours, not mine.
* sandbox: Push metrics to Graphite with `--metrics-reporter=graphite`.
* sandbox: Make `MetricsReporter.Graphite` singly-lazy, not doubly-.
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* sandbox: Replace `ServerName` with `ServerRole`.
* sandbox: Fix usage of `ServerRole.Testing` in `LedgerResource`.
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
This PR adds new behaviour to the existing --scalafmt-diff flag to also
use a diff-based approach for hlint. Consequently, the flag is renamed
to the simpler and more generic `--diff`, in a backwards-compatible way.
CHANGELOG_BEGIN
CHANGELOG_END
- New seeding type "Static" that uses a fixed seed for generating new seeds.
This is only used in Sandbox and Sandbox-next.
- Remove the fuzzing for submission time in Engine.scala
- DAML-on-SQL: Create new log entry IDs from a provided SeedService.
This allows for generating deterministic transaction IDs in
Sandbox-Next.
Fixes#5107
CHANGELOG_BEGIN
[Sandbox] Add contract-id-seeding=static to allow for predictable contract IDs. This is useful for documentation,
to be able to refer to a specific contract ID instead of having to write "note down the contract ID you see on the screen. we will use it later."
[DAML-on-SQL] Derive the next log entry ID using the provided SeedService. This allows us to also deterministically create transactionIds in static time mode together with `--contract-id-seeding=static`. This should only be used for demos or documentation.
CHANGELOG_END
* sandbox: Remove a few levels of indentation in `ApiCommandService`.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Get rid of the `LowLevelCommandServiceAccess` trait.
It only has one implementation. Just use it.
* sandbox: Remove unused type aliases from ApiCommandService.
* kvutils/app|sandbox: Rename `system` to `actorSystem`.
* sandbox: Pass a materializer in to the StandaloneIndexerServer.
There's no need for it to construct one when the caller always has one
available.
CHANGELOG_BEGIN
CHANGELOG_END
* recovering-indexer: Use `SubmissionId` instead of `LedgerString`.
Where appropriate.
* sandbox: Use the materializer implicitly in JdbcIndexer.
by reading parameters.ledger_end column instead of parameters.external_ledger_end.
CHANGELOG_BEGIN
[Ledger API Server]: Upon restart, ledger api server continues consuming unconsumed events rather than
all events from beginning.
CHANGELOG_END
Closes#5121
* remove List and TextMap support from the JSON query language
CHANGELOG_BEGIN
- [JSON API - Experimental] Removed support for maps and lists from the query language.
See `issue #4855 <https://github.com/digital-asset/daml/issues/4855>`_.
CHANGELOG_END
* GenMap won't be supported in general, remove FIXME
- thanks @leo-da
* more documentation on unsupported query types
- as suggested by @hurryabit; thanks
* Integrate transaction lookup on new schema in Ledger API
Re-wires all transaction lookups to the new schema
CHANGELOG_BEGIN
CHANGELOG_END
* Always return the agreement text
CHANGELOG_BEGIN
[Ledger API Server] The metric 'daml.index.lookup_transaction' has been
replaced by 'daml.index.lookup_flat_transaction_by_id' and
'daml.index.lookup_transaction_tree_by_id', which record the same events
but with more granularity regarding the type of lookup.
CHANGELOG_END
* Ensure agreement text invariant in a single place
* Do not compare the order in which witness parties appear in an event
* Hide command identifier from non-submitters in transaction trees
* Fix time assigned to transaction to be the ledger effective time and not the record time
* Store transactions from initial state into the new schema
* Bumping up http-json tests size to large, adding some extra logging
* Removing the logging from prod code, adding some in tests.
changelog_begin
changelog_end
* sandbox: Don't let just anyone construct a DbDispatcher.
It's the job of the JdbcLedgerDao.
* sandbox: Clean up the DbDispatcher a little.
* sandbox: JdbcLedgerDao now creates its own execution context.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Make `defaultNumberOfShortLivedConnections` private.
This used to be a dependency of our zip library that you couldn’t
disable. However, in the meantime it has gotten a flag to disable
it and we don’t actually use it. Given that the upstream URL is dead
atm now seems like a good time to kill it.
changelog_begin
changelog_end
Makes storing and generating test transaction more composable (store just takes a generated transaction)
- Add a nonTransient utility method to retrieve contracts that have been created but not consumed as part of a transaction
- Add an addChildren utility method to add children to a transaction to allow to create more complex test transactions
- Add a transaction generator that uses the aforementioned addChildren to create a more complex transaction
CHANGELOG_BEGIN
CHANGELOG_END
* Getting started guide: Invoke daml start directly
Since we no can configure arguments we wish to pass to DAML Sandbox
when running `daml start` in `daml.yaml`, we don't need the mysterious
`daml-start.sh` script anymore. That's why
https://github.com/digital-asset/create-daml-app/pull/78
removes the script from `create-daml-app`.
This PR adjust the getting started guide accordingly.
This fixes#4295.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix expected message when daml start successful
* sandbox: Remove duplicate parameters in JdbcIndexerFactory.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: `InitializedJdbcIndexerFactory` is just a ResourceOwner now.
* sandbox: Rename helper methods in `JdbcIndexerFactory`.
* sandbox: Make `JdbcIndexer#initialized` look like it does something.
* Support partial patterns in DAML repl
This PR improves the support for partial patterns in DAML repl by
making sure that they fail on the line itself rather than some
subsequent line and avoids the partial pattern match warnings on all
following lines.
changelog_begin
changelog_end
* Fix tests
I've received some feedback that the "itself" in
```
Generating <some hash> as itself
```
is confusing. Also, the first noun in each line said what is being
_processed_ not what is being _generated_. I've fixed that too.
CHANGELOG_BEGIN
CHANGELOG_END
* Support complex patterns in DAML REPL
Previously, we only supported simple variable patterns in DAML
repl. This PR extends this to support pretty much all patterns. The
main complexity here is in handling shadowing correctly but I’m
reasonably confident the solution here is sensible.
What doesn’t work properly yet is partial patterns. I’ve added a
comment describing the issue and a potential solution. Given that this
isn’t a regression apart from maybe a slightly worse error message, I
think it makes sense to merge this PR and fix that separately.
changelog_begin
- [DAML REPL - Experimental] You can now use more complex patterns in
statements, e.g., ``(x,y) <- pure (1,2)``.
changelog_end
* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs
Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs
Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Improve error messages
* update documentation
Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* language:daml-react: tests for useStreamQuery/useStreamFetchByKey
This adds tests for `useStreamQuery` and `useStreamFetchByKey` of the
`@daml/react` library.
CHANGELOG_BEGIN
CHANGELOG_END
* renamed hooks.test.ts -> index.test.ts
We don't use TypeScript's project references. Hence there's no point in
passing `--build` to `tsc`. Let's stop doing that hence.
By default, the TypeScript compiler type checks the `.d.ts` of all
dependencies of a project. This is painfully slow. For the packages
generated by `daml2ts` it also doesn't make a lot of sense since we control
all dependencies except for `@mojotech/json-type-validation`, which is
written in TypeScript itself and hence has very sane typings anyway.
This default behaviour can be disabled by setting `skipLibCheck` to `true`.
Doing that decreases the compilation time of _every_ single package generated
by `daml2ts` for the DAVL project from ~10s to ~2s. Let's get that time back!
CHANGELOG_BEGIN
CHANGELOG_END
* Support uploading DARs to the trigger service
This PR adds a new `upload_dar` endpoint that accepts a DAR as a
multi-part form request and adds it to the list of compiled packages.
I’ve also made the DAR passed in on startup optional now given the new
endpoint.
There is no endpoint for deleting a DAR so far but there is none on
the ledger API either so I think this not particularly urgent.
changelog_begin
changelog_end
* Address review comments
* Factor out common identifier generation
For `DA.Types`, `DA.Internal.Any`, and `Daml.Script`.
* Factor out Script type for DAML scripts
* Adapt DAML script test runners
* Adapt REPL
CHANGELOG_BEGIN
CHANGELOG_END
* ./fmt.sh
* Avoid `unapply`
addressing
https://github.com/digital-asset/daml/pull/5076#discussion_r394526881
* Pure Script.fromIdentifier
* Pure Script.fromDar
* Simplify test script discovery
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Follower terminology in the docs
Changed the docs to a more twitter/Instagram like terminology where we use 'follower' relationship instead of 'friend'. Resolves#5015
CHANGELOG_BEGIN
CHANGELOG_END
* Update docs/source/getting-started/index.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/index.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/index.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/app-architecture.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/app-architecture.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/first-feature.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/first-feature.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/first-feature.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/first-feature.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/getting-started/first-feature.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
Avoiding `damlc compile/package` commands (which we would like to deprecate), and replace with plain `damlc build` together with a post dar->dalf extraction step in the couple of places where we actually want the .dalf for testing.
changelog_begin
changelog_end
* 2nd part of stabilizing flaky websocket integration test,
handling empty events, which we may receive a bunch in the end of the test
when there is no activity
changelog_begin
changelog_end
* fixing `Offset.semigroup`, thanks @S11001001!
CHANGELOG_BEGIN
CHANGELOG_END
We use the rank recently introduced in the enum and variant svalues for:
* pattern matchin
* value hashCode
* value ordering (so the oredering match the DAML-LF spec)
* value equality