Commit Graph

7312 Commits

Author SHA1 Message Date
Remy
ebb76dca4c
LF: reorganize errors in com.daml.lf.archive (#10213)
* LF: reorganize errors in com.daml.lf.archive

part of #9974

CHANGELOG_BEGIN
CHANGELOG_END

* fix
2021-07-08 13:03:42 +00:00
nickchapman-da
69646451f2
Improvements for validation tests (#10214)
* prefer Seq to List when generating samples

CHANGELOG_BEGIN
CHANGELOG_END

* use TableDrivenPropertyChecks

* remove count/println
2021-07-08 13:48:07 +01:00
Moritz Kiefer
5f124c3b64
Avoid collision in execution log postfix (#10205)
uname is the name for Linux and Linux_scala_2_12 which causes builds
to override each other and it looks like that might even break in case
of concurrent uploads although that could also be general flakiness in Azure.

changelog_begin
changelog_end
2021-07-08 11:23:53 +00:00
Moritz Kiefer
9e27ae0d85
Reshuffle cocreature in daml-lf codeowners (#10215)
No idea why I’m a codeowner for everything individually.

changelog_begin
changelog_end
2021-07-08 11:06:20 +00:00
Remy
41b8448b17
LF: Simplify archive reader. (#10208)
* LF: Simplify archive reader.

- decouple Reader and Decoder
- introduce case class to handle hash, proto payload, and version

CHANGELOG_BEGIN
CHANGELOG_END

* Address Moritz' review

* cosmetic
2021-07-07 19:56:40 +00:00
Gary Verhaegen
38734f02d7
es-feed: ignore invalid files (#10207)
We currently have about 1% (28 out of 2756) of our build logs that have
invalid JSON files. They are all about a `-profile` file being
incomplete, and since those files represent a single JSON object we
can't do smarter things like filtering invalid individual lines.

I haven't looked deeply into _why_ we create invalid files, but this
should let our ingestion process make some progress in the meantime.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-07 15:38:14 +00:00
Moritz Kiefer
6586dde11e
Move exercise context computation to the client side (#10199)
We probably want to start displaying the full ptx on the client side
but for now this at least moves things out of speedy and into the
rendering layer where they belong.

It also fixes IncompleteTransaction to unwind properly so the roots
are really the roots.

changelog_begin
changelog_end
2021-07-07 15:44:47 +02:00
Moritz Kiefer
c92c67832f
Mark Daml profiler as stable (#10203)
Nobody reported any issues and we’re not planning breaking changes so
ship it!

changelog_begin

- [Daml Profiler] The Daml profiler is now a stable feature.

changelog_end
2021-07-07 12:54:18 +00:00
Gary Verhaegen
cb1f4ec773
ci/windows: disable spool (#10200)
* ci/windows: disable spool

We're not expecting to print anything, and @RPS5' security newsletter
says this is a vector of attack.

CHANGELOG_BEGIN
CHANGELOG_END

* increase no-spool to 6

* Windows name truncation causing collisions

* update main group

* remove temp group
2021-07-07 12:44:33 +00:00
Moritz Kiefer
2326d425bc
Publish execution logs on unix platforms (#10194)
Even with the cache retries something still doesn’t seem to be cached
quite like I expect. I can’t really debug this without exec logs so
this PR starts publishing those.

changelog_begin
changelog_end
2021-07-07 11:37:43 +02:00
Moritz Kiefer
42693452ce
Drop cleanup of node_modules (#10195)
This is months old by now and I think it might be non-deterministic
forcing unnecessary rebuilds.

changelog_begin
changelog_end
2021-07-07 10:15:44 +02:00
Stefano Baghino
c8faed8a17
Deduplicate Java codegen running instructions (#10185)
Fixes #10183.

changelog_begin
changelog_end
2021-07-07 08:37:42 +02:00
azure-pipelines[bot]
e4c8c390f2
update compat versions for 1.14.1-snapshot.20210706.7133.0.8ec16e94 (#10196)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-07 08:34:25 +02:00
Stefano Baghino
0d881f5e2b
Improvements to the documentation with regards to offsets (#10180)
* Improvements to the documentation with regards to offsets

changelog_begin
[Docs] Improvements to the documentation with regards to offsets
changelog_end

- Simplify wording to explain the usage of `blockingForEach` in the Java
bindings quickstart page
- Describe offsets in prose in the page about the Ledger API services
- Suggest how to perform crash recovery with offsets on the application
architecture page
- Link to the relevant Protobuf reference docs where approriate

* Apply suggestions from code review

Thanks @cocreature

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

* Addresses https://github.com/digital-asset/daml/pull/10180#discussion_r664001785

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-07-07 07:51:37 +02:00
Gary Verhaegen
1d5ba4fa42
feed elasticsearch cluster (#10193)
This PR adds a machine that will, every 5 minutes, look at the GCS
bucket that stores Bazel metrics and push whatever it finds to
ElasticSearch.

A huge part of this commit is based on @aherrmann-da's work. You can
assume that all the good bits are his.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-06 19:46:14 +02:00
nickchapman-da
e2bdca6be9
Use PartialFunction for more concise code. (#10191)
* Use PartialFunction for more concise code.

CHANGELOG_BEGIN
CHANGELOG_END

* tweak to use guards

* blind fix for 2.12

* try fix 2.12 build

* loose if-guard parens

* fixes for 2.12 build (should actually work this time!)
2021-07-06 16:43:49 +00:00
tudor-da
fe98c48b65
release 1.14.1-snapshot.20210706.7133.0.8ec16e94 (#10186)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-06 16:12:23 +00:00
Moritz Kiefer
4fe626a055
Drop logging on CompletionSource (#10190)
The debug logs don’t seem all that useful and we don’t have them for
other sources, e.g., TransactionSource. They also come with error logs
for failed sources which again is inconsistent with other sources,
noisy and confusing.

changelog_begin
changelog_end
2021-07-06 16:12:05 +00:00
Sofia Faro
582aa5f08c
Fix a typo in an exceptions example. (#10188)
changelog_begin
changelog_end
2021-07-06 14:03:18 +00:00
Gary Verhaegen
8750c0c47c
reduce noise in Scala bindings (#10187)
It's unlikely most clients will want all the details of the stack trace.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-06 15:02:40 +02:00
Sofia Faro
98b5ffee01
Add divulgence warning and test in script service. (#10179)
* Add divulgence warning and test in script service.

Part of #9947, building on the key visibility checks from #10136

This PR adds a divulgence warning inside the traceLog.
I wasn't sure whether:

1. these warnings should be kept in a separate structure from the
   traceLog, and therefore transmitted separately, or
2. these warnings should be kept together with traces, but the severity
   should be tracked and also transmitted over grpc, and warnings should
   be logged as warnings instead of as debug messages, or
3. these warnings should be kept together with traces, but
   logged as warnings instead of debug messages,
4. these warnings should be treated exactly like traces

I'm leaning toward #2, but this PR implements #3.

This PR tests the warning via the script service tests.

changelog_begin
changelog_end

* scalafmt

* Address Moritz's review

* Rename traceLog.add to traceLog.addDebug

* fix test

* Add test using exercise

* add single transaction test
2021-07-06 13:05:52 +01:00
nickchapman-da
8578e56aa7
Tests for transaction validation (#10167)
* Testing for Validation.isReplayedBy

changelog_begin
changelog_end

try fix scala 2_12 build

fetch node: samples and tweaks

list sig/insig field tweaks side-by-side so coverage is easier to eyeball

exerciseResult tweak sig & insig

add sig/insig tweak for byKey of Fetch node

add sig/insig tweak for key of Fetch node

must use ImmArray.empty instead of ImmArray() for scala 2.12

another blind attempt to fix scala 2.12

use for/yield instead of flatMap for list-comprehensions

test sig/insig tweaks to LookupByKey nodes

wont attempt to tweak rollbacks

(and shorten trailing dash in comment banners)

comment about how Tweak testing is organized

dont dep/import scalacheck (not used!)

no wild imports

* val --> private def

* def --> val

* prefer fail to println/assert(false)
2021-07-06 11:24:46 +00:00
azure-pipelines[bot]
05a72a3a15
update compat versions for 1.15.0-snapshot.20210705.7286.0.62aabcc4 (#10184)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-06 10:25:48 +02:00
tudor-da
7b93923c16
[In-memory fan-out] Performance optimizations [DPP-470] (#10127)
* [In-memory fan-out] Fix execution contexts in ReadOnlySqlLedgerWithMutableCache
* servicesExecutionContext is used in all non-resource components
* Remove widespread use of resourceContext

CHANGELOG_BEGIN
CHANGELOG_END

* [In-memory fan-out] TransactionLogUpdatesConversions optimization
* Lazily convert to transaction trees in TransactionLogUpdatesConversions.ToTransactionTree

* Addressed review comments
2021-07-06 09:11:46 +02:00
Stefano Baghino
6c49619565
Document how to run the Java codegen from the Daml assistant (#10181)
Downloading and running the JAR manually is so 2019.

changelog_begin
[Docs] Document how to use the Java codegen using the Daml assistant
changelog_end

Fixes #8817
2021-07-05 17:53:04 +02:00
Moritz Kiefer
61aa774988
Release SDK 1.15 RC (#10182)
changelog_begin
changelog_end
2021-07-05 17:44:47 +02:00
Remy
62aabcc478
Ledger API: bump version for LF 1.14 (#10175)
* Ledger API: bump version for LF 1.14

CHANGELOG_BEGIN

* Ledger API: bump version for LF1.14

CHANGELOG_END

* Update docs/source/support/compatibility.rst

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

* Update docs/source/support/compatibility.rst

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

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-07-05 13:54:25 +00:00
Gary Verhaegen
e29426bc7c
restore print of job metadata (#10176)
I just noticed I erroneously removed that line in #10162.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-05 13:44:08 +00:00
Moritz Kiefer
64497f6c10
Only run sandbox(classic)? on postgres tests on Linx (#10178)
They keep causing timeouts on MacOS and nobody seems to consider them
useful enough to investigate. For now I only disabled the postgres
tests because I haven’t seen the others time out but if they do I’ll
add them as well

changelog_begin
changelog_end
2021-07-05 13:41:59 +00:00
Moritz Kiefer
5f35380a21
Unhide JSON API metrics (#10177)
These were originally hidden in the first PR because the metrics were
very shaky. Now they are actually useful and mentioned in release
notes so hiding this option makes no sense.

changelog_begin
changelog_end
2021-07-05 13:25:00 +00:00
Gary Verhaegen
c1d8b1b318
compress bazel build logs (#10162)
Anecdotally, I see a 25x reduction in size when compressing. Time to
compress and decompress is negligible, whereas storage costs and transfer
times may not be.

Since, as far as I'm aware, we don't currently have anything depending
on the current format, I could run a script locally to transform all of
the existing logs to match the new format.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-07-05 14:15:22 +02:00
Gary Verhaegen
0e83d3ee45
add tar to dev-env (#10173)
It's already in default.nix, but there was no symlink in `dev-env/bin`.

I need it for #10162 but it felt worth a separate PR.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-05 12:26:35 +02:00
Stefano Baghino
83bc6ae921
Expect a conflated Txn when streaming out the ACS block (#10168)
Fixes #10161

changelog_begin
[JSON API] Fixed a bug that could sporadically make the streaming query
           endpoint crash. This bug only affected 1.15.x snapshot releases.
changelog_end
2021-07-05 10:42:55 +02:00
Jost Berthold
8a6e3ee95b
DEL-8657 update version info for Haskell LF libraries (#10160)
* DEL-8657 update version info for Haskell LF libraries

CHANGELOG_BEGIN
CHANGELOG_END

* DEL-8657 add a missing module
2021-07-02 09:46:53 +10:00
azure-pipelines[bot]
2381638f49
update NOTICES file (#10169)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-01 17:00:13 +00:00
Samir Talwar
e7e8a5705b
daml-lf/data: Optionally truncate party names in structured logs. [KVL-996] (#10163)
* daml-lf/data: Truncate party names in log output, on request.

The party name can grow quite long, so we offer ledger implementors the
opportunity to truncate it in structured log output.

Unfortunately, because we use Logback through the global
`LoggerFactory`, there is no place to inject logging configuration. This
means we also need to use global, mutable state to configure logging
output. I have added a `LoggingConfiguration` class+object in Daml-LF
Data, which may not be the best place, but I can't think of a better
one right now. I suggest we leave it there until it has reason to grow,
at which point we may want to move it.

CHANGELOG_BEGIN
CHANGELOG_END

* logging-entries: Make `ToLoggingValue` mixin-able.

* participant-integration-api: Truncate parties in filters when logging.

* participant-integration-api: Cast to `Party` for logging.

Invalid input should not break the request at this point. No assertions.

* daml-lf/data: Move `Party to LoggingValue` to a new package.

This avoids the transitive dependency issue most of the time.

* daml-lf-data: Move the `Identifier` logging to another package.

Again, reduces the need for transitively depending on _logging-entries_.
2021-07-01 16:50:49 +00:00
Samir Talwar
5493e4e2b1
language-support/scala/codegen: Set the logging level to WARN. (#10165)
I don't find the output from Bazel very helpful most of the time. It
does, however, produce a lot of noise which I have to filter through
when something else goes wrong.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-01 16:49:46 +00:00
Samir Talwar
65dfba44c9
docs: Suppress the output from unzip. (#10164)
It's loud.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-01 14:11:48 +00:00
Moritz Kiefer
b7bb391981
Retry bazel cache up & downloads (#10156)
This is still a bit rough. It currently retries regardless of the
error (however, with an exponential backoff and a limit so not that
big of an issue, at worst we waste some time retrying). We also print
the exception to stderr which is a bit nasty but useful for debugging.

I did verify in logs that we hit the retry code path and that things
seem to be properly cached.

I’ll clean this up & upstream this to Bazel once we have verified for
a few days/weeks that it works well for us.

Reviewing patch files is nasty so I recommend to take a look at the
branch in my Bazel fork instead
https://github.com/cocreature/bazel/tree/cache-retry.

changelog_begin
changelog_end
2021-07-01 14:40:29 +02:00
azure-pipelines[bot]
a304650169
rotate release duty after 1.15.0-snapshot.20210630.7261.0.84e1f3a7 (#10147)
@sofiafaro-da is taking care of 1.15.0-snapshot.20210630.7261.0.84e1f3a7 (#10146), so they get pushed back to the end of the line.

Please do not merge this before #10146.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-07-01 11:46:21 +02:00
mziolekda
40bec44bf9
Simple draw of stopping indexing upon unhealthy DbDispatcher (#10154)
changelog_begin
changelog_end

Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
2021-07-01 10:05:18 +02:00
Samir Talwar
eda1245311
daml-lf/data: Add a conversion from Ref.Identifier to LoggingValue. (#10157)
I am getting quite tired of (Bazel + Scala)'s attitude to transitive
dependencies.

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-30 20:05:06 +00:00
azure-pipelines[bot]
b88ad58712
update compat versions for 1.15.0-snapshot.20210630.7261.0.84e1f3a7 (#10151)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-30 19:53:51 +02:00
Remy
0a6df5c4db
LF: Clean Interpretation Error (#10145)
* LF: Clean Interpretation Error

part of #9974

CHANGELOG_BEGIN
CHANGELOG_END

* fix

* Address Mortiz' review

* fix
2021-06-30 16:49:48 +00:00
Samir Talwar
888f02aa4d
ledger-api-common: There's only one way to order absolute offsets. (#10153)
Let's not mess around with injectable orderings.

This has the pleasant side effect of removing dependencies.

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-30 14:17:59 +00:00
Kamil Bożek
9c7b506922
Increase timeout for TransactionServiceIT:TXFlatTransactionsVisibility (#10150)
CHANGELOG_BEGIN
CHANGELOG_END
2021-06-30 15:00:14 +02:00
Moritz Kiefer
fa80f1b615
Bump ghcide and upgrade to lsp/lsp-types (#10139)
* Bump ghcide and upgrade to lsp/lsp-types

changelog_begin
changelog_end

* Bump rev

changelog_begin
changelog_end
2021-06-30 12:16:12 +00:00
Samir Talwar
c929a14486
logging-entries: Split from contextualized-logging. [KVL-996] (#10149)
* logging-entries: Split from contextualized-logging.

This allows us to introduce it to Daml-LF without bringing in the
Logback, Logstash, and gRPC dependencies.

CHANGELOG_BEGIN
CHANGELOG_END

* logging-entries: Fix dependencies for 2.12.

* logging-entries: Missed one more Scala 2.12 dependency.

* release: Publish logging-entries.
2021-06-30 12:08:33 +00:00
Gary Verhaegen
f7cf7c75b5
add kibana (#10152)
This PR adds a Kibana instance to each ES node, and duplicates the load
balancer mechanism to expose both raw ES and Kibana.

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-30 14:08:03 +02:00
tudor-da
d5d6cfacff
[Mutable state cache] contractStateEvents bounded DB fetch size [DPP-464] (#10092)
* [Mutable state cache] TransactionsReader.getContractStateEvents bounded fetch page size

CHANGELOG_BEGIN
CHANGELOG_END

* Improved TransactionsReader.splitRange
* Removed explicit minChunkSize
* Added property check test

* Metrics for getContractStateEvents and getTransactionLogUpdates chunk fetch size

* Addressed review comments

* Adress Kamil's review comment

* Miklos' suggestion

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-06-30 09:25:07 +00:00