Commit Graph

3852 Commits

Author SHA1 Message Date
Leonid Shlyapnikov
4d3fa95e57
Minor docs update (#5468)
* minor docs update

changelog_begin
changelog_end

* merging two sections into one

changelog_begin
changelog_end
2020-04-07 15:46:38 +00:00
Remy
02648e17e2
notify Remy on #team-daml-ci (#5467)
* notify Remy on #team-daml-ci

* changelog

CHANGELOG_BEGIN
CHANGELOG_END

* Update ci/slack_user_ids

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-04-07 15:25:24 +00:00
Leonid Shlyapnikov
003065fb70
Empty array of party IDs -- error, nothing found -- OK (#5456)
* Empty array of party IDs -- error, nothing found -- OK, as per @hurryabit

changelog_begin
changelog_end

* fixing test description
2020-04-07 13:57:06 +00:00
Samir Talwar
5326db3bd9
kvutils/tools: Register more JVM metrics in the integrity checker. (#5463)
We now use the same metrics as a running ledger server.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 13:02:27 +00:00
Moritz Kiefer
ccacddbbc6
Add documentation for upgrading using DAML script and triggers (#5465)
* Add documentation for upgrading using DAML script and triggers

This PR adds documentation for how you can automate the upgrade
process from the Coin example using DAML Script and DAML Triggers.

Having written this, I think we might want to add some integration
tests for this but it’s rather complex to setup since it ties together
so many pieces so I’d like to leave it out for now. We do at least
test that the code compiles and we all knows that code that compiles
never has bugs.

changelog_begin
changelog_end

* Apply suggestions from code review

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>

Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
2020-04-07 14:36:40 +02:00
fabiotudone-da
945057b0a0
Fix Performance.dar not found during extraction (introduced #5377) (#5466)
* Fix `Performance.dar` not found during extraction (introduced #5377)

CHANGELOG_BEGIN
CHANGELOG_END

* Update comment about synchronizing .dar artifacts

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-07 14:30:38 +02:00
Moritz Kiefer
f75c2e03b1
Make a snapshot release (#5462)
This is intended to be the next stable release.

changelog_begin
changelog_end
2020-04-07 14:24:11 +02:00
Gary Verhaegen
9575f1bdb4
remove temp hack for 0.13.55 (#5464)
This PR reverts #5012.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 14:09:04 +02:00
Robert Autenrieth
4f5460f7e3
Dont deduplicate rejected transactions (#5393)
* Add failing test

The test can produce false negatives,
but locally it fails 10 out of 10 times.

* Stop deduplicating commands after rejections

Fixes #5338.

CHANGELOG_BEGIN
CHANGELOG_END

* Only deduplicate successful transactions

* Use pass instead of pure unit

* Handle exceptions
2020-04-07 12:45:19 +02:00
Samir Talwar
10bac143fc
kvutils: Simplify calculating the weight of a Caffeine cache. (#5461)
* kvutils: Simplify calculating the weight of a Caffeine cache.

And remove an errant `println` that slipped through the cracks.

Thank you to @ben-manes for the tip!

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Make classes final and defs into vals.

Co-Authored-By: Stefano Baghino <stefano.baghino@digitalasset.com>

Co-authored-by: Stefano Baghino <stefano.baghino@digitalasset.com>
2020-04-07 10:05:47 +00:00
Gerolf Seitz
b38766092c
Use com.daml in Performance Envelope tests (#5460)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 11:12:53 +02:00
Nemanja
59c020442b
Added daml2js diagrams (#5451)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 10:54:40 +02:00
Samir Talwar
77e83c629b
sandbox: Merge LotsOfParties tests into the main conformance test run. (#5459)
We do this for Sandbox Next™; we can do it for Sandbox Classic™ too. It
doesn't seem to have much of a noticeable impact on the test run time,
and reduces the number of exclusive tests, which is helpful.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 08:45:45 +00:00
Gerolf Seitz
c7e6418c73
Add legacy proxy gRPC services. (#5441)
* Add legacy proxy gRPC services.

This exposes the services as com.digitalasset as well, to ensure that
applications built with a previous release of the SDK continue to work
with the Ledger API.

Due to how the gRPC reflection service works, this doesn't expose the
com.digitalasset services on the reflection api, and thus grpcurl won't
work with the old services. These scripts need to be updated to refer to
the com.daml services.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 10:45:41 +02:00
Moritz Kiefer
6af5b97273
Split up repl tests to make them faster (#5450)
* Split up repl tests to make them faster

This PR splits up the tests into the tests for TLS and Auth and the
tests for the actual functionality.

The func tests use the repl as a library which allows them to be
significantly faster:

1. We only need to start the service process once.
2. We only need to initialize the package db once.

There is at least one other point that I did not address for now and
that is only loading the packages into the repl service once. While
loading them multiple times is a noop, it still has a performance
implication.

Sadly, this has turned out much more messy than I thought it would be
due to various issues with haskeline/repline/tasty/computers. The
details are in a comment in DA.Test.Repl.FuncTests.

changelog_begin
changelog_end

* Try to nuke cache on window selectively

* Enable cache again
2020-04-07 10:22:15 +02:00
Gerolf Seitz
cadaa59ad8
Fix redirects, java-bindings javadoc, and live-preview.sh (#5446)
* Fix redirects, java-bindings javadoc, and live-preview.sh

- javadoc_library now supports sources from filegroups as well
- //language-support/java:javadoc now generates javadoc for ledger-api, java bindings, rxjava bindings
- live-preview.sh refers to the correct javadoc target //language-support/java:javadoc
- removed leading / from redirects.map

* Only generate daml-lf javadocs if not on windows

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 09:53:26 +02:00
Leonid Shlyapnikov
644740f3c3
JSON API: Fixing ledger offset ordering (#5458)
changelog_begin
changelog_end
2020-04-07 09:11:41 +02:00
Gary Verhaegen
66e7068b39
better Windows machine names (#5374)
This is a small QoL improvement, mostly targeted at myself: have Windows
agents register with Azure using the name they display on the GCP
console, so I don't need to find a build and look at the "Agent
Diagnostics" step to figure out the corresponding between Azure and GCP.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 01:33:36 +02:00
Samir Talwar
6563048d5b
kvutils: Cache state value conversions from bytes. (#5426)
* kvutils: Cache state value conversions from bytes.

This seems to have a decent speedup in ledger-on-memory.

CHANGELOG_BEGIN
- [Ledger Integration Kit] Submissions now look up ledger values from a
  cache where possible, improving performance when there's contention over
  certain resources (e.g. common packages). The cache size currently
  defaults to 64 MB.
CHANGELOG_END

* kvutils: Make the SubmissionValidator statue value cache configurable.

* kvutils: Report state value cache metrics.

* kvutils: Add a suffix to a Long literal because WartRemover is unhappy.

Strangely, it doesn't fail on my machine.

* kvutils: Extract caching out into its own file.

* kvutils: Move the `bytesToStateValue` call into `cache.get`.

* kvutils: Move caching to its own package.

* kvutils: Inject the state value cache.

* kvutils: Default to no state value cache.

* kvutils: Accept a state value cache size in megabytes, not bytes.

* kvutils: Move cache building from `Config` to the `caching` package.

* kvutils: Replace Guava's cache with Caffeine.

* kvutils: Simplify caching configuration.

* sandbox: Enable state value caching by default.

CHANGELOG_BEGIN
- [Sandbox] State values deserialization is now cached, with a fixed
  cache size of 128MB.
CHANGELOG_END

* Changelog commit.

CHANGELOG_BEGIN
- [Ledger Integration Kit] The state value cache is now opt-in, with a
  default of no cache at all.
CHANGELOG_END
2020-04-06 17:30:32 +00:00
Martin Huschenbett
28627a665f
Refactor daml-assitant ITs regarding yarn (#5453)
There are multiple tests that setup an environment for yarn to find
our TypeScript libraries. This PR unifies this setup by providing a
single function to set it up.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-06 18:28:39 +02:00
fabiotudone-da
2a5a15d625
PingPong throughput and latency benchmarks for on-mem and on-sql (#5377)
* Draft of PingPong throughput and latency benchmarks for on-mem and on-sql ledgers

* Augment `ParticipantTestContext` and remove `LedgerApiServer` hack

* Separate performance tests into distinct category with concurrency 1

* 🎨

* Package performance tests in separate DAR

* Have performance tests excluded by default and run exclusively if passed

* Fix rebase

* Simplify `BenchmarkReporter`

* Make `concurrencyOverride` into an `Option`

* Clarify command line usage, prevent regular and perf. tests together

* Fix preventing regular and perf. tests together

* Split `PingPong`, `PingPongExplode` and `Cycle` benchmarks' model

CHANGELOG_BEGIN
- [TestTool] Add `PingPong` performance envelope test
CHANGELOG_END

* Explicitly name `concurrencyOverride`

* Fix formatting

* Lower bar for CI run of performance envelope tests

* Make benchmark output file configurable

* Improve messages and report config option name

* Use exit status 64 for "bad command line usage" as in BSD
2020-04-06 18:01:10 +02:00
Leonid Shlyapnikov
26c476d3cd
Commenting out local maven repository config (#5452)
changelog_begin
changelog_end
2020-04-06 11:55:13 -04:00
Robin Krom
044783ef72
language:docs: correct TypeScript/JavaScript typings (#5421)
We use the official typings, i.e. TypeScript/JavaScript.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-06 17:24:44 +02:00
associahedron
201d17fe54
Update daml install docs (#5448)
* Update daml install docs

changelog_begin
changelog_end

* Note about snapshots
2020-04-06 15:07:16 +00:00
Remy
50694c7abe
DAML-LF. fix parameter and self binder in choices. (#5444)
* DAML-LF. fix parameter and self binder in choices.

* fix

* DAML-LF: address moritz's comments

* changelog

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-06 14:32:30 +00:00
Gary Verhaegen
10fefbae00
remove temp Windows machine (#5445)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-06 16:24:51 +02:00
Robin Krom
dc1f9a9aa0
language: docs: update on daml2js in app-arch section (#5449)
* language: update on daml2js in app-arch section.

Update on the app-arch section in respect to daml2js. This is slightly
more precise about the contents of the generated libraries.

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/app-dev/app-arch.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update docs/source/app-dev/app-arch.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-04-06 13:55:21 +00:00
Robert Autenrieth
8397467712
Wait for removing deduplication entries (#5442)
* Wait for removing deduplication entries

This addresses a potential race condition

CHANGELOG_BEGIN
CHANGELOG_END

* Fix broken code
2020-04-06 15:54:20 +02:00
Remy
37cda0e2cb
Engine: increase memory for large transaction test (#5447)
* Engine: increase memory for large transaction test

* changelog

CHANGELOG_BEGIN
CHANGELOG_END

* address Moritz's comments
2020-04-06 13:40:49 +00:00
Robin Krom
a413c1cec9
Replace file globs in ts package BUILD files (#5424)
* language: remove file globs from ts library BUILD files

We replace them with toplevel `sources` definition, since sadly
filegroups don't work here.

CHANGELOG_BEGIN
CHANGELOG_END

* update app-arch section regarding daml2js

* remove files field in tsconfigs
2020-04-06 13:07:27 +02:00
Remy
943919585e
Java Codegen: fix template code generation (#5443)
* Java Codegen: fix template code generation

* changelog

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-06 08:56:51 +00:00
Leonid Shlyapnikov
0842866f25
Scala codegen examples: removing bintray repository, relying on daml.yaml and -Dda.sdk.version (#5436)
* Removing bintray repository, relying on daml.yaml and -Dda.sdk.version

to resolve DA SDK version.

changelog_begin
changelog_end

* Fixing scalafmt

* cleanup

* Adding local maven repo, you can run examples against local dev SDK 0.0.0
2020-04-06 06:33:30 +00:00
Gerolf Seitz
a2d785e3ee
Use com.daml as root package (#5343)
Packages com.digitalasset.daml and com.daml have been unified under com.daml

Ledger API and DAML-LF DEV protos have also been moved from `com/digitalasset`
to `com/daml` on the file system.
Protos for already released DAML LF versions (1.6, 1.7, 1.8) stay in the
package `com.digitalasset`.

CHANGELOG_BEGIN
[SDK] All Java and Scala packages starting with
``com.digitalasset.daml`` and ``com.digitalasset`` are now consolidated
under ``com.daml``. Simply changing imports should be enough to
migrate your code.
CHANGELOG_END
2020-04-05 19:49:57 +02:00
Rohan Jacob-Rao
0b63db4ac6
Make ledger id configurable in .env file (#5437)
This allows for easier deployment to non-sandbox ledgers.
Docs on deployment for create-daml-app are in the works.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-04 16:24:14 -04:00
Moritz Kiefer
ee04cbe2e2
Fix protobuf file name (#5440)
Calling a zip archive .tar.gz is rather confusing. The good news is
that apart from this, the release did work successfully this time so
not going to attempt another one until the proper 1.0 release.

changelog_begin
changelog_end
2020-04-04 22:18:58 +02:00
Moritz Kiefer
66f53292e7
Snapshot release (attempt 3) (#5439)
Last one failed at the end when publishing the protobuf, hopefully
should be fixed now.

changelog_begin
changelog_end
2020-04-04 19:41:19 +02:00
Moritz Kiefer
30f2c7421a
Only publish protobuf zip from Linux (#5438)
Last release attempt failed because when we tried to publish it from
macos it was already published from Linux.

Also includes a fix for the name of the zip.

changelog_begin
changelog_end
2020-04-04 17:58:21 +02:00
Moritz Kiefer
06ef97d6a8
Snapshot release (attempt 2) (#5433)
First one failed due to a race in the release notes.

changelog_begin
changelog_end
2020-04-04 08:50:58 +02:00
Shayne Fletcher
47541e7037
Fix typo (#5435)
changelog_begin
changelog_end
2020-04-03 18:13:41 +00:00
Stephen Compall
ff68252266
Freeze JSON API v1 (#5387)
* move JSON API doc to "Building applications"

* stop describing JSON API as experimental; limit to calling WebSocket endpoints alpha

* remove "(experimental)" from daml json-api docstring

* add changelog

CHANGELOG_BEGIN
- [JSON API] First stable version of the ``/v1`` endpoints, with
  the exception of the WebSocket endpoints, which remain in alpha.
  See `issue #4458 <https://github.com/digital-asset/daml/issues/4458>`_.
CHANGELOG_END

* move json-api in PDF ToC, adapting to #5411 c496e2bf05

- pointed out by @cocreature; thanks
2020-04-03 13:58:17 -04:00
Moritz Kiefer
55f376271d
Tweak note about requiring DAML-LF 1.8 (#5431)
changelog_begin
changelog_end
2020-04-03 19:02:54 +02:00
Stefano Baghino
a7474f4c50
Fix test for groupContiguous (#5432)
* Fix test for groupContiguous

Automatic generation of test values was prone to cause flakiness, removed in favor of a simpler test case.

changelog_begin
changelog_end

* Relax order sensitivity

* Update ledger/sandbox/src/test/suite/scala/com/digitalasset/platform/store/dao/events/GroupContiguousSpec.scala

Co-Authored-By: Remy <remy.haemmerle@daml.com>

* Fix compilation issue

Co-authored-by: Remy <remy.haemmerle@daml.com>
2020-04-03 16:58:03 +00:00
Moritz Kiefer
e4ec7ab405
Publish snapshot release (#5429)
This is not intended to be the next stable release, I just want to
test the Bintray removal and publishing the protobufs to github releases.

changelog_begin
changelog_end
2020-04-03 18:22:48 +02:00
Shayne Fletcher
a1abfa7fb1
Rename daml codegen ts to daml codegen js (#5409) (#5427)
I've completely removed the possibility to call `daml codegen ts`. I'm
happy to add in back in a followup PR once I've seen that all our tests
pass without it existing.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-04-03 16:00:36 +00:00
Rohan Jacob-Rao
3895c2d01f
Replace quickstart with new getting started guide (#5392)
* Move quickstart to java bindings section

* Change title of quickstart to Getting Started with ...

* Move GSG to Getting Started (and rename in index)

* Rewrite a bunch of references to quickstart

* Update reference and give more specific name

changelog_begin
- [Docs] Replace IOU quickstart with full stack Getting Started Guide
changelog_end

* Replace daml-ledger link

* Use getting started guide in redirects
2020-04-03 15:44:19 +00:00
Andreas Herrmann
e3c9bf9615
Remove debug output in REPL test (#5430)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-04-03 15:17:34 +00:00
Martin Huschenbett
ccfb17c91b
Rename daml codegen ts to daml codegen js (#5409)
I've completely removed the possibility to call `daml codegen ts`. I'm
happy to add in back in a followup PR once I've seen that all our tests
pass without it existing.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-03 14:54:46 +00:00
Bernhard Elsner
c496e2bf05
Relabel "Experimental" to "Early Access" and reorganise pages (#5411)
CHANGELOG_BEGIN

- Move daml2ts, bindings-ts and JSON API out of experimental section in docs
- Rename Experimental to Early Access in docs and assistant
- Reorganise the docs a little bit to de-emphasise the Ledger API

CHANGELOG_END
2020-04-03 16:29:22 +02:00
Moritz Kiefer
62da572b35
Stop publishing to Bintray (#5422)
This PR removes the code for publishing to Bintray and updates the
documentation to point to github releases or Maven central.

I had to slightly change the docs formatting since trying to use
markup in code blocks results in a horrible layout and I don’t want to
fix that atm.

I’ve removed all artifacts that were only published to Bintray.

changelog_begin
changelog_end
2020-04-03 16:22:00 +02:00
Martin Huschenbett
ba27ea9af4
create-daml-app: Import generated package without version (#5423)
Our plan for `daml2js` is to populate the `name` and `version` field
of the generated `package.json` files with the name and version of
the input DALF. Once this is done, you would expect to refer to the
package generated from `create-daml-app-0.1.0.dar` via
```typescript
import ... from '@daml.js/create-daml-app';`
```

Since we currently depend on the package by file paths anyway, we can
already pretend to have the right behavior in place.

In this style you can also depend on two different versions of the same
DAML package. This will happen during upgrades, a situation we're
already facing in DAVL. There it can be solved via the following two
lines in the `dependencies` field of the `package.json`:
```
  ...
  "davl-v4": "file:../daml.js/davl-0.0.4",
  "davl-v5": "file:../daml.js/davl-0.0.5",
  ...
```

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-03 15:58:16 +02:00