Commit Graph

7602 Commits

Author SHA1 Message Date
Moritz Kiefer
3cc9de564f
Introduce dependency on Oracle image version (#10597)
We want to rerun tests when the image changes which this PR should
hopefully accomplish.

changelog_begin
changelog_end
2021-08-17 13:28:26 +00:00
Gary Verhaegen
f8c0a35940
rewrite trigger docs to follow gsg (#10509)
* rewrite trigger docs to follow gsg

Per #10419 point 4, I've rewritten the Triggers section to build upon
the Getting Started Guide instead of inventing its own example.

Compared to #10395, this has a lot more explanations as this page must
now serve the dual purpose of being a possible "next step" from the GSG
and being the main reference page for triggers. It's also lost the "next
steps" section, which I think is a bit of a shame, but it doesn't really
make sense here.

There's also no easy way for people not interested in the GSG to follow
along; should we expose the "completed GSG" as a tempate?

CHANGELOG_BEGIN
CHANGELOG_END

* keep copy-trigger as a template

* fix copy-trigger project name

* make up gsg-trigger template

* remove awkward sentence, fix existing typo

* update code to use when{,Some}

* add  to

* swap emitCommands and getCommandsInFlight

* typo

* insist on state-correction perspective

* fix copy-trigger tests

* add back copy-trigger to whitelist

* add gsg-trigger to whitelist
2021-08-17 13:28:07 +00:00
nickchapman-da
aec601f929
Fix badly versioned empty tx (#10596)
* build correctly versioned empty tx

* dont call normalizeTx from Engine.validate

* dont recalc the tx-version in normalizeTx; just assume it is correct

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-17 13:58:58 +01:00
Andreas Herrmann
d92440471c
daml ledger export: export all parties (#10588)
* Add test-case to ConfigSpec for output type

changelog_begin
changelog_end

* Add an --all-parties flag to ledger export

changelog_begin
* [Daml export] You can now set the ``--all-parties`` option to generate
  a ledger export as seen by all known parties.
changelog_end

* Update docs

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-17 14:12:28 +02:00
Sofia Faro
fb09b72f96
Improve divulgence warning message. (#10595)
Based on feedback from @bame-da on issue #9947

changelog_begin
changelog_end
2021-08-17 13:06:03 +01:00
Moritz Kiefer
fd9d8724fc
Upgrade to Oracle 19.12 (#10589)
* Upgrade to Oracle 19.12

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-08-17 13:16:41 +02:00
Samir Talwar
386965c466
Upgrade Flyway to v7. (#10594)
Flyway v6.5 does not officially support the latest versions of
PostgreSQL.

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-17 10:29:13 +00:00
Moritz Kiefer
654d2eee1b
Bump url-parse to address dependabot alerts (#10593)
changelog_begin
changelog_end
2021-08-17 11:03:10 +02:00
Moritz Kiefer
01b8e3011f
Simplify loading of logback file (#10592)
* Simplify loading of logback file

doConfigure accepts a URL which slightly simplifies things.
Really the primary reason why I’m doing this is that it gets veracode
to shut up. I don’t fully understand what it’s worried about in the
first place but it looks like it gets angry about calling openStream
on the resource *shrug*

changelog_begin
changelog_end

* fix 2.12 build

changelog_begin
changelog_end
2021-08-17 08:46:37 +00:00
azure-pipelines[bot]
19bfdbee00
update NOTICES file (#10591)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-17 07:13:15 +00:00
akshayshirahatti-da
5f7a3691a5
[JSON-API] Perf gatling MultiUserQueryScenario (#10422)
* Gatling MultiUserQueryScenario initial version, 100k ACS , 100 users used for testing conn pool performance
    CHANGELOG_BEGIN
    CHANGELOG_END

* Configurable scenario parameters via env variables
2021-08-16 17:01:27 +00:00
Moritz Kiefer
56059f32d4
Upgrade path-parse to 1.0.7 (#10587)
Mostly to get dependabot to shutup

changelog_begin
changelog_end
2021-08-16 16:39:45 +00:00
Samir Talwar
5c8025269d
ledger-grpc: Fix the directory paths. [KVL-1005] (#10586)
* ledger-grpc: Fix the directory paths.

This brings _ledger-grpc_ in line with other projects. Scala main files
should be under "src/main/scala", and test files should be under
"src/test/suite/scala".

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-grpc: Moar imports.
2021-08-16 16:38:00 +00:00
nickchapman-da
9db5ccfc4e
Normalize transactions & values as a separate pass (#10524)
* Normalize transactions & values as a separate pass. Use for simpler defintiion of isReplayedBy.

CHANGELOG_BEGIN
CHANGELOG_END

normalize transaction version

* remove stray import from bad merge which breaks scala 2_12 build

* change isReplayedBy to only norm its RIGHT (replay) argument

* add forgotton normalization for ValueEmum

* switch to use existing value normalization code (remove my newly coded duplicate code)

* normalize submittedTransaction before calling engine.validate

* dont call normalizeTx from Engine.validate

* *do* call normalizeTx from Engine.validate
2021-08-16 14:54:50 +00:00
tudor-da
99e1d78bb8
[Integrity Checker] Implemented pairwise Update normalizer (#10530)
* [Integrity Checker] Implemented pairwise Update normalizer

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

* Addressed review comments

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
2021-08-16 15:46:38 +02:00
nicu-da
cc37bc39cb
Set ErrorInfo metadata flag for definite_answer [KVL-1005] (#10583)
* Set ErrorInfo metadata flag for definite_answer, which is propagated from the completion status

CHANGELOG_BEGIN
ledger-api-client - Propagate definite_answer as metadata in the GRPC response for submit/submitAndWait
CHANGELOG_END

* Keep alphabetical order for bazel build files

* Add test for inclusion of metadata

* Formatting
2021-08-16 13:09:34 +00:00
Moritz Kiefer
147e8f2b96
Skip subject in changelog check (#10584)
* Skip subject in changelog check

This matches what unreleased.sh does.

Ideally we’d probably share the code but this is bash and I do not
like bash so I cannot be bothered to do this right now.

changelog_begin
changelog_end

* better error message

changelog_begin
changelog_end
2021-08-16 12:01:17 +00:00
Andreas Herrmann
244262dfac
Handle imports for builtin types correctly in Daml export (#10575)
* Move isTupleId

* Don't depend on DA.Types for tuple values

changelog_begin
changelog_end

* Date|Timestamp requires import DA.Date|Time

changelog_begin
changelog_end

date

* Use DA.TextMap consistently in encoding

changelog_begin
changelog_end

* TextMap requires DA.TextMap

changelog_begin
changelog_end

* Use DA.Map in encoding

* GenMap requires DA.Map

changelog_begin
changelog_end

* Add unit tests for module and package refs

changelog_begin
changelog_end

* Update daml-script/export/src/main/scala/com/daml/script/export/TreeUtils.scala

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update daml-script/export/src/main/scala/com/daml/script/export/TreeUtils.scala

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Consistently use Set +

* Format scaladoc comment

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-08-16 11:20:10 +00:00
Marton Nagy
1fc281f07e
ContractStorageBackend consolidation [DPP-462] (#10402)
* Adding CompletionStorageBackendTemplate
* Adding ContractStorageBackendTemplate
* Splitting EventStrategy and creating QueryStrategy
* Adding ComposableQuery for composable anorm string interpolation
* Adapting Backend implementations

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-16 11:56:28 +02:00
Samir Talwar
0cbaa15465
Codeowners: Notify committer maintainers on API changes. (#10557)
* Codeowners: Notify committer maintainers on API changes.

Those of us that work on kvutils and committers based on it probably
need to know when certain packages under "ledger" change.

In addition, we seem to be working on the participant state API more
than anyone else, so I think it makes sense to change governance a
little bit.

CHANGELOG_BEGIN
CHANGELOG_END

* Codeowners: Use team names for directories under /ledger.

* Codeowners: Add the participant team back to the participant state APIs.

* Codeowners: Limit kvutils to the committer team, as before.

* Codeowners: Add kv-participant to the Sandbox project.
2021-08-16 08:38:09 +00:00
Stefano Baghino
6492ceb933
JSON API: log ledger connection errors at every attempt (#10581)
* JSON API: log ledger connection errors at every attempt

This should help diagnose connection errors.

changelog_begin
[JSON API] Ledger connection errors are now logged at every attempt
changelog_end

* Make match exhaustive
2021-08-16 10:30:28 +02:00
nicu-da
933b58e3aa
Extract grpc statuses to separate module [KVL-1005] (#10582)
* Extract grpc statuses to separate module for reuse

CHANGELOG_BEGIN
CHANGELOG_END

* Fix alphabetical order

* Formatting
2021-08-16 08:21:25 +00:00
nicu-da
0ef894447f
Use explicit types to track failures when submitting a request for execution [KVL-1005] (#10567)
* Use explicit types to track failures when submitting a request for execution

To distinguish from execution failures (represented by `CompletionFailure`) which is also exposed as part of the akka-bindings, we introduced `TrackingCompletionFailures` which can also represent the failure to add the request to the execution queue.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix formatting

* Apply suggestions from code review

Co-authored-by: Hubert Slojewski <hubert.slojewski@digitalasset.com>

* Inline handling of errors in the tracker to eliminate the need for the secondary promise and simplify the code

* Update testing for the new error handling

* Remove brackets and make code compatible with 2.12

* Apply suggestions from code review

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

* Review cleanup and use inside for cleaner tests

Co-authored-by: Hubert Slojewski <hubert.slojewski@digitalasset.com>
Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
2021-08-16 08:22:59 +02:00
hgrano
4430f52cdc
changelog_begin (#10579)
- [Daml Stdlib] Ord instance added for NonEmpty
changelog_end
2021-08-15 12:52:03 +02:00
azure-pipelines[bot]
dc4629fff9
update NOTICES file (#10580)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-15 06:58:29 +00:00
azure-pipelines[bot]
8b0a0e7bbc
update NOTICES file (#10578)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-13 07:46:35 +00:00
Samir Talwar
4b8b67a1b5
Upgrade Scalatest to v3.2.9. (#10576)
* Upgrade Scalatest to v3.2.9.

Because of some coupling we also have to upgrade Scalaz to the latest
v7.2 point release, v7.2.33.

The Scalatest changes are quite involved because the JAR has been broken
up into several smaller JARs. Because Bazel expects us to specify all
dependencies and doesn't allow transitive dependencies to be used
directly, this means that we need to specify the explicit Scalatest
components that we use.

As you can imagine, this results in quite a big set of changes. They
are, however, constrained to dependency management; all the code remains
the same.

CHANGELOG_BEGIN
CHANGELOG_END

* http-json-oracle: Fix a Scalatest dependency.

* ledger-api-client: Fix a Scalatest dependency.
2021-08-12 23:19:35 +00:00
Samir Talwar
41e60f7302
Upgrade to Scala 2.12.14 and 2.13.6. (#10573)
* Upgrade to Scala 2.12.14.

* Upgrade Scala to 2.13.6.

CHANGELOG_BEGIN
CHANGELOG_END

* compability: Re-pin the Maven dependencies.
2021-08-12 14:25:53 +00:00
Moritz Kiefer
c447898cc9
Fix display of unhandled exceptions in the scenario service (#10572)
fixes #10570

I’m increasingly convniced, that the future failures here are a
maintenance nightmare and we should switch to Either completely but
not in this PR

changelog_begin
changelog_end
2021-08-12 14:35:26 +02:00
Andreas Herrmann
4e1a90dffd
Enable --incompatible_remote_results_ignore_disk (#10571)
* Enable --incompatible_remote_results_ignore_disk

> If set to true, --noremote_upload_local_results and --noremote_accept_cached will not apply to the disk cache. If a combined cache is used: --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. --noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache. See #8216 for details.

changelog_begin
changelog_end

* Fix compatibility workspace

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-12 12:35:05 +00:00
Victor Peter Rouven Müller
d183ecc6d6
rotate release duty after 1.17.0-snapshot.20210811.7560.0.4f9de4ba (#10556)
@realvictorprm is taking care of 1.17.0-snapshot.20210811.7560.0.4f9de4ba (#10544), so they get pushed back to the end of the line.

Please do not merge this before #10544.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-12 13:53:08 +02:00
azure-pipelines[bot]
76ecb44fbd
update compat versions for 1.17.0-snapshot.20210811.7565.0.f1a55aa4 (#10563)
* update compat versions for 1.17.0-snapshot.20210811.7565.0.f1a55aa4

CHANGELOG_BEGIN
CHANGELOG_END

* fix Scala code

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-08-12 12:33:37 +02:00
Moritz Kiefer
86a03fa7c0
Bump bazel max jvm memory (#10569)
* Bump bazel max jvm memory

I kept the starting memory the same. Happy to bump that as well if you
think it makes sense.

changelog_begin
changelog_end

* Bump xms as well

changelog_begin
changelog_end
2021-08-12 09:31:19 +00:00
azure-pipelines[bot]
1cc136c033
update NOTICES file (#10565)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-12 09:14:40 +02:00
Samir Talwar
c69880ccf1
ledger-api-test-tool: Enforce test naming standards. (#10562)
* ledger-api-test-tool: Add some basic unit tests for test names.

* ledger-api-test-tool: Ensure that test names are not prefixes of others.

This makes sure that we can include or exclude any given test, without
affecting others.

* ledger-api-test-tool:Ensure that all tests have different names.

Looks like we had some copy-pasta.

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-12 06:44:44 +00:00
nicu-da
ee34d0f80c
Track command - use types for error handling instead of grpc statuses [KVL-1005] (#10503)
* Track command response using an Either instead of passing the completion with the grpc code.

This makes it clearer as to the result of command tracking. We no longer count on the grpc status to determine if there was an error or not, and instead use types for that.

CHANGELOG_BEGIN
akka-bindings: `LedgerClientBinding.commands` now returns a flow of `Either[CompletionFailure, CompletionSuccess]` instead of `Completion` for clearer error handling. For backwards compatiblity the new return type can be turned back into a `Completion` using `CompletionResponse.toCompletion`
CHANGELOG_END

* Fix formatting

* Code review changes

- remove usages of Symbol in tests
- clean curly braces

* Remove change added from another PR

* Fix import

* Fix import

* Fix retry flow and extract one more match case

* Un-nest matches to a single level for simplicity

* fix typo

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Be consistent in assertions and prefer `inside` for pattern matching

* Inline CompletionResponse to use the full type

* Use simpler matcher

* Formatting

* Add a way to convert back an `Either[CompletionFailure, CompletionSuccess]` to a `Completion` for backwards compatibility. This simplifies update for systems that are tightly coupled to `Completion`

* Add test for converting to/from CompletionResponse

* Remove unnecessary brackets

* Add missing header

* Use checked exceptions to preserve backwards compatiblity

* Fix unapply

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-08-12 08:37:53 +02:00
Moritz Kiefer
93c25f36b6
Release 1.17 snapshot (#10560)
changelog_begin
changelog_end
2021-08-11 18:49:24 +00:00
Moritz Kiefer
f1a55aa4bf
Fix sdk version in script export tests (#10559)
changelog_begin
changelog_end
2021-08-11 17:04:08 +00:00
Gary Verhaegen
9756bf8104
add minimumOn & maximumOn (#10527)
Requested in #10509. Should we also add `minimumBy` and `maximumBy` for
consistency with `sortBy`?

CHANGELOG_BEGIN
- The DA.List and DA.List.Total modules now export minimumBy, maximumBy,
  minimumOn and maximumOn, respectively behaving similarly to sortBy and
  sortOn.
CHANGELOG_END
2021-08-11 16:34:38 +00:00
Andreas Lochbihler
5728bbc14f
add cryptographic hash method to ChangeId and base equality on hash (#10554)
CHANGELOG_BEGIN
CHANGELOG_END
2021-08-11 17:34:44 +02:00
Samir Talwar
2e4f2946fc
kvutils: Improve the test coverage of OffsetBuilder, and support negative numbers. (#10537)
* kvutils: Add property-based tests for the offset builder.

* kvutils: Avoid using `BigInt` in offset parsing.

This also means we can theoretically support negative offsets, even if
in practice it's probably a bad idea.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Further property-based tests for OffsetBuilder.

* kvutils: Improve a comment in OffsetBuilder.

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
2021-08-11 14:31:26 +00:00
Gary Verhaegen
a6650c11e5
fix hoogle (#10555)
Hoogle was down because the machines got stuck in the `apt-get update`
stage.

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-11 13:52:43 +00:00
Samir Talwar
4f9de4ba3b
Add @hubert-da to CODEOWNERS for kvutils. (#10551)
CHANGELOG_BEGIN
CHANGELOG_END
2021-08-11 12:59:10 +00:00
Victor Peter Rouven Müller
e48e7b58c7
Publish 1.16.0 stable (#10548)
changelog_begin
changelog_end
2021-08-11 10:13:06 +00:00
Andreas Herrmann
68e60cacd3
Fix typo in windows extra libs patch (#10538)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-11 11:00:03 +02:00
azure-pipelines[bot]
0b9a64807a
update NOTICES file (#10546)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-08-11 08:05:50 +00:00
Moritz Kiefer
95cf3d82e8
Upgrade sqlite dependency (#10547)
Looks like the old version does not have support for Arm macs. I don’t
actually have one to test but I can see that it at least shows up in
the JAR with this change:

   972888  2010-01-01 00:00   org/sqlite/native/Mac/aarch64/libsqlitejdbc.jnilib

changelog_begin
changelog_end
2021-08-11 09:46:05 +02:00
nicu-da
99f59007bf
Add flag to enable/disable command deduplication [KVL-1006] (#10518)
* Add flag to enable/disable command deduplication

* Remove flags for configuration as it should not be exposed externally

* Move deduplicationEnabled flag to the write service.

The deduplication enabled flag is tightly coupled to the WriteService implementation so the flag has been moved to the WriteService trait so that it's explicitly defined.

CHANGELOG_BEGIN
Command deduplication is enabled/disabled based on the write service implementation.
v1 WriteService enables command deduplication while v2 WriteService disabled it
CHANGELOG_END

* Rename deduplication flag
Set sandbox deduplication to true and proxy write service to the delegage
2021-08-11 09:27:25 +02:00
Stephen Compall
56f3f6cb01
factor the complicated bits of contract selection between PG, Oracle (#10528)
17709b5ba3 (#10344) brought the two implementations of
`selectContractsMultiTemplate` close together enough that they can be
usefully factored.  Here is that factoring.

Several of the arguments to `queryByCondition` take the form
(Read[T], T => Out), i.e. Coyoneda; we could invert the control by
returning a data structure with coyonedas, but instead here we use a
sort of continuation-passing style, so the coyonedas are embedded in the
arguments to `queryByCondition`.

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-10 21:34:30 +00:00
Kamil Bozek
3b1d1ac7ac
IndexerBenchmark: an option for defining minimum update rate [DPP-541] (#10540)
* Changed default metrics reporting interval to 1 second

* Min update rate SLO

* Return exit code 1 on benchmark failure

* CHANGELOG_BEGIN
- [Integration Kit] - indexer-benchmark - added --min-update-rate option for defining required update rate
CHANGELOG_END
2021-08-10 23:08:06 +02:00