Commit Graph

2211 Commits

Author SHA1 Message Date
Rohan Jacob-Rao
68a35cb055 Map Telemetry severity level to NOTICE so GCP doesn't reject messages (#3282) 2019-11-01 18:34:13 +00:00
Shayne Fletcher
c8a9e0b295 Update hlint; add some dlint smoke tests (#3319) 2019-11-01 18:29:51 +00:00
Stefano Baghino
96622c9fe7 Expose DB wait/exec times over JMX as well as logs (#3310)
* Expose DB wait/exec times over JMX

* Fix compilation errors

* Fix more compilation errors

* Update unreleased.rst

* Address https://github.com/digital-asset/daml/pull/3310#pullrequestreview-310346159

* Address https://github.com/digital-asset/daml/pull/3310#discussion_r341641717
2019-11-01 17:34:44 +00:00
Remy
d56a4aa715 Intern all strings: proto cleanup (#3296)
* daml-lf: cleanup strings/names interning for 1.dev

* change level of dottedName intening
* make interning mandatory
* rational name of proto field

* fix tests

* spec update

* fix test

* formatting

* Address Gerolf's comments

* Address Jussi's comments
2019-11-01 17:03:42 +00:00
Moritz Kiefer
bd19291632 Fix superclass detection for Numeric (#3316)
For numeric, the superclass dicts can be of the for `dict @10` so only
handling variables doesn’t work. Now we walk down applications and
check the name on the left.
2019-11-01 16:15:23 +00:00
Brian Healey
d530b2cdeb Address warnings over filename mismatch (#3313) 2019-11-01 15:14:25 +00:00
Jussi Mäki
0ca8580914 Fix the import paths of {value,transaction,blindinginfo}.proto (#3312)
* Fix the import paths of {value,transaction,blindinginfo}.proto

This cleans the imports in daml_kvutils.proto:

  -import "daml-lf/transaction/src/main/protobuf/transaction.proto";
  +import "com/digitalasset/daml/lf/transaction.proto";

This shouldn't be a breaking change to the outside as the proto files
themselves are not published, only the java libraries generated from them.

* Update missed deps
2019-11-01 14:54:55 +00:00
Gerolf Seitz
510ecb7aeb
Extractor stores exercise events in single table data format. (#3303)
This also fixes a bug where extractor would set archived_by_transaction_id even
if the exercise event was non-consuming.

Fixes #3274.
2019-11-01 14:39:28 +01:00
Ognjen Maric
cae0ffd7dc
Correctly handle package dependencies in Result#needPackage (#3308)
When a package has dependencies, `ConcurrentCompiledPackages#addPackage` returns
a `ResultNeedPackage` on the dependency.

This return value was ignored in `Result#needPackage`. As a consequence,
the package would never be added to the map of compiled packages in
this way.

This is problematic for the reinterpretation of `Fetch` nodes, when
performed on an `Engine` with a clean cache. The package would never get
loaded, but the interpretation would commence and then blow up. See
the modified test in `EngineTest.scala`.

The problem would not appear for other types of nodes, because the other
`CommandPreprocessor#preprocess*` functions (e.g., preprocessCreate)
also invoke `translateValue`, which correctly chains the result of `addPackage`.
2019-11-01 11:59:40 +01:00
Rohan Jacob-Rao
8ec9c324fb Store extension version in global state (#3309)
* Store extension version in global state

* Fix synchronicity
2019-10-31 21:18:11 +00:00
Stefano Baghino
e48944c91d
Fix ledger config test flakiness (#3307) 2019-10-31 15:57:50 -04:00
Shayne Fletcher
11c1bf0fba
Upgrade hlint (#3306) 2019-10-31 15:08:21 -04:00
Stefano Baghino
42051ae037
Add and validate expiration on claims (#3286)
* Add and validate expiration on claims

* Address review comments

* Test existing services for token expiration

* Test expiration mid-stream

* Address https://github.com/digital-asset/daml/pull/3286#pullrequestreview-309710454
2019-10-31 13:14:44 -04:00
Martin Huschenbett
6211d74193 Add filter function to TextMap and Next.Map (#3305)
This closes #2760.
2019-10-31 15:41:32 +00:00
Samir Talwar
7ba8fdb231 ledger-api-test-tool: Use java.time where possible. (#3304)
* ledger-api-test-tool: Use java.time instead of doing the sums ourselves.

* ledger-api-test-tool: Use `asProtobuf` everywhere.

* ledger-api-test-tool: Avoid scala.concurrent.duration where possible.

* ledger-api-test-tool: Add the copyright header to ProtobufConverters.
2019-10-31 15:28:16 +00:00
Brian Healey
9d71a408a0
Make Err an abstract class so it is throwable when used from Java (#3297)
* Make Err an abstract class so it is throwable when used from Java

* Update ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/Err.scala

bring back sealed

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2019-10-31 11:02:00 -04:00
Samir Talwar
297e5eddff
ledger-api-test-tool: Sort the tests, and add a type. (#3299)
* ledger-api-test-tool: Sort tests.

* ledger-api-test-tool: Add a type for the map of tests.
2019-10-31 14:57:22 +01:00
Gerolf Seitz
9750ccf716
Navigator properly sets the max incoming message size again. (#3302)
The symptom for receiving messages larger than the configured maxInboundMessageSize is a
gRPC error like:

Oct 31, 2019 1:52:37 PM io.grpc.internal.AbstractClientStream$TransportState inboundDataReceived
INFO: Received data on closed stream

Fixes #3301.
2019-10-31 14:56:48 +01:00
associahedron
8c8cd5f433 Refactoring the handling of data types in LFConversion.hs (#3251)
* Add some type signatures to make MonoLocalBinds happy

* Extract applyDataCon function

* rename applyDataCon

* Refactor convertDataCon

* ß reduction

* Delint

* Refactor convertTypeDef

* Rewrite convertTemplateInstanceDef

* pass sanitization function to convertRecordFields

* Extract out the newtype worker definition

* Move mkWorkerName to UtilLF

* Simplify getTag conversion

* Simplify tagToEnum# conversion

* Eliminate Ctors and toCtors

* Reviewer comments
2019-10-31 13:46:48 +00:00
Samir Talwar
8baeaf59a1 Delete CommandSubmissionTtlIT. (#3298)
The same behaviour is covered by the LedgerConfigurationService already.

Closes #2839.
2019-10-31 13:32:25 +00:00
Stefano Baghino
d9ae487fec Disallow empty command submission (#3270)
* Disallow empty command submission

Fixes #592
2019-10-31 08:37:58 +01:00
Jussi Mäki
819f8a8af5 Bring back daml integration kit docs (#3292)
* Bring back daml integration kit docs

This just revives the documentation, without updating it yet.

* Updated URLs and remvoe references to the IndexService

* Add release note for revival of integration kit docs

* Update unreleased.rst

* update release notes
2019-10-30 17:15:58 +00:00
Jussi Mäki
4e440bd0a6 Add kvutils ledger dumps and integrity checker (#3167)
kvutils now supports dumping the ledger to a file via environment
variable: "KVUTILS_LEDGER_DUMP=/tmp/ledger.dump".

The integrity checker tool allows re-processing of ledger dumps to
validate that all submissions, state and log entries can be parsed
and processed. This forms the basis of kvutils data continuity test
suite.

Currently the checker strictly enforces that re-processed
outputs match the inputs exactly, which for now guarantees forwards
and backwards compatibility. The checker will be adapted when
forwards-incompatible changes or new kvutils message versions arise.

A select collection of ledger dumps will be maintained in a separate
repository (to be decided) and these dumps are to be validated by
the DAML CI.
2019-10-30 17:02:00 +00:00
Remy
5812a1246d
daml-lf: to_text_template_id -> to_text_type_con_name (#3293)
* simplify to_text_template_id

* to_text_template_id -> to_text_type_con_name
2019-10-30 17:32:36 +01:00
Andreas Herrmann
c6743d3ecb
--test_env is a build option as well (#3295)
The `.bazelrc` file specified `--test_env` as a `test` option only.
However, this is a `build` option as well. Only specifying it for `test`
caused Bazel to unnecessarily redo the analysis phase:

```
INFO: Build option --test_env has changed, discarding analysis cache.
```
2019-10-30 17:00:13 +01:00
Gary Verhaegen
934dae1ace
pin Terraform to 0.11 (#3291) 2019-10-30 15:32:24 +01:00
Gary Verhaegen
c1662527f5
docs cron: fix content-type header (#3289) 2019-10-30 14:46:57 +01:00
Remy
bd054b4955 daml-lf: interned strings/names in scenarios (#3255)
* daml-lf: interned strings/names in scenarios

* clean up

* Address Moritz's comments
2019-10-30 10:25:46 +00:00
Gary Verhaegen
c4aa296a5e add debug prints for docs cron (#3281) 2019-10-30 10:23:12 +00:00
Andreas Herrmann
6b7a3529a2 Document @unpinned_maven//:pin (#3288) 2019-10-30 11:19:01 +01:00
Gerolf Seitz
8650d38c78
Fixed a bug in the DB migration script 10.1 (#3287)
The script would throw an exception for contracts without observers.

Fixes #3284.
2019-10-30 10:58:21 +01:00
Moritz Kiefer
e7280f96b3 Add dedupCreate/dedupExercise helpers to the DAML trigger API (#3280)
Given how common this is, it seems worthwile to add helpers for this.
2019-10-29 18:06:43 +00:00
Robert Autenrieth
e887318f4f Move AuthService (#3272)
* Move AuthService and Claims

* Move interceptor and authorization wrappers

* Add artifact

* Address review comments
2019-10-29 15:46:43 +00:00
Martin Huschenbett
8cfbd50c17 Don't cache the GHC Core produced during compilation (#3269)
* Don't cache the GHC Core produced during compilation

In our experiments, this reduced the memory footprint by ca. 18% on a very
big code base.

* Adapt integration tests

* Fix integration tests
2019-10-29 15:30:59 +00:00
Andreas Herrmann
03037ca8bd fetch_sources = True (#3279) 2019-10-29 14:43:56 +00:00
Moritz Kiefer
d5de7d2177
Release 0.13.32 (#3276) 2019-10-29 10:25:00 -04:00
Remy
b66c231aa0 daml-lf-spec: remove improper changes from a3518d67 (#3277)
* daml-lf-spec: remove improper changes from a3518d67

* address Gerolf's comments
2019-10-29 13:36:58 +00:00
Gary Verhaegen
536188abce fix spurious HubSpot announce bug (#3266) 2019-10-29 13:26:08 +00:00
Robert Autenrieth
bc63f2f8de Add missing contract id hash (#3256)
The global implicit disclosure map was missing the `#` prefix for contract ids, which caused subsequent contract id lookups to not find the right contract.
2019-10-29 09:09:21 +01:00
Rohan Jacob-Rao
00fc6bf100 Log when user views scenario results (#3271)
* Extend Priority type with Telemetry value

* Include Telemetry logging level in logger

* Log viewing of scenario results

* Update ghcide with telemetry logging level
2019-10-28 23:42:20 +00:00
Moritz Kiefer
e70bb007be Add a command to list the triggers in a DAR (#3268)
For now, this uses a somewhat adhoc format with one trigger identifier
per line but given that I expect that it won’t be particularly common
to want to do this mechanically this should be sufficient and it’s
trivial to parse.
2019-10-28 22:34:19 +00:00
Stefano Baghino
5fbc9a20aa
Remove duplicate DAR reader (#3267)
Fixes #452
2019-10-28 17:02:47 -04:00
Stefano Baghino
d803768405
Remove duplicates of TestExecutionSequencerFactory (#3264)
Fixes #9
2019-10-28 15:56:33 -04:00
Moritz Kiefer
3cd5cfc1d7 Include daml-docs for daml-trigger in the documentation (#3263)
* Include daml-docs for daml-trigger in the documentation

* Fix link to trigger docs
2019-10-28 19:30:23 +00:00
Moritz Kiefer
d2e209aeb9 Cleanup internals of high-level trigger API (#3265)
This is in preparation for adding helpers for command
deduplication. There are no public API changes in this PR.
2019-10-28 19:20:35 +00:00
Gary Verhaegen
1e1e08d3c9
rewrite docs cron in Haskell (#3235) 2019-10-28 18:26:06 +00:00
Robin Krom
d4f8db05f0
language: parse sdk version from manifest (#3262)
This is in preparation for the support of cross sdk imports, where we
need to know whether imports have different sdk versions or not.
2019-10-28 17:45:06 +01:00
Moritz Kiefer
380c2cc494 Warn on trigger package id mismatch (#3258)
This is fairly easy to run into so it makes sense to warn about
this. Given that I expect the trigger library will be reasonably
stable in the near future, this is only a warning rather than an
error.

fixes #3244
2019-10-28 15:14:54 +00:00
Gerolf Seitz
fe7e5615b8
Improve performance of stakeholder retrieval from SQL (#3207)
Instead of loading and deserializing the transaction, we store the
stakeholders in tables contract_signatories and contract_observers.

To avoid having to do an extra roundtrip for fetching the stakeholders,
we aggregate the parties at query time into a % separated string (% is
not a valid character for parties), which we then split again in the
application.

Fixes #2330.
2019-10-28 14:16:21 +01:00
Andreas Herrmann
2bd1db490a
Replace bazel-deps by rules_jvm_external (#3253)
* Update bazel-common to fix javadoc issues

Specifically, to fix the following error

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
        File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
                javadoc_library(name = 'rs-grpc-bridge_javadoc')
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
                dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```

* Define Maven deps using rules_jvm_external

* Pin artifacts

* Remove bazel-deps generated targets

* Remove bazel-deps

* Switch to rules_jvm_external targets

* update bazel documentation

* pom_file: There are no more bazel-deps targets

* BAZEL-JVM.md `maven_install` typo
2019-10-28 13:53:14 +01:00