Commit Graph

4460 Commits

Author SHA1 Message Date
Robin Krom
85224e0ca6
snapshot release (#5796) 2020-04-30 16:31:24 +02:00
Moritz Kiefer
288f9479df
Fix warning in DAML-LF test DAR (#5798)
I finally got sufficiently annoyed seeing the warning scroll by in
build logs that I fixed it.

changelog_begin
changelog_end
2020-04-30 15:57:13 +02:00
Gary Verhaegen
ed13afc56a
fix overeager docs cron (#5797)
Currently the docs cron _always_ decides it has something new to
publish. This PR fixes that.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:31:38 +02:00
Gary Verhaegen
681c862d88
fix daml extension upload (#5780)
With the current setup, we always push whatever version GitHub considers
as the latest, which is defined by date. This means that at the moment a
patch release could overwrite a less recent but higher-version release,
essentially downgrading the SDK to a previous, presumably less good user
experience.

This patches the upload process to choose the highest-numbered release
instead of the most recent one by date.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:10:30 +02:00
Moritz Kiefer
8c25bc4de5
Fix find: ./local-spawn-runner not found issue (#5793)
CWD will be set to the same execroot for all targets on Windows. While
this will contain the things we are searching for it contains a whole
bunch of other stuff and in particular it can also change during the
execution of `find`. This resulted in errors with temporary files such
as the local-spawn-runner-* stuff that appear and disappear while
find is running.

This PR switches it to a tmp dir which works around this issue and
makes more sense anyway since we clearly don’t want to search in the
whole execroot.

changelog_begin
changelog_end
2020-04-30 15:09:04 +02:00
Gary Verhaegen
32fbf040aa
fail collect_build_data for windows_compat (#5779)
At the moment, collect_build_data will wait for the Windows
compatibility test to have "finished", but doesn't check its return
status. This means two things:

1. Should the compatibility test end without a success or error (e.g.
   communication broken between Azure and the node), the option to rerun
   failed jobs will not appear, as there will be no failed job.
2. The subsequent notify_user step will ignore failures in the
   compatibility_windows job when reporting to Slack, making for
   confusing reports.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:03:03 +02:00
Gary Verhaegen
f044dcebca
fix sitemap generation (#5775)
With the change in release model (VERSION to LATEST), I forgot to change
the workspace_status script. The result is that our sitemap will forever
indicate all the pages in the docs have been last modified on Feb 25,
discouraging search engines from indexing them again at any point since.

This PR fixes that by updating the workspace_status script, which
hopefully should result in search engines indexing us again.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:02:08 +02:00
Gary Verhaegen
dd37430c40
fix typo in link in docs (#5787)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:00:38 +02:00
Gary Verhaegen
ecb7636c2a
nuke the Bazel cache (#5782)
* nuke the Bazel cache

This is a bit of a nuclear option as we cannot figure out how to repair
the cache in place. It seems (somewhat) clear that the cache is
corrupted for Windows builds, but we're out of ideas on either how to
test it to fully confirm or how to repair it.

This PR will consist of two commits: one with the Bazel cache definition
commented out (this one), and then one that reverts it. This will result
in a no-change commit when squashed on master, but should serve as an
audit trail for the accompanying Standard Change (as I consider dropping
the entire cache outside of routine maintenance).

CHANGELOG_BEGIN
CHANGELOG_END

* run Windows build with no Linux node

Normally our Windows builds only start after a Linux node has run the
`check_for_release` step. This commit bypâsses that so this PR can run
while all the other ones are stuck in the Linux queue.

* Revert "nuke the Bazel cache"

This reverts commit f7cd68e080, recreating
the Bazel cache.

* populate macos cache and test Windows one

* revert all changes in this PR
2020-04-30 14:44:10 +02:00
Rohan Jacob-Rao
af8895b487
Trigger service: endpoint to list running triggers for a party (#5770)
* Endpoint to list all triggers (not yet by party)

* Clean up test code a little

changelog_begin
changelog_end

* Test for listing running triggers

* Respond with JSON list instead of random text

* List triggers by party

Pass party name in request body.
Store another map of party name to set of trigger ids.
Also store party names in the values of the original trigger id map, so
we can update the party map when stopping a trigger.
2020-04-29 14:43:56 -04:00
Samir Talwar
0ae62b50e4
sandbox: Mark the ResetService tests as flaky. (#5778) 2020-04-29 15:17:45 +02:00
Stefano Baghino
c709f91a73
Adjust PostCommitValidation (#5774)
* Adjust PostCommitValidation

- do not require a party for validation (to validate divulged contracts)
- stop validation after first error and don't accumulate rejection reasons
- address 01da7393b3 (r416719399)

changelog_begin
changelog_end

* Use participant state rejection reasons, drop unused submitter parameter from validation
2020-04-29 12:55:16 +00:00
Martin Huschenbett
cebc26af88
Make DAML execution benchmarks more flexible (#5771)
Instead of always benchmarking the hardcoded scenarios, we can now
pass a DAR and a scenario to the benchmark as well.

This is part of https://github.com/digital-asset/daml/issues/5746.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-29 12:41:43 +02:00
Stephen Compall
067f3c987d
require https reverse proxy (#5660)
* new --leak-passwords-firesheep-style option; functions to check forwarded protocol

* enforce https reverse-proxy in all JWT-accepting endpoints

* make HttpService.start take config record

* test that X-Forwarded-Proto or Forwarded is enforced

* use new start signature in daml-script tests

* use insecure http mode for ts codegen tests

* note on regex

* use insecure option in daml assistant integration tests

* log allowNonHttps setting

* add non-https option to more places in daml-assistant tests

* add non-https option to getting started guide

* rename --leak-passwords-firesheep-style to --allow-insecure-tokens

- per suggestion by @garyverhaegen-da, @hurryabit

CHANGELOG_BEGIN
- [JSON API] By default, checks that connections are made through a reverse-proxy
  providing HTTPS, ensuring that JWT tokens don't leak.  To disable this check,
  such as for development, pass ``--allow-insecure-tokens``.
  See `issue #5572 <https://github.com/digital-asset/daml/issues/5572>`_.
CHANGELOG_END

* daml start includes --allow-insecure-tokens by default

- as indicated by @cocreature
2020-04-28 14:33:38 -04:00
Moritz Kiefer
3787a23948
Refactor damlc visualize tests (#5761)
This moves the code from the Shake testing module to a separate
module. This is required since the Shake test setup is not really
intended to test multiple packages. I’ve added a new test suite that
makes use of this and has an expected failure for the issue with
multiple packages. The issue is not actually fixed in this PR, I just
wanted to keep the refactoring separate since it is quite large and
noisy.

changelog_begin
changelog_end
2020-04-28 19:29:14 +02:00
Leonid Rozenberg
95f10f1afb
Fix typo of extra d (#5762)
changelog_begin
changelog_end
2020-04-28 19:21:40 +02:00
Stefano Baghino
f71ab92ea5
Implement replacement for post-commit validation (#5737)
* Implement replacement for post-commit validation

PostCommitValidation is meant as a replacement for ActiveLedgerState and
ActiveLedgerStateManager for JdbcLedgerDao so that the old table can eventually
be retired and post-commit validation can happen on the new participant schema.

This commit simply introduces the implementation and tests it in isolation.

Integration with the existing system will come in a separate contribution.

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/5737#discussion_r415918949

* Address https://github.com/digital-asset/daml/pull/5737#discussion_r415921207

* Add tests for the empty ledger scenario and introduce necessary fixes

* Add more tests for fetch and using some prior history

* Add tests for divulged contracts
2020-04-28 18:53:52 +02:00
Leonid Shlyapnikov
102f6b3888
Use a custom Gen instead of Arbitrary, to generate nonempty Vec[Int], (#5763)
* Use a custom Gen instead of Arbitrary, to generate nonempty Vec[Int],

the test could fail on empty input, it expects at least one input message

changelog_begin
changelog_end

* Address code review comments
2020-04-28 16:25:09 +00:00
Samir Talwar
c1e1ee4d4b
Sandbox: Split LedgerApiServer up a little. (#5758)
* sandbox: Split up LedgerApiServer.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Extract out API service construction from LedgerApiServer.

* sandbox: Pull out a case class for GrpcServerOwner event loop params.

* sandbox: Split ownership of `ApiServices` from the object.
2020-04-28 15:44:31 +00:00
Robin Krom
7e070d6d16
language:docs: fix link in README of generated ts. (#5745)
While it's replaced already in the shipped docs together with the npm
package, it wasn't fixed on docs.daml.com.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-28 16:10:13 +02:00
Moritz Kiefer
49e19ebed1
Make compat tests work on windows (#5732)
* Make compat tests work on windows

This required some changes to the daml_sdk rule since the read-only
installation by the assistant breaks Bazel completely. We could only
apply those changes on Windows but I think I prefer the consistency
across platforms here over trying to stay close to how the SDK is
installed on user machines given that the SDK installation is not
something we’ve had issues with.

I’ve excluded the postgresql tests for now. I don’t expect them to be
particularly hard to fix but I’ve already spent almost 2 days on this
and having some tests run on Windows seems like a clear improvement
over running no tests on Windows :)

changelog_begin
changelog_end

* Remove todo

changelog_begin
changelog_end
2020-04-28 16:06:36 +02:00
Miklos
d6c5a2532d
Add counting future metrics (#5743)
* Added counting metrics.

* Code tidying.
CHANGELOG_BEGIN
CHANGELOG_END

* Rename based on review suggestion.
2020-04-28 13:58:15 +00:00
Martin Huschenbett
ea50c329f2
DAML Exec Perf: Add simple benchmark for scenario interpreter (#5747)
We add a benchmark for running a sufficiently big scenario. This PR is
more about setting up the benchmarking infrastructure rather than the
actual benchmark itself.

This is part of https://github.com/digital-asset/daml/issues/5746.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-28 14:44:29 +02:00
Gary Verhaegen
cfae3df7fa
report compat status every day (#5744)
I believe the compatibility check is important enough, and should fail
rarely enough, that it is worth reporting even on success. This will
mean (once we support Windows) 3 messages a day, sent while presumably
nobody is working, so the disruption should be minimal.

The issue with reporting only on failures is that, if we don't
proactively check (which we do for the state of master for different
reasons, but would likely not keep doing for a job that doesn't block
PRs), we may get into a state where it is so broken that it doesn't even
report.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-28 12:30:45 +02:00
Gary Verhaegen
54d6782be3
drop v from release titles (#5742)
This is a minor, cosmetic change. Note that all our references to
releases are based on tags, and do not depend on the release title. This
is evidenced by the fairly random titles we used to have before the
title was set by CI, see e.g.
[0.13.35](https://github.com/digital-asset/daml/releases/tag/v0.13.53).

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-28 11:51:16 +02:00
mziolekda
bbd21605f5
add readme that details the usage of integrity check tool (#5685)
* add readme that details the usage of integrity check tool

* Apply suggestions from code review

Addressing review comments

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-28 09:18:35 +02:00
Remy
bb111ea3cc
Engine: fix value transaltion. (#5716)
In the call back of `SBUFetch` when asking the ledger for a contract the translateValue may raise an exception.
However it is not safe as the engine cannot recover such error.

We create a new Control for the speedy machine, that handle safely the translation.

CHANGELOG_BEGIN
CANGELOG_END
2020-04-27 21:56:53 +02:00
Stephen Compall
00025a5337
reduce test count for Ordering tests (#5741)
* reduce test count for Ordering tests

CHANGELOG_BEGIN
CHANGELOG_END

* changed the wrong one in ValueSpec; preserves base order is redundant for primitives
2020-04-27 14:31:37 -04:00
Gary Verhaegen
b2fc953250
extend visual for exerciseByKey (#5739)
* extend visual for exerciseByKey

Fair warning: I have no idea what I'm doing here. Please review
carefully.

This commit extends the `daml damlc visual` command to draw a line for
exerciseByKey choices. This fixes #5726.

I have not been able to find any existing test for the visualizer. If
non exist, I think we should at least turn #5726 into a test case,
checking that the expected dot file gets generated. I suggest doing that
as a separate PR though.

If there is already a suite of tests, please point me to it and I'll
happily add one for this.

CHANGELOG_BEGIN
[Visualization] Fix a bug where `exerciseByKey` was not properly
recognized. See #5726.
CHANGELOG_END

* add test
2020-04-27 18:51:40 +02:00
Andreas Herrmann
effd05b894
Include daml ledger tests in compatibility tests (#5740)
* Copy daml ledger test to compatibility

Specifically:
- `daml-assistant/daml-helper/test/DA/Daml/Helper/Test/Deployment.hs`
- `libs-haskell/test-utils/DA/Test/Sandbox.hs`

* Adapt daml ledger test for compatibility

Avoid dependencies on the daml repository and make the SDK and platform
components configurable.

* Add test certificates to compatibility

Taken from `@daml//ledger/test-common/test-certificates`.

* Define daml_ledger_test

CHANGELOG_BEGIN
CHANGELOG_END

* Add note on keeping daml ledger tests in sync

* ./fmt.sh

* Strictly require --sdk-version flag

Tasty doesn't allow options without a default value, so we default to
`error` to enforce a value being set.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-04-27 16:13:16 +00:00
Moritz Kiefer
d1db5c1c96
Set buffering of the docs cron job to LineBuffering (#5735)
I am hoping this will make the Azure output a bit more chatty. At the
moment, you don’t get any output until the job has finished which is a
bit annoying (although not really an issue).

changelog_begin
changelog_end
2020-04-27 15:29:08 +02:00
Gary Verhaegen
e344c6efa1
fix compatibility test (#5736)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-27 13:15:48 +00:00
Gary Verhaegen
7ceda5678a
run compatibility tests on macos (#5723)
This PR extends the existing Linux compatibility tests to run on macOS
too. Fixes #5692.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-04-27 14:55:16 +02:00
Andreas Lochbihler
172e913520
fix definition of actors for fetch in ledger model (#5734)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-27 13:39:36 +02:00
Andreas Herrmann
7b1dbddf15
Configure Bazel repository cache for build (#5733)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-04-27 10:10:21 +00:00
Gerolf Seitz
690092e066
Sandbox: Properly respect --log-level parameter (#5717)
In #5419 we set specific loggers to WARN or ERROR so that we avoid noisy
logging by default.  However, if the user specifies the --log-level CLI
param, not only the root logger, but also other loggers set in logback.xml
should log at that level.

CHANGELOG_BEGIN
[Sandbox] Properly respect the --log-level CLI parameter
CHANGELOG_END
2020-04-27 08:24:21 +02:00
Stephen Compall
d4086080ea
proper GenMap Gen with key Value order (#5526)
* add Order instances to various types in LF data, transaction

* define scope-dependent Order for Value; test compatibility with SValue order

* support Order in TypedValueGenerators

* generate properly-ordered ValueGenMaps in TypedValueGenerators

* factor genAddend and genAddendNoListMap

* test Value.orderInstance fidelity with well-typed Orders

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* shrink Maps for better debugging

* line up base List and GenMap orders with svalue

* unhandled cases in custom comparator for ApiValueToLfValueConverter tests

- hazards of not using match2

* adapt to PureCompiledPackages changes
2020-04-24 17:57:12 -04:00
Moritz Kiefer
350f7bb1e7
Fix optPow and errPow (#5722)
The last multiplication in both ended up being exponent * result
instead of base * result. I’ve renamed the variables since that makes
this trivial to spot and I’ve added a simple scenario that actually
tests this.

changelog_begin
changelog_end
2020-04-24 17:28:56 +02:00
Moritz Kiefer
0d1f21e4a2
Extend compatibility tests to test against HEAD (#5714)
fixes #5691

changelog_begin
changelog_end
2020-04-24 14:43:35 +02:00
Moritz Kiefer
7f2a950da0
Fix ./fmt.sh check (#5718)
* Fix ./fmt.sh check

We accidentally introduced hlint lints when we added the compatibility
workspace. The hlint code in ./fmt.sh correctly detects that there is
a hint but then exits with 0 since it uses the exit code from `echo`
rather than the one from `hlint`. The info that we printed with
`echo` didn’t actually make any sense so I added a new comment as to
why we run hlint here. This requires some setup changes so that the
compatibility workspace gets the same Haskell flags since otherwise
using the same hlint rules obviously does not make sense.

Fixes #5701

changelog_begin
changelog_end

* Update fmt.sh

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-24 12:04:14 +00:00
Moritz Kiefer
bed6a2ed51
Include latest snapshot in compatibility tests (#5709)
changelog_begin
changelog_end
2020-04-24 12:21:28 +02:00
Moritz Kiefer
df16cf7094
Extend compatibility tests to DAML on SQL (#5705)
* Extend compatibility tests to DAML on SQL

This feels a bit hacky since the runfiles don’t work quite like I
would expect them to but it’s at least not more hacky than what we do
for the head-based tests we currently have.

Progress towards #5695

changelog_begin
changelog_end

* Fix runfiles with more bash

changelog_begin
changelog_end

* remove redundant port options

changelog_begin
changelog_end

* Create fewer sandbox targets

changelog_begin
changelog_end

* Apply suggestions from code review

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Fix runfiles snippet

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2020-04-24 12:08:32 +02:00
Moritz Kiefer
f61aadc422
Add dade-assist step to compat cron job (#5712)
changelog_begin
changelog_end
2020-04-24 11:25:14 +02:00
Robert Autenrieth
49c6a20f0a
Remove duplicate ledger time field (#5698)
The duplicated information was not always in sync.

Fixes #5662

CHANGELOG_BEGIN
- [Sandbox] Fix an issue where the sandbox would sometimes reject transactions
  with a "INVALID_ARGUMENT: Disputed" error if either of
  ``min_ledger_time_rel`` or ``min_ledger_time_abs`` was set in the
  submission request.
CHANGELOG_END
2020-04-24 10:02:26 +02:00
Remy
0f75bf3fde
Scenario service: fails when trying to lookup not visible key (#5561)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-23 21:55:39 +02:00
Stefano Baghino
bed58c7e12
Avoid instantiating new implicit conversions for every query (#5706)
* Avoid instantiating new implicit conversion for every query

changelog_begin
changelog_end

* Make HashToStatement an object as well

* Address https://github.com/digital-asset/daml/pull/5706#discussion_r413896788
2020-04-23 16:55:58 +00:00
Moritz Kiefer
0e5aa4bebf
Remove -o config from PostgresAround (#5707)
We already specify those values in the config file.

changelog_begin
changelog_end
2020-04-23 16:08:37 +00:00
Moritz Kiefer
7063e30b76
Configure python toolchain via nixpkgs_python_configure (#5702)
changelog_begin
changelog_end
2020-04-23 17:30:32 +02:00
Sofia Faro
6047cca194
daml-docs: Generate Hoogle database with anchor table from generating docs. (#5704)
* Fix all DAML hoogle links.

This PR changes how the hoogle database is rendered in damldocs, so it has access to the mapping of anchors to URLs that is produced during rendering of rst docs. This way these will not get out of sync.

I also added an --output-anchor option in preparation for fixing external/cross-package references.

changelog_begin
changelog_end

* Update settings.json

undo accidental vscode settings change.

* Update README.md
2020-04-23 16:12:48 +01:00
Remy
15354c3256
DAML-LF: remove submitter is in maintainer check (#5611)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-23 16:10:39 +02:00