Commit Graph

713 Commits

Author SHA1 Message Date
Robin Krom
5af58a1652
interfaces: doc generation for interface methods (#12096)
This adds documentation generation for interface choices and methods.

CHANGELOG_BEGIN
CHANGELOG_END
2021-12-15 13:57:09 +00:00
Sofia Faro
d1fb5e442c
interfaces: Implement 'requires' syntax (#12105)
* interfaces: Implement 'requires' syntax

part of: https://github.com/digital-asset/daml/issues/11978

ghc counterpart: https://github.com/digital-asset/ghc/pull/92

changelog_begin
changelog_end

* .

* ...

* ...

* ....

* ....

* update bazel-haskell-deps

* use requires syntax in tests

* .......

* .......

* update bazel-haskell-deps

* update InterfaceDesugared

* .........

* update bazel-haskell-deps

* ...........

* update bazel-haskell-depos

* update compile.yml

* update bazel-haskell-deps
2021-12-14 12:19:52 +00:00
Moritz Kiefer
346fecbb03
Publish damlc tarball cross-platform (#12103)
For now, I’ve emitted Windows since this is not an artifact we want to
publish externally and for Canton Linux & MacOS covers our usecases.

changelog_begin
changelog_end
2021-12-10 12:11:45 +00:00
Moisés Ackerman
0298ed3a21
Exercise interface (#12066)
* Define HasExerciseGuarded class

* Pass predicate to UExerciseInterface primitive

* Update InterfaceDesugared test file

* Add InterfaceGuarded test file

changelog_begin
changelog_end
2021-12-10 12:10:15 +00:00
Gary Verhaegen
255cdd178a
notify_user: wait for independence test (#12077)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-09 15:19:47 +00:00
Moritz Kiefer
0a17087b99
Publish split-release artifacts more granularly (#12072)
This publishes damlc & the Daml libraries as standalone artifacts so
Canton can avoid downloading the whole SDK tarball (hopefully).

changelog_begin
changelog_end
2021-12-09 13:45:58 +01:00
Sofia Faro
51cb552b79
Add typerep argument in UExerciseInterface call from daml (#11959)
changelog_begin
changelog_end
2021-12-08 13:25:45 +01:00
Moisés Ackerman
8df9a42f29
Interface desugaring cont. (#11964)
* Move toInterfaceContractId and fromInterfaceContractId out of Implements class

* Split Implements class into single-method classes

* Define toInterface outside its class to swap type arguments

This allows users to call 'toInterface @Interface', since the type of the template can usually be inferred

* Move interface classes and functions to DA.Internal.Interface

changelog_begin
changelog_end
2021-12-07 13:56:57 +01:00
Moritz Kiefer
5a019eaaa6
Split release process (PoC) (#11991)
* Split release process (PoC)

This PR adds the necessary infrastructure for the new split release
process. Releases are still triggered via the LATEST file but you can
choose between the old and the new release process by adding
SPLIT-RELEASE at the end of the line.

As a first step this publishes all artifacts we currently publish to
Github releases to our GCP bucket.

changelog_begin
changelog_end

* drop report-start

changelog_begin
changelog_end

* fix gcp bucket

changelog_begin
changelog_end

* review feedback

changelog_begin
changelog_end

* Update azure-pipelines.yml

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* SPLIT-RELEASE ->SPLIT_RELEASE

changelog_begin
changelog_end

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-12-06 19:25:00 +01:00
nicu-da
383e251e88
[kvutils] - Rename expire_at to prunable_from for clarity [KVL-1199] (#11960)
changelog_begin
changelog_end
2021-12-06 00:02:26 -08:00
Moisés Ackerman
ad77eed798
Move method interfaceTypeRep to its own class (#11940)
changelog_begin
changelog_end
2021-12-04 15:33:58 +00:00
Moisés Ackerman
0b79d8ae7c
Deprecate 'controller ... can' syntax (#11363)
Closes #11317

* Add warning for uses of 'controller ... can' syntax

* Remove uses of 'controller ... can' syntax

* Add test cases for -W{,no-}controller-can

* Update docs to reflect 'controller ... can' syntax deprecation

changelog_begin
* Deprecate 'controller ... can' syntax.
  * It will be removed in a future version of Daml.
  * Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
2021-12-01 13:36:04 +01:00
Moisés Ackerman
683ab87143
Move ghc-lib{,-parser} to bazel-haskell-deps (#11775)
* Move ghc-lib{,-parser} to bazel-haskell-deps

changelog_begin
changelog_end

* Always show changes to bazel-haskell-deps.bzl
2021-11-30 18:11:33 +00:00
Gary Verhaegen
4e50060021
self-service compat: set branch name to not main (#11902)
The "tell slack about failures" step is conditional on the branch name
being main; for whatever reason if we don't supply a branch name Azure
sets it to `main`, regardless of the fact that the commit is not in that
branch at all.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 16:50:53 +00:00
Gary Verhaegen
a81995c82e
switch dev images to Temurin (#11895)
The AdoptOpenJDK project has been renamed to Adoptium so they renamed
the adoptopenjdk images to Temurin.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 14:45:35 +00:00
Moritz Kiefer
68a23436e8
Only run self-service compat job on PRs (#11893)
This is currently failing for the notice file update PR. While we
could try to hack around the git commands to do something sensible, I
don’t really see the point. We really only need this for PRs.

changelog_begin
changelog_end
2021-11-26 10:26:21 +01:00
Gary Verhaegen
dbda67ba81
bump JVM in Docker image (#11883)
Please don't depend on this, it breaks all the time.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 18:08:38 +01:00
Gary Verhaegen
b8937ad81b
ci: self-service compat test start (#11853)
It should now be possible for anyone to trigger the daily compat build
by adding a `run-full-compat: true` trailer to their commit message.

CHANGELOG_BEGIN
CHANGELOG_END

run-full-compat: true
2021-11-24 18:05:04 +00:00
Moritz Kiefer
32e9c4b13a
Bump go rules (#11829)
* Bump go rules

Was debugging something else and this seemed simple enough to factor
it out.

changelog_begin
changelog_end

* Bump Bazel on Windows

changelog_begin
changelog_end

* bump bazel manifest

changelog_begin
changelog_end
2021-11-23 18:58:55 +00:00
Moisés Ackerman
d23d113667
Restructure interface desugaring (#11555)
* Update ghc patch

* Replace Implements proxy datatype with a class

* Expose 'Implements' class in Prelude

* Add DA.Internal.Desugar.HasMethod class

This allows us to get the type of a method of an interface through the functional dependency

* Convert interfaces from new desugaring

* Update Interface daml-test-file to use Interface class functions

* Update InterfaceDesugared daml-test-file

* Replace remaining uses of Is<Interface> methods with Implements

* Document HasMethod, Method and mkMethod

* Ignore _method_ bindings in convertBind

* Ignore interface desugaring types/classes/instances/functions in LF conversion

* update snapshot after pin on windows

changelog_begin
changelog_end
2021-11-19 10:06:49 +01:00
Moritz Kiefer
91b4fb9acf
Backport: Skip protobuf compatibility check for PRs to non-main (#11772)
Backport from #11770

changelog_begin
changelog_end

Co-authored-by: Nicu Reut <nicu.reut@digitalasset.com>
2021-11-18 14:33:45 +00:00
Moritz Kiefer
a3556a57ae
Retry release signature checks (#11771)
changelog_begin
changelog_end
2021-11-18 14:09:42 +00:00
Moritz Kiefer
bb19c0de91
Drop Scala 2.12 support (#11619)
* Drop Scala 2.12 support

This only includes the CI/build system infrastructure
changes. Dropping compatibility layers from our code for 2.12 can be
done separately.

This is fine even in the context of backport builds since we already
disable the Scala 2.12 job for those anyway.

fixes #11315

changelog_begin
changelog_end

* Update bazel-java-deps.bzl

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-17 18:38:43 +01:00
Moritz Kiefer
d3bb036591
Fix sandbox database config in script & trigger tests (#11655)
* Fix sandbox database config in script & trigger tests

Setting jdbcUrl does absolutely nothing because it later gets
overwritten again.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-12 06:18:12 +00:00
Moritz Kiefer
cf445b2e73
Skip platform independence tests on release PRs (#11631)
* Skip platform independence tests on release PRs

changelog_begin
changelog_end

* yaml that shit

changelog_begin
changelog_end
2021-11-10 12:55:33 +00:00
Moisés Ackerman
cfd521ff86
Fix GHC build errors on macOS (#11560)
changelog_begin
changelog_end
2021-11-09 14:42:52 +01:00
Robin Krom
af1bee7b82
precondition lf conversion (#11538)
* interfaces: lf conversion of preconditions

This adds the LF conversion of preconditions from the desugared GHC code
to Daml LF for preconditions. This depends on the corresponding patch of
the GHC fork.

CHANGELOG_BEGIN
CHANGELOG_END

* pin linux stackage snapshot

* added a test

CHANGELOG_BEGIN
CHANGELOG_END

* pinned linux stackage snapshot

CHANGELOG_BEGIN
CHANGELOG_END

* additional InterfacePrecondition test

this checks that that conjunction of all preconditions of intererfaces
and templates is checked.

CHANGELOG_BEGIN
CHANGELOG_END

* pin stackage snapshot

* pin windows stackage snapshot

* update compile.yml (again)

* pin linux stack snapshot

* fix InterfacePrecondition test

* pin windows stackage
2021-11-09 11:43:46 +00:00
Moisés Ackerman
7d68e05f7f
Remove virtual choices (#11482)
* Remove virtual choices

* Remove choices without a body in 'interface' definition
* Remove choices in 'template ... implements' section

part of #11372

changelog_begin
changelog_end

* Remove virtual choices cont.

Switch uses of virtual choices to fixed choice with method implementation

* update snapshot after pin on windows

* Disable failing interface tests with TODO #10810
2021-11-08 17:05:23 +01:00
Hubert Slojewski
9e045c105b
Remove a leftover from check-protobuf-stability.sh (#11513)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 17:11:17 +00:00
Gary Verhaegen
79505b5474
oracle debug (#11386)
Collect Oracle logs for further debugging.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 12:19:01 +01:00
Robert Autenrieth
927b2378c3
Make Oracle tests exclusive (#11408)
* Make Oracle tests exclusive

This attempts to solve connection timeouts we often see in tests.

changelog_begin
changelog_end

* Revert "Make Oracle tests exclusive"

This reverts commit 7804c433b3476542fc156cad9d4da4755740b123.

* Run all Oracle tests sequentially
2021-10-27 16:01:00 +02:00
Robin Krom
12e782b1ea
ifaces: update ghc-parser (#11383)
* ifaces: update ghc-parser

This updates the ghc-parser, including the `ifaceTypeRep` method
generation for interfaces.

CHANGELOG_BEGIN
CHANGELOG_END

* pin stack snapshot on unix

* add tests

* update ghc-lib hash

* pin stackage dependencies on unix

* pinned stackage windows
2021-10-27 11:29:22 +00:00
Sofia Faro
76eb1657d2
Interface fixed choices: ghc parser (#11275)
* Interface fixed choices: ghc parser

(WIP)

changelog_begin
changelog_end

* .

* ..

* ...

* stackage unpin unix

* ...

* fold create/observer/signatory into fake lfconversion primitives

* stackage unpin

* .....

* ......

* ........

* .........

* . . . . .

* unpin stackage on unix

* ...... ......

* ...

* . . . . .

* unpin stackage on unix

* . . . . . . . . .

* unpin stackage on unix

* Loosen restriction on ETo/FromAnyChoice fake primitives

* uncomment exercise in Interface.daml

* remove comments

* !!!

* the final re-pinning, part 1

* the final re-pinning: part 2
2021-10-20 17:45:13 +00:00
Samir Talwar
139b6f3b9e
CI: Set PROJ_DIR inside the bash lib, not outside. (#11236)
* CI: Set `PROJ_DIR` inside the bash lib, not outside.

We can't reference variables set outside.

CHANGELOG_BEGIN
CHANGELOG_END

* CI: Remove an unnecessary `export`.
2021-10-13 14:55:20 +02:00
Robert Autenrieth
66adbc0366
DPP-463 switch conformance tests to append only (#11101)
* Use append-only schema in tests

changelog_begin
changelog_end

* Fix Oracle build

* Update ledger/ledger-on-memory/BUILD.bazel

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

* Run more conformance tests on append-only

* Run pruning tests in split-participant mode

* Disable multi-participant test in split participant

* Add missing ContractIdIT test

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2021-10-11 23:31:30 +02:00
Robin Krom
3115d104aa
daml script interfaces (#11124)
* interfaces: introduce TemplateOrInterface class in stdlib

The template typeclass is to strong for many applications. The new
constraint `TemplateOrInterface` only contains the methods to convert
contract IDs and choices.

CHANGELOG_BEGIN
CHANGELOG_END

* ghc-lib update, interface script tests

* pinned stackage on unix

* added missing implementation in preprocessor

* added test

* fixing tests

* remove Iface type

* pinned stackage windows

* make sure createAndExercise is not called on interfaces
2021-10-11 18:22:40 +02:00
nicu-da
5abedac9ab
Check the commit message to skip the compatibility check [KVL-1111] (#11162)
* Check the commit message to skip the compatibility check

CHANGELOG_BEGIN

CHANGELOG_END

* Use git trailers to skip the check conditionally
2021-10-08 02:18:36 -07:00
Samir Talwar
d3810af47e
CI: Upgrade Nix. (#11173)
Inspired by seeing `curl` TLS errors in a different repository's CI.

I don't know if this will help, but it's worth a try. Note that the
domain name has changed.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-08 09:13:50 +00:00
Gary Verhaegen
fcd4549569
test release rotation: factor out selection (#11161)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 12:46:55 +00:00
nicu-da
a3b90499fd
Check proto compatiblity with target head for PRs [KVL-1110] (#11123)
* Add the ability to check protobuf compatibility with the branch head alongside the latest release tag.

CHANGELOG_BEGIN
CI - add check to PR for protobuf breaking changes against the target branch head
CHANGELOG_END
2021-10-07 08:55:38 +00:00
Stefano Baghino
265e36255c
Add a notice to the release testing rotation file (#11142)
Reminds people adding new users to the rotation that they should also
be added to DACH-NY/daml-language-ad-hoc to have a box in the cloud
for Windows testing.

Adds the possibility of adding comments at the beginning of the rotation file.

changelog_begin
changelog_end
2021-10-06 21:08:11 +00:00
Remy
9cffa1faf6
LF: check LF transaction protobuf aginst local snapshots (#11064)
instead of last stable branch.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 20:10:41 +02:00
Remy
37d94aaef6
Add unit for daily performance tests (#11107)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 13:00:38 +02:00
Robin Krom
9fd6326ae7
interfaces: consuming/non-consuming iface choices (#11009)
* interfaces: consuming/non-consuming iface choices

We add the consumption behaviour to the interface choice definition and
typecheck accordingly.

CHANGELOG_BEGIN
CHANGELOG_END

update to new ghc-lib, conversion implementation

* update ghc-lib

* pinning stackage on unix

* pin stackage on windows
2021-09-30 15:56:28 +00:00
Gary Verhaegen
6ae3afa8fb
fix perf reporting (#11073)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-29 17:39:46 +00:00
Gary Verhaegen
12e0c72d5c
fix blackduck logic (#11049)
We believe the Blakduck logic is currently faulty. We have had a
violation on an NPM dependency, and Blackduck keeps reporting it despite
our having removed the dependency.

We believe that what is happening is that, in the first step of
checking, we udpate the Haskell dependencies, _and then check the
validity of the whole project_, which includes the NPM deps. Because
that fails, we never get to the step where we actually update the NPM
deps, and Blackduck is stuck forever.

The solution is to not fail on violations for the Haskell update steps.
Haskell deps are still checked in the second step, because, again, it is
checking the whole project.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-28 14:28:19 +00:00
Gary Verhaegen
59ad995282
fix buf check (#11014)
`SYSTEM_PULLREQUEST_TARGETBRANCH` is not defined on main builds.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-24 10:23:48 +02:00
fabiotudone-da
f5d2135f97
Check protobuf compatibility of main and PR commits w.r.t. previous stable release [KVL-1109] (#10950)
* Check protobuf compatibility of release commits w.r.t. previous stable release

CHANGELOG_BEGIN
CHANGELOG_END

* Remove blank line

* Don't persist credentials

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* check-protobuf-against-stable.sh: SRC_DIR -> PROJECT ROOT + simplify

* Don't set LATEST_STABLE global in a function

* Simplify by using only the main work tree

* Simplify further as the check will be only run from `main`

* Move the check to `ci/build.yml` so that it is also run on PRs

* Enter the development environment to use tools

* Make variables read-only

* Support release branches and PRs targeting them

* Fix and document the reference tag finding logic

* Fix SYSTEM_PULLREQUEST_TARGETBRANCH and print it

* Don't log the source branch

* Fix comment formatting

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Enable Slack integration

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Don't check if the branch is a release one

...as the check won't be run on release branches.

* Add compatibility_stable_protobuf to collect_build_data

* Do not activate dev-env globally but only in sub-shells

* Add an explanation about why the check is not run on release branch commits

* Simplify further by leveraging `buf`'s ability to compare against branches

* Use `buf`'s `tag` locator instead of `branch`

* Split buf checks by module and remove previous manual check

* Explain how to run locally

* Use more future-proof WIRE_JSON for participant-integration-api

Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>

* Use stricter FILE for the ledger gRPC API

* Propose an explanation for WIRE in kvutils

* Fix comment typo

* Re-introduce linting configuration for kvutils

* Simplify explanation for KVUtils' breaking check rule

* Remove extra (C) header from 3rd-party proto

* Don't touch the copyright of google/rpc/status.proto

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
2021-09-23 15:50:33 +00:00
akshayshirahatti-da
721575ea73
[JSON-API] Postgres perf job (#10986)
* Addition of a postgres perf job

CHANGELOG_BEGIN
CHANGELOG_END

* use a single job with strategy matrix

* cleanup test job from main pipeline
2021-09-23 09:16:58 +01:00
Gary Verhaegen
28b8d9a1f7
bump dotnet (#10979)
This bumps dotnet to the version required by the latest azuresigntool,
and pins azuresigntool for the future.

As usual for live CI upgrades, this will be rolled out using the
blue/green approach. I'll keep each deployed commit in this PR.

For future reference, this is PR [#10979].

[#10979]: https://github.com/digital-asset/daml/pull/10979

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-22 16:39:40 +00:00
Moritz Kiefer
4acf34b5fc
Add conversions from/to interfaces in Daml parser (#10954)
* Add conversions from/to interfaces in Daml parser

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-09-21 18:24:12 +00:00
Moritz Kiefer
cac8391d4c
Bump ghc-lib to include daml interfaces parser (#10747)
changelog_begin
changelog_end
2021-09-16 17:52:16 +00:00
fabiotudone-da
be4e06427f
Ledger API Test Tool: support --additional tests [KVL-1100] (#10829)
* Support adding tests as an hidden option

* Simplify existing suites

CHANGELOG_BEGIN
CHANGELOG_END

* Remove stale conformance suites from build.yml

* `--add` -> ``--additional`

* Re-add `--all-tests` as deprecated CLI option to be tested

* Move sandbox-classic pruning test to wall clock again

* Run KVCommandDeduplicationIT for sandbox append-only

* Tidy-up

* Also add participant pruning test to ledger-on-memory/single-participant

* Remove KVCommandDeduplicationIT on ledger-on-memory/append-only

* Run the full suite plus pruning (rather than just pruning) for ledger-on-memory with multiple participants and append-only

* Add KVCommandDeduplicationIT to ledger-on-memory append-only

* Exclude ConfigManagementServiceIT from ledger-on-memory append-only multi-participant

* Tidy-up

* Use KVCommandDeduplicationIT for sandbox-on-x too

* Fix merge

Add max dedup duration arg to all the test suites that include command dedup tests

* Make `--include` and `--additional` mutually exclusive

* Uniform formatting of multi-line strings

* Move exclusions after additions as they are applied last

* Re-disable deduplication test on sandbox with static time

* Re-disable deduplication test on sandbox-on-x
2021-09-14 14:00:30 +02:00
akshayshirahatti-da
fb5ab5dca2
setvar doesn't like new lines in assignment, refactor (#10842)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-10 14:04:24 +00:00
akshayshirahatti-da
7824201b8d
Get rid of extra new line and prune precision for all gatling values (#10820)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-09 08:37:50 +00:00
akshayshirahatti-da
35a853fd30
Async logging for http-json-perf tests and publish logs as a pipeline artifact (#10803)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-07 23:42:30 +01:00
Gary Verhaegen
a349217f78
get oracle perf test output (#10800)
We can only reference variables set in a named step.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-07 23:14:44 +02:00
Gary Verhaegen
793253ca87
bump cleanup threshold (#10771)
I've witnessed a build ([link], though that will likely expire soon)
that failed with a "No space left on device" error after skipping the
cleanup step because the machine still had 68GB free.

[link]: https://dev.azure.com/digitalasset/daml/_build/results?buildId=87591&view=logs&j=870bb40c-6da0-5bff-67ed-547f10fa97f2&t=deecee86-545a-596e-8b0d-fb7d606fe9f2

With the machines only having 200GB disk size total, cleaning up at 80
is probably going to start hampering the overall efficiency of the
cache. It may be time to think about increasing the disk size itself (or
finding ways to reduce the size requirements of our builds). Important
note, though: we can't actually increase the macOS disk size very much.

The failure happened on the `compatibility_linux` job.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-03 18:22:18 +02:00
akshayshirahatti-da
f68a12930b
Report some oracle_json_perf numbers on slack (#10754)
* Add avg, stddev, p90, p99, requests_per_second numbers to be reported on slack similar to speedy_perf

changelog_begin
changelog_end

* changes based on code review

* fix failing job due to breaking function export
2021-09-02 17:44:01 +01:00
akshayshirahatti-da
4525b8c265
[JSON-API] vanilla oracle_perf ci job (#10688)
* vanilla job test on main pipeline

changelog_begin
changelog_end

* move job to daily compat tests

* add timeout to dev-env and changes based on code review
2021-09-02 09:31:56 +01:00
Moritz Kiefer
e9c8af5024
Bump ghc-lib to include dropped parsing code for generic templates (#10735)
* Bump ghc-lib to include dropped parsing code for generic templates

changelog_begin
changelog_end

* bump snapshot

changelog_begin
changelog_end

* drop old generics file

changelog_begin
changelog_end

* drop other broken file

changelog_begin
changelog_end

* Bump again

changelog_begin
changelog_end

* bump to merged commit

changelog_begin
changelog_end

* and bump snapshots

changelog_begin
changelog_end
2021-09-01 15:35:40 +02:00
Andreas Herrmann
7b94b0674e
Map shortened scala test suite names to long names on Windows (#10628)
* Generate short to long name mapping in aspect

Maps shortened test names in da_scala_test_suite on Windows to their
long name on Linux and MacOS.

Names are shortened on Windows to avoid exceeding MAX_PATH.

* Script to generate scala test name mapping

* Generate scala-test-suite-name-map.json on Windows

changelog_begin
changelog_end

* Generate UTF-8 with Unix line endings

Otherwise the file will be formatted using UTF-16 with CRLF line
endings, which confuses `jq` on Linux.

* Apply Scala test name remapping before ES upload

* Pipe bazel output into intermediate file

Bazel writes the output of --experimental_show_artifacts to stderr
instead of stdout. In Powershell this means that these outputs are not
plain strings, but instead error objects. Simply redirecting these to
stdout and piping them into further processing will lead to
indeterministically missing items or indeterministically introduced
additional newlines which may break paths.

To work around this we extract the error message from error objects,
introduce appropriate newlines, and write the output to a temporary file
before further processing.

This solution is taken and adapted from
https://stackoverflow.com/a/48671797/841562

* Add copyright header

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-24 17:03:45 +02:00
Stefano Baghino
b578b0e7cf
Reminder to put an empty line between subject and body (#10638)
* Reminder to put and empty line between subject and body

changelog_begin
changelog_end

* Update ci/check-changelog.sh

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-08-20 11:28:30 +00:00
Robin Krom
0c1878530b
test: test for platform independent dars (#10535)
We add a CI test to check that dars don't depend on the underlying
operating system where the dar is build.

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-17 18:59:12 +02:00
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
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
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
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
5e7f8e6a49
Handle not quite empty directory digests in cache cleanup (#10536)
Dropping the strict source name patch has resulted in empty
directories which Bazel is happy about but then fail at
runtime. They’re not quite empty, the digest points to 0x0a 0x00
so we match on that.

changelog_begin
changelog_end
2021-08-10 15:06:10 +00:00
Moritz Kiefer
ebab670576
Disable pushing Bazel metrics on PRs from forks (#10520)
We don’t have credentials there so the job just fails.

changelog_begin
changelog_end
2021-08-09 11:54:26 +00:00
Robin Krom
36f3ba8a6a
lsp-types patch for platform independence (#10288)
* fix shake rebuild tests

* patch pretty printing in ghc

* pin linux deps

* pin windows deps

* cosmetics

* address review

* update ghc commit hash

* pin linux stackage deps

* update stack snapshot

* pin windows deps
2021-08-04 21:33:52 +02:00
Moritz Kiefer
b0498ce4b1
Publish test logs on Oracle build failures (#10445)
changelog_begin
changelog_end
2021-07-29 12:58:44 +02:00
Gary Verhaegen
c3a3d60083
don't call Gary, he's on holiday (#10400)
I'm still not sure how or why this happens, but if we can detect it
"early" to fail and try to debug, we can also just try to fix it 🤷

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-24 09:12:42 +02:00
Gary Verhaegen
da9f8e3007
clean-up perf tests (#10355)
We've removed some features, this can be simplified a bit now.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-22 12:07:19 +00:00
Gary Verhaegen
a56cfead28
even earlier mount failure detection (#10371)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-22 12:36:41 +02:00
Gary Verhaegen
3c0010b38a
detect mount issue earlier (#10313)
When machine disks are full, we can't clean the Bazel cache if it
happens to not be a mount point. I don't quite understand yet why it's
not a mount point, but maybe I'll be able to investigate more if we catch
the issue early, rather than waiting for the disk to be full and the
clean-up to fail.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-19 15:45:50 +02:00
Moritz Kiefer
980d96b44a
Fix status check in collect_build_data (#10278)
* Fix status check in collect_build_data

follow up to #10270 which caused the linux & macos builds to go
through but then screwed us over in collect_build_data. I hate CI.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-07-14 14:29:52 +00:00
Moritz Kiefer
6107f8aa64
Ignore failure to upload log failures (#10270)
This has now screwed us over for two releases (1.14 and currently
blocking 1.15) because we didn’t backport the change. While we could
backport this, it is annoying and provides little to no benefit given
that a failure here is harmless so let’s just ignore failures here.

changelog_begin
changelog_end
2021-07-14 11:10:05 +02: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
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
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
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
Brian Healey
678cab0327
10050 append only schema on oracle (#10051)
* Oracle compliant append only schema

CHANGELOG_BEGIN
CHANGELOG_END

WIP : oracle on new appendonly schema

* diff to postgres dump, create consolidated view

* diff to postgres dump to ensure all oracle setup is equiv

* recompute sha for changed oracle flyway scripts

* drop old tables to prevent clash on name of new participant_events view

* recompute sha for flyway script

* prelim oracle StorageBackend

* Adds support for special preparedStatement for oracle

* Add support and wires to setObject by default everywhere
* Add the full OracleField suite with TODOs for convenience
* Wires OracleField suite to OracleFieldStrategy

changelog_begin
changelog_end

* enable debug version of oracle driver

* conversion Instant -> Timestamp for oracle

* WIP: primitive println debugging

* Passing PackagesSpec with appendonlyschema on Oracle
Rename size column to siz to avoid reserved word clash, including migration script for postgres

* include sha for new postgres migration script

* add missing copyright header

* cleanup

* passing party spec for appendonly on oracle

* passing configuration spec for appendonly on oracle

* scalafmt

* bazel buildifier reformat

* use db generic FETCH NEXT n ROW ONLY rather than limit for cross db compat

* siz instead of size for packages table on all dbs and schema

* revert enabling oracle jdbc debug

* Support Array[String] -> String conversion (and vice versa) for JSON array
Remove as aliases for tables as this does not work with oracle
Extract submitters clause for all db types
Use append transaction injector for oracle append only spec

* scalafmt

* correct oracle failing active contract spec tests

* wire in JdbcLedgerDaoCompletionsSpec

* remove semi-colons for ending statements that are problematic for oracle driver

* all tests up to divulgence passing for append only on oracle

* all appendonly tests passing on oracle

* remove ignore on fall back to limit-based query with consistent results

* do not change name of size column in packages table for mutable schema for all DBs

* do not change name of size column in packages table for mutable schema for all DBs

* standalone oracle appendonly schema script
regen shas on flyway scripts
revert some cosmetic refactoring in CommonStorageBackend

* Fixes conversion to parties from Oracle-JSON at flatEventWitnessesColumn

* Switches from composit SQLs to single SQLs at prepared statements to accommodate Oracle limitation

* Fixes arrayIntersectionWhereClause by applying patch from mutable Oracle schema integration

* Fixes queries with empty startExclusive Offsets

* First draw adding Oracle conformance test suites to CI

* wire in the oracle conformance tests for CI

* Use cross-db fetch next $n rows only syntax instead of limit syntax that works only for postgres/h2

* rename siz to package_size

* recompute shas

* scalafmt and include sha check for oracle append only flyway script

* correct missing package_size rename

* remove some todos -- correct corrupted V1__Init.sql

* Update ledger/ledger-on-sql/src/test/lib/scala/com/daml/ledger/on/sql/MainWithEphemeralOracleUser.scala

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* correct version number for postgres rename column scripts

* remove unnecessary migration tables for oracle append only

* review feedback: rename createEventFilter as requested, remove todos

* review feedback: case consistency

* review feedback: update todos with issue markers

* review feedback: cleanup

* review feedback: OracleField and OracleSchema cleanup

* Fixing Table generators to use preparedData for convenience

* Placing TODOs for refactorings later

* Renames initial append-only oracle script, for convenience

* Falls back to original behavior as far prepared statements go at couple of queries

Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2021-06-28 18:51:48 -04:00
Moritz Kiefer
a44afcff42
Upgrade nixpkgs (#9908)
* Upgrade nixpkgs

changelog_begin
changelog_end

* Upgrade Bazel on Windows

changelog_begin
changelog_end

* bump bazel hash

changelog_begin
changelog_end
2021-06-24 13:58:56 +00:00
Moritz Kiefer
5bf7d8f570
Fix speedy perf reporting (#10100)
jq does not like dashes see https://github.com/stedolan/jq/issues/38

changelog_begin
changelog_end
2021-06-23 20:16:47 +02:00
Moritz Kiefer
c44f33736e
Simplify speedy benchmark (#10079)
This PR drops two things:

1. The check that the benchmark hasn’t been modified. This hasn’t ever
been useful and it keeps being annoying.
2. It stops the comparison against the old version and instead just
benchmarks the current version. We really only care about the day to
day changes. Comparing against an arbitrary year old version has lost
all meaning at this point.

changelog_begin
changelog_end
2021-06-22 15:11:47 +00:00
Moritz Kiefer
b98ad910fa
Bump test sha (#10055)
This needs bumping due to the off-ledger on-ledger speedy split.

changelog_begin
changelog_end
2021-06-18 10:03:55 +02:00
Andreas Herrmann
630d021331
Collect build-event-stream (#9831)
* Generate Bazel logs and upload to GCS

changelog_begin
changelog_end

* Move git_*_sha into variables template

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-06-11 12:16:08 +02:00
Moritz Kiefer
ca0fb16718
Fix collect_build_data job (#9956)
changelog_begin
changelog_end
2021-06-10 13:19:34 +00:00
Moritz Kiefer
42030b25ed
Skip Scala_2_12 job on releases (#9954)
This currently breaks older releases because they require a different
Scala 2.12 version. It also adds zero value for a release that
defaults to Scala 2.12 and it adds basically no value for a release
that defaults to Scala 2.13 (see comment for details).

changelog_begin
changelog_end
2021-06-10 12:02:43 +00:00
Gary Verhaegen
c77324d041
skip fix_bazel_cache on forks (#9920)
Secrets are not available to forks, so they can't delete things from the
cache.

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-08 08:47:42 +00:00
Remy
b8c02d65b7
Bump perf test for for #9871 (#9902)
CHANGELOG_BEGIN
CHANGELOG_END
2021-06-03 12:46:58 +00:00
Moritz Kiefer
65f9395cdd
Try to fix windows skipping again (#9893)
This took me embarassingly long to understand and debug (partially
because afaict Azure is broken):

The issue is that in the current state, parameters.is_release is not
expanded when setting the env var. That makes sense. The variable is
only set at runtime but the ${{}} template expressions are expanded
before that (it works below in the condition since that’s not in a
${{}} and is evaluated at runtime).

Now if we look at the other env var that does work (the release tag)
we can see something interesting. We set it to the macro
$(release_tag) in build.yml. However, that is not expanded since
template expansion happens way earlier. So the template parameter is
set to the literal string "$(release_tag)". We then splice that in via
template expansion ${{parameters.release_tag}} and then at runtime
azure will expand the macro.

Just changing is_release to a macro however would break the use in the
condition (I think you might be able to fix that if you put it in a
string but that just seems even more hacky).

So this PR instead defines a new variable skip_tests which we define
in the job and the splice it in via a macro.

Confusingly, `$[variables.is_release]` is not expanded in an env
definition. Afaict this is simply a bug. The only difference between
macros and runtime expressions according to the docs is that runtime
expressions need to replace the full RHs and that macros can only
reference a single variable. Wouldn’t help much here either anyway if
we want to stick to the parameter instead of referencing a variable
directly (which maybe we don’t, it doesn’t seem to help much but
that’s a separate question).

changelog_begin
changelog_end
2021-06-03 11:24:52 +02:00
Moritz Kiefer
7855ea50c2
Switch to Ubuntu 20.04 nodes for ghc lib (#9838)
changelog_begin
changelog_end
2021-05-31 13:32:39 +02:00
Gary Verhaegen
646c956457
new windows signing (#9786)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-25 16:23:17 +02:00
Robin Krom
a336363020
ghc-lib: update (#9742)
* ghc-lib: update

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-25 15:52:39 +02:00
Gary Verhaegen
f5c5b634eb
prepare for EV Windows signing (#9758)
Setting up a non-disruptive way to test out EV signing of our Windows
artifacts.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-21 10:46:45 +02:00
Moritz Kiefer
4f97a4da8e
Avoid test log collisions across platforms (#9763)
Currently they overwrite each other which is clearly not helpful.

changelog_begin
changelog_end
2021-05-21 09:11:16 +02:00
Moritz Kiefer
b9c36c9a5b
Disable per commit windows compat tests (#9755)
* Disable per commit windows compat tests

Windows version of #9370 to further reduce queues until we either get
more nodes or find another solution. We still test everything in the
daily run.

changelog_begin
changelog_end

* remove success check for skipped windows compat

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-05-20 10:37:59 +00:00
Gary Verhaegen
83d60f0561
more frequent Windows cache cleanup (#9743)
We'd like this to run more than once an hour, and Azure doesn't support
that as a cron.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-19 14:24:47 +02:00
Gary Verhaegen
f249eec24f
drop per-commit compatibility_macos (#9730)
This should reduce the pressure on CI nodes a bit. Note that we're still
running the full compatibility matrix on macOS as part of the daily
build.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 17:03:24 +02:00
Moritz Kiefer
b1738c7202
Switch Scala default to 2.13 (#9699)
changelog_begin
changelog_end
2021-05-17 15:04:53 +00:00
Moritz Kiefer
fb0551bdfd
Fix blackduck flag names (#9695)
changelog_begin
changelog_end
2021-05-16 16:45:31 +02:00
Gary Verhaegen
b58d30b9e3
skip Windows tests on release (#9656)
Caching doesn't seem to work very well here. On a release, we build an
old commit, which has already been tested twice (once as a commit on
`main`, once as part of the release PR).

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-12 14:23:05 +02:00
Gary Verhaegen
40f69ee5af
fix release PR notifications (#9658)
In the automated process, the Azure build is triggered on the branch
directly, which will be named `auto-release-pr-$(date -I)`. But if a
manual change needs to be made, and people subsequently use the `/azp
run` feature of Azure, the build then runs for the PR, which means it
actually runs on the merge commit of the branch and `main`, not on the
branch itself. In that case, the branch that we run the build on is
called `merge` and is thus not starting with `auto-release-pr-`.

This change should get us the notification back on manual PR builds too.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-12 14:22:38 +02:00
Andreas Herrmann
0acc4f115c
Patch old Bazel derivation (#9622)
The patch that it downloads via Nix was taken from a GH PR instead of a
commit such that the hash is not fully stable. This adds a patch to
download the relevant patch directly from a GitHub commit.

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-05-07 18:23:47 +02:00
Robin Krom
84359ffa73
nested record updates (#9505)
* record dot updates: update to new ghc-lib-parser

This updates the ghc-lib-parser library featuring record dot updates and
adds tests for the new feature.

CHANGELOG_BEGIN
CHANGELOG_END

* update snapshot after pin on windows

* added a test for error locations

* nested record puns test

* update ghc commit

* update of stack dependencies (linux)

* update stack snapshot(windows)
2021-05-03 16:27:01 +02:00
Moritz Kiefer
4aca199bbd
Upgrade to Scala 2.13.5 (#9528)
changelog_begin
changelog_end
2021-04-29 13:05:57 +00:00
Stefano Baghino
e1e878a597
Simplify opt-in/out of Oracle when building (#9515)
* Simplify opt-in/out of Oracle when building

- defines Oracle-related environment variables as part of dev-env so that it's the same across CI and dev
- adds a Bazel 'oracle' configuration so that --config=oracle pulls all required environment

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/9515#discussion_r621180994

* Also use `$ORACLE_USERNAME` instead of `system` in the `sqlplus` connection string

* Address https://github.com/digital-asset/daml/pull/9515#discussion_r621186459
2021-04-28 06:10:43 +02:00
Samir Talwar
8cd3658b14
Switch to an environment variable for enabling Oracle tests. (#9511)
* participant-integration-api: Build Oracle tests, but don't run them.

CHANGELOG_BEGIN
CHANGELOG_END

* triggers: Switch to an environment variable for enabling Oracle tests.

* http-json: Switch to an environment variable for enabling Oracle tests.

* Disable running Oracle tests by default, not building them.

* triggers/service: Remove unused test dependencies.
2021-04-27 11:50:39 +00:00
Gary Verhaegen
e39c20ecbc
update GPG public key (#9488)
The existing public key is set to expire in May, so we've changed it.

Note: this _should_ require no other change as the private key is
unchanged (i.e. the new public key can be used to verify old
signatures), but my understanding of GPG is somewhat limited so 🤷.

CHANGELOG_BEGIN
CHANGELOG_END
2021-04-27 13:40:02 +02:00
Brian Healey
ca66061b28
Ledger Api Oracle support (#9277)
* WIP : first cut at changed schema files for oracle
Define Oracle as DbType and handle necessary case match switches for it
recomputed shas for oracle migration scripts
Oracle fixtures
get things compiling
Able to connect to Oracle
Working through getting schema definitions functional with Oracle
runnable schema definitions only for active tables on oracle
delete commented lines in schema scripts
use oracle enterprise
correct inadvertently changed postgres schemas
WIP - latest oracle-ificiation
passing upload packages spec
add additional test for package upload entry read
correct typo in oracle database spec name
use BLOB for parties ledger_offset
package_entries use hex version of offset for range queries
reformat and update shas for sql scripts
binary numeric implicit conversion for oracle
correct duplicate exception text for oracle
parties test passing on oracle
add additional column to hold hex offset for party_entries
party_entries working for all dbs
scalafmt
Configuration ledger_offset should be BLOB
update sha of oracle sql files
enable passing tests in order
remove misleading null comments
define additional custom VARRAY types
add participant-integration-api-oracle tests to linux-oracle job
Add TODO for places where we need to deal with separate implicit imports for Oracle vs Postgres/H2
oracle implicit conversions for custom arrays and other problematic types

Do not override default debug level for all tests in participant-integration-api

CHANGELOG_BEGIN
Ledger API and Indexer Oracle Support
CHANGELOG_END

passing TransactionWriterSpec
passing JdbcLedgerDaoCompletionsSpec JdbcLedgerDaoDivulgenceSpec
passing JdbcLedgerDaoContractsSpec
All Oracle tests passing apart from one post-commit validation test

* Remove JdbcLedgerDaoValidatedOracleSpec as this is only relevant for classic postgres-backed sandbox

* rebase to master -- offsets are now varchar2 rather than blob

* remove use of DBMS_LOB operations

* remove all greater than/less than variants for DBMS_LOB

* revert postgres files that need not be touched

* code review feedback : avoid code duplication

* avoid indirection in type names for oracle arrays

* code review: HexString implicit conversions are not needed

* code review: Oracle case is not yet implemented for appendonlydao

* code review: Oracle case is not yet implemented for appendonlydao (cleanup import)

* code review: revert files that should not be touched

* address code review feedback: db specific imports for command completion become part of queries

* code review: perform db-specific reserved word escape to avoid case match

* code review: remove all dbms_lob comparison operations

* use simpler insert into with ignore dupes hint for oracle

* code review: avoid db specific match case in events range, use db specific limitClause

* code review: restore group by on Binary and Array fields for H2 and Postgres, disable for Oracle

* code review: restore group by on Binary and Array fields for H2 and Postgres, disable for Oracle

* code review: restore group by on binary and array fields for non-oracle dbs, honour the calculation of limit size from QueryParty.ByArith

* code review: honour the calculation of limit size from QueryParty.ByArith

* code review: drop user after oracle test

* code review: remove drop user as it throws errors due to dangling sessions

* code review: revert incorrectly changed postgres schema files

* code review: clean up TODOs

* Remove // before hostname for consistency with other oracle connection strings

* code review: unambiguously scope table column referenced in select and where queries

* code review: correct duplicate table alias
2021-04-26 18:34:17 -04:00
Gary Verhaegen
8a6cfacbff
more robust macOS cleanup (#9456)
We've recently seen a few cases where the macOS nodes ended up not
having the cache partition mounted. So far this has only happened on
semi-broken nodes (guest VM still up and running but host unable to
connect to it), so I haven't been able to actually poke at a broken
machine, but I believe this should allow a machine in such a state to
recover.

While we haven't observed a similar issue on Linux nodes (as far as I'm
aware), I have made similar changes there to keep both scripts in sync.

CHANGELOG_BEGIN
CHANGELOG_END
2021-04-21 12:10:47 +02:00
Stefano Baghino
a551b6f874
Don't repeat the Oracle password in ci/build.yml (#9419)
Got it from https://stackoverflow.com/a/13802438

Incidentally, to write this commit message containing a single quote, I had to escape it with this https://stackoverflow.com/a/1250279

I guess today is "bring-your-quotation-marks-to-work day".

changelog_begin
changelog_end
2021-04-15 12:49:47 +02:00
Gary Verhaegen
2662163a23
cleanup: kill more stuff (#9411)
In this case we had Java and Daml processes running.

May be worth moving this to the reset-caches scripts later on.

changelog_begin
changelog_end
2021-04-14 15:15:03 +02:00
Moritz Kiefer
7890381cac
Publish EE JSON API to artifactory (#9392)
changelog_begin
changelog_end
2021-04-13 16:12:18 +02:00
Moritz Kiefer
dc4b9e5968
Publish trigger service EE fat JARs (#9363)
* Publish trigger service EE fat JARs

changelog_begin
changelog_end

* Include ee in artifact name

changelog_begin
changelog_end
2021-04-09 13:24:18 +02:00
Gary Verhaegen
631db446f0
try to fix non-repudiation pushing (#9323)
I've seen reports of Artifactory returning 409 when it detects an
invalid POM file, which would map cleanly to our observed behaviour (as
other files do seem to upload fine). I'm not a POM expert so not
entirely sure how to check the actual files, but I do see one error in
the existing, commented code: the path is not a valid Maven repository
path. It should be `groupid/artifactid/version`, i.e. it is currently
missing the `artifactid` bit. So I'd like to try adding that.

I don't know how to test this without making a release, so my plan is to
make a release once this is merged. Open to suggestion on faster ways to
test this.

CHANGELOG_BEGIN
CHANGELOG_END
2021-04-06 14:32:28 +02:00
Moritz Kiefer
f7b2f14294
Add Oracle support in the trigger service (#9286)
* Add Oracle support in the trigger service

This PR migrates the ddl & queries and adds tests for this. It does
not yet expose this to users. I’ll handle that in a separate PR.

changelog_begin
changelog_end

* use getOrElse

changelog_begin
changelog_end
2021-03-31 18:39:08 +02:00
Stefano Baghino
4b807899ca
Do not publish non-repudiation client JARs to Artifactory (#9312)
So far, every attempt failed with a 409 Conflict.
We'll try again next week.

changelog_begin
changelog_end
2021-03-31 16:02:21 +00:00
Stefano Baghino
cbd76c3465
Publish non-repudiation-core to Artifactory as well (#9305)
changelog_begin
changelog_end
2021-03-31 11:23:24 +00:00
Moritz Kiefer
e3ef08cc10
Avoid base64 encoding of cache suffixes (#9303)
base64 includes / which is at the very least pretty confusing and also
broke our cache cleanup which assumes that the cache suffix takes up
one directory. Afaict, we are not length-restricted in gcp paths so we
can just use the hex digits we get from md5

changelog_begin
changelog_end
2021-03-31 11:30:46 +02:00
Moritz Kiefer
29a6813465
Fix location of non-repudiation artifact (#9294)
This should end up in artifactory not github.

changelog_begin
changelog_end
2021-03-31 07:45:33 +02:00
Moritz Kiefer
eef158d6e8
Fix build command for non-repudiation-client (#9290)
The first attempt failed because the src jar wasn’t there. Afaict, the
path is fine but we didn’t build it.

changelog_begin
changelog_end
2021-03-30 18:36:34 +00:00
Stefano Baghino
4f0c72b0d8
Publish non-repudiation client libraries to Artifactory (#9282)
* Publish non-repudiation client libraries to Artifactory

changelog_begin
changelog_end

Closes #9097

* Address https://github.com/digital-asset/daml/pull/9282#discussion_r603875118
2021-03-30 12:18:07 +02:00
Gary Verhaegen
45c4ba2230
macos cache cleaning (#9245)
This is adapting the same approach as #9137 to the macOS machines. The
setup is very similar, except macOS apparently doesn't require any kind
of `sudo` access in the process.

The main reason for the change here is that while `~/.bazel-cache` is
reasonably fast to clean, cleaning just that has finally caught up to us
with a recent cleanup step that proudly claimed:

```
before: 638Mi free
after: 1.2Gi free
```

So we do need to start cleaning the other one after all.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-30 02:46:05 +02:00
Gary Verhaegen
cbba75a2c0
oracle: switch to entreprise (#9254)
* oracle: switch to entreprise

CHANGELOG_BEGIN
CHANGELOG_END

* --network host

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-03-29 16:56:30 +02:00
Gary Verhaegen
205763e11a
correct notifs for new linux jobs (#9255)
Without this we sometimes get success notifications on Slack for failed
jobs.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-26 15:26:24 +00:00
Gary Verhaegen
3a91cbccba
get oracle image from Docker Hub (#9252)
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-26 14:43:04 +01:00
Gary Verhaegen
839c97cff9
fix dev-env in clean-up (#9244)
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-25 15:48:58 +00:00
Sofia Faro
f670daec6f
Add try-catch syntax. (#9203)
* Add try-catch syntax.

changelog_begin
changelog_end

* ++

* +++

* ++[>++<-]>

* ++[>++<-]>+

* ++[>+++<-]>

* ++[>+++<-]>+

* ++[>++++<-]>

* Use try-catch in ExceptionSyntax test

* add a syntax test for try catch

* +++[>+++<-]>

* +++[>+++<-]>+

* enable test4

* typo

* add a test with multiple patterns and guards

* final patch sha

* update stack snapshot (unix)

* update stack snapshot (win)
2021-03-25 13:36:09 +00:00
Stefano Baghino
b6f7b78990
Publish non-repudiation app fat JARs to Artifactory (#9238)
* Publish non-repudiation app fat JARs to Artifactory

changelog_begin
changelog_end

Contributes to #9097

* Address https://github.com/digital-asset/daml/pull/9238#discussion_r601264444
2021-03-25 10:48:49 +00:00
Stefano Baghino
3fa05804bf
Make non-repudiation integration exclusive to enterprise edition (#9219)
* Make non-repudiation integration exclusive to enterprise edition

Closes #9182

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/9219#discussion_r599578614

* Address https://github.com/digital-asset/daml/pull/9219#pullrequestreview-618605511

* Add aliases for CE test targets, thanks to @S11001001 for the feedback

* Uh, turns out you need a main...

* Address https://github.com/digital-asset/daml/pull/9219#discussion_r599717526

* Add missing dependency for Oracle
2021-03-24 20:25:47 +01:00
Gary Verhaegen
8f1fb6d0a1
fix slack notifs (#9234)
Revert change from #9166.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-24 18:38:41 +00:00
Gary Verhaegen
7c4b32aee9
use coreutils date on macos (#9228)
macOS uses BSD date by default which has slightly different options.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-24 13:35:02 +01:00
Gary Verhaegen
b0c0306696
fix release: skipping compat should not fail (#9227)
In #9169, I changed the compat jobs to not run on releases.
Unfortunately I forgot to update the `collect_build_data` job to know
about that. Hopefully after this has been merged we'll be able to rerun
\#9221.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-24 11:18:58 +00:00
Gary Verhaegen
90aa84193f
tuesday notif: newlines (#9213)
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-23 17:03:22 +01:00
Gary Verhaegen
ad94c47605
ci/docker: sync with hub (#9184)
It looks like the last update was not propagated.

CHANGELOG_BEGIN
ChANGELOG_END
2021-03-18 16:01:58 +00:00
Gary Verhaegen
1ea00976f0
skip compat tests on release (#9169)
As requested by @coceature.

Note: skipping the ts_lib job is enough to skip all compat tests because
they all depend on it, and in the Azure model if one of your
dependencies was skipped you get skipped too.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-17 13:33:20 +00:00
Sofia Faro
c26c349c8b
Generate exception instances from syntax. (#9140)
* Generate exception instances from syntax.

changelog_begin
changelog_end

* II

* III

* VII

* update ghc patch and add test

* VIII

* IX

* Remove DatatypeContexts

* X

* update stack snapshot

* don't need datatypecontexts warning anymore

* X-2

* XII

* XIII
2021-03-17 12:19:22 +00:00
Gary Verhaegen
17f8bcd37d
fix release job (#9166)
Three issues here:

1. The release job runs on an Azure-hosted agent, so it doesn't have the
   `reset_caches.sh` script (and doesn't need it).
2. The `bash-lib` step should not run if the current job has already
   failed.
3. The `skip-github` jobs should also not run if the job  has failed.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-17 09:46:02 +00:00
Gary Verhaegen
691edeacf2
ci: fix cache cleanup (#9137)
This is a continuation of #8595 and #8599. I somehow had missed that
`/etc/fstab` can be used to tell `mount` to let users mount some
filesystems with preset options.

This is using the full history of `mount` hardening so should be safe
enough. The option `user` in `/etc/fstab` automatically disables any kind
of `setuid` feature on the mounted filesystem, which is the main attack
vector I know of.

This works flawlessly on my local VM, so hopefully this time's the
charm. (It also happens to be my third PR specifically targeted on this
issue, so, who knows, it may even work.)

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-16 17:51:38 +01:00
Moritz Kiefer
a3d6c9faf8
Fix artifactory upload path (#9115)
changelog_begin
changelog_end
2021-03-12 11:39:50 +01:00
Gary Verhaegen
c556db48ed
ci/clean-up: remove poweroff (#9108)
It's not working and I can't make it work (see #9096), so I'd rather
just remove it.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-12 10:48:34 +01:00
Gary Verhaegen
764f9af655
ci/build: fix conditions (#9109)
In Azure Yaml, by defualt, a step runs only if the previous step was
successful. However, that default _disappears if the step has an
explicit condition_. I believe we have a number of conditional steps
that have been written without that intention, and this is thus
restoring what I believe to be the original intention, i.e. _adding_ an
additional condition rather than _replacing_ the default one.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-12 07:13:26 +01:00
Moritz Kiefer
9a7e246549
Fix escaping in publish-artifactory (#9107)
changelog_begin
changelog_end
2021-03-12 01:29:55 +01:00
Gary Verhaegen
e2730d322d
ci/windows: add missing mkdir (#9103)
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-11 18:16:19 +00:00
Moritz Kiefer
5cb857d902
Release EE SDK tarballs and installer (#9086)
* Release EE SDK tarballs and installer

As before, no way of testing this. I’ll do a snapshot afterwards.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Rename EE artifacts

changelog_begin
changelog_end
2021-03-11 14:49:48 +01:00
Moritz Kiefer
979e12fa68
Move artifact publishing out of yaml files (#9071)
* Move artifact publishing out of yaml files

The current publishing process pretty much hardcodes the set of
artifacts we publish in the yaml config. This is a problem because we
always release from `main` so the yaml files are always
identical. However, we will add new artifacts over time and this
starts falling apart. This PR changes this such that the process
described in the yaml files is very generic and just uploads and
downloads everything in a directory whereas the details are handled in
bash scripts that will come from the respective release branch and are
therefore version-dependent.

As usual for these type of changes, I don’t have a great way to test
this. I did do some due diligence to test that at least the artifacts
are published correctly and I can download them but I can’t test the
actual publishing.

changelog_begin
changelog_end

* Update ci/copy-unix-release-artifacts.sh

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Update ci/copy-windows-release-artifacts.sh

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Update ci/publish-artifactory.sh

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-03-11 11:44:02 +01:00
Gary Verhaegen
f0ca332983
fix release notification (#9075)
CHANGELOG_BEGIN
CHANGELOG_END
2021-03-10 17:12:14 +00:00
Sofia Faro
e6ea8fa9b3
Start adding exception syntax support. (#8960)
* Start adding exception syntax support.

changelog_begin
changelog_end

* .

* ..

* . .

* ....

* .___.

* ..__..

* ._._._.

* update stack snapshot

* recompile ghc-lib

* update stackage

* add CmmParse patch

* incorporate CmmParse.y patch into ghc branch

* Add a first test for exception syntax desugaring.

* Add a test for multiple message declarations

* update ghc patch

* Update duplicate message test with location

* add brackets test

* Add final patch SHA

* update stack-snapshot and unpin for unix

* Update stackage pin on windows
2021-03-10 12:07:53 +00:00
Gary Verhaegen
4bf05edf2b
tell people to speak up about snapshot blockers (#9068)
Suggested by @stefanobaghino-da; thanks!

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-10 11:18:57 +00:00
Gary Verhaegen
caa023b72e
ci/cron/check: remove dade-assist calls (#9048)
* ci/cron/check: remove dade-assist calls

We can only run this in a context where the dev-env is already set up
anyway, as that's how we get Bazel to build the script in the first
place.

CHANGELOG_BEGIN
CHANGELOG_END

* remove skip_java logic
2021-03-08 13:55:19 +00:00
Gary Verhaegen
121534c54d
ci/cron/check: low-hanging perf improvement (#9042)
Two quick improvements I made while waiting on #9039:
- Avoid loading Java. When looking at the logs flow by this seemed to be
  taking a huge amount of time.
- Isolate the gcloud config files, which allows for running gcloud
  downloads in parallel.

Together these reduce the `check_releases` runtime from about 5 hours to
about 2. There's much more (and smarter) work needed on this, but this
was really easy to do.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-08 07:56:33 +00:00
Gary Verhaegen
4fd42a6772
reduce noise on daily tests (#9039)
Getting a separate message per test was fine when there was one, but
this kind of got our of hand at this point.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-05 22:50:23 +00:00
Gary Verhaegen
41d62ea5c0
send CI failures on separate channel (#9038)
This will send CI failures to `#ci-failures-daml`.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-05 14:10:30 +00:00
Gary Verhaegen
e26d006f6f
slack: reduce @here mentions (#9037)
The people who care about these alerts monitor the channel closely
enough anyway, and having frequent automated @here bells ringing makes
it harder for individuals to highlight important messages.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-05 13:55:58 +00:00
Gary Verhaegen
2688ad6f0d
autorelease: improved PR message (#9008)
Thanks to @stefanobaghino-da for the suggestion.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 21:16:23 +00:00
Moritz Kiefer
4001f5c9bd
Conduitify download in release file (#8988)
* Conduitify download in release file

Apologies, my ocd kicked in when I saw this in another PR.

changelog_begin
changelog_end

* fixup deps

changelog_begin
changelog_end

* i should stop working

changelog_begin
changelog_end
2021-03-03 08:49:41 +01:00
Gary Verhaegen
9da40ea426
ci/cron: fix retry policy (#8985)
I think the retry is clobbering the files. Here is my theory:
- The HTTP request is lazy, i.e. it starts producing a byte stream
  before it has finished downloading.
- The connection somehow crashes in the middle of that lazy handling,
  possibly because the Haskell code blocks for too long on something
  else and GCP thus closes the connection. (If this is true, making sure
  we download the entire thing before we start writing may make the
  download more reliable.) This explains why we get a "resource vanished"
  and not a plain 404 to start with.
- The retry policy doesn't know anything about HTTP requests; it just
  sees an IO action throwing an exception and restarts the whole thing.
- Because the IO action opens the file in Append mode, we thus end up
  with a file that is too big and has its "starting bytes" multiple
  times. That obviously fails to sign-check.

If this is what happens then the retry does not help at all, which does
seem to be what we've been observing (though I haven't tracked the exact
error rate too closely). The fix would likely be as simple as changing
`IO.AppendMode to IO.WriteMode (which truncates, per [documentation]).

[documentation]: https://hackage.haskell.org/package/base-4.14.1.0/docs/System-IO.html

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-02 13:51:00 +00:00
Moritz Kiefer
dba114a283
Merge Maven uploads for different Scala versions (#8943)
* Merge Maven uploads for different Scala versions

It turns out Maven will abort an existing staging operation if you
create a new one. This means our jobs race against each other. We
could try to fix that by either sequencing the jobs in a clever
way (annoying and can break things like rerunning if only parts
failed), or by creating more profiles (unclear if you can even have
two profiles for the same group id, even if you do, it’s annoying to
merge).

So in this PR I (grudgingly) merged both uploads into the Haskell
script. This isn’t all bad:

1. It moves some logic from bash embedded in yaml string literals into
Haskell code.
2. It duplicates some versions but it removes duplication in other
places so overall not too much worse.
3. It does however, make things slower. We don’t run this stuff in
parallel. That said, the release step is relatively small (< 5min) and
it only runs on Linux.

We could add CLI arguments to make the Scala versions configurable for
local development. Given that this is blocking releases, I wanted to
get something in that works first and then see what we need in that regard.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-02-24 20:33:53 +00:00
Gary Verhaegen
634b38a92a
run PR builds on NOTICES updates (#8931)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-24 13:36:51 +00:00
Gary Verhaegen
115d03fd7b
skip Oracle test on forks (#8930)
Fork builds do not have the required credentials.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-24 12:19:57 +00:00
Moritz Kiefer
8e8284c907
Retry on HttpException in release check (#8909)
ConnectionTimeout gets thrown as HttpException which seems very
sensible to retry.

changelog_begin
changelog_end
2021-02-22 17:37:08 +01:00
Moritz Kiefer
c309ef915c
Stream stdout of verify_signatures (#8911)
There is really no reason to first capture this to a String and then
putStrLn it. That only causes issues since if we crash with a non-zero
exitcode we won’t output anything.

changelog_begin
changelog_end
2021-02-22 16:03:25 +00:00
Moritz Kiefer
b47c1a974c
Stop pretending strings are booleans (#8885)
* Stop pretending strings are booleans

Sorry for all the mess here. I’m not capable of programming in yaml.

It turns out is_release is a string not a boolean and

```
and('false', eq('true', 'true'))
```

is true.

I hate everything about this.

changelog_begin
changelog_end

* Name bash step to reduce confusion

changelog_begin
changelog_end

* fix version in test

changelog_begin
changelog_end

* names can’t have spaces apparently

changelog_begin
changelog_end
2021-02-17 16:13:54 +00:00
Moritz Kiefer
2717e6a164
Fixup condition for running publish_mvn_npm (#8884)
* Fixup condition for running publish_mvn_npm

This needs to run for both linux and linux-scala-2.13

changelog_begin
changelog_end

* Update ci/build-unix.yml

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-02-17 15:52:33 +01:00
Moritz Kiefer
5843b193fd
Fixup scala 2.13 check (#8881)
* Fixup scala 2.13 check

Somehow I managed to misread the helpcheck and get confused by my
experiments and thought semver produces an exit code of 1,0,-1 but
actually it writes that to stdout.

changelog_begin
changelog_end

* Update ci/build.yml

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

* Update ci/build.yml

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-02-17 15:23:58 +01:00
Moritz Kiefer
ba6ba9019f
Release Scala 2.13 artifacts (#8858)
* Release Scala 2.13 artifacts

changelog_begin
changelog_end

* Dedup default scala version

changelog_begin
changelog_end
2021-02-17 14:32:04 +01:00
Moritz Kiefer
182eb825c8
Port Ledger API Test Tool to Scala 2.13 (#8875)
* Port Ledger API Test Tool to Scala 2.13

And with that we’re finally at //... building on Scala 2.13.

changelog_begin
changelog_end

* Fix build on 2.12

changelog_begin
changelog_end

* Fix kvutils export on 2.13

changelog_begin
changelog_end
2021-02-17 12:34:25 +01:00
Stephen Compall
b94b5f92f3
experimental Oracle support in json-api (#8596)
* separate OracleQueries from PostgresQueries

- with some changes from 8161e63189 courtesy @cocreature

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

* abstract BIGINT

* json, signatories, observers columns

* compatible lastOffset

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

* oracle functions for select (single template ID), insert

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

* add oracle branch to integration tests

* oracle CLI configuration for json-api

* run integration tests with ojdbc in classpath

* update maven_install for ojdbc

* drop table if exists for Oracle

* make create DDLs and drops more planned out; drop in reverse order for Oracle integrity

* repin maven

* port agreement_text

* port (by removal) array part of ledger offset update

* use CASE instead of JSON map lookup for multiparty offset update

* simplify self types

* fix contract archival

* repin

* remove selectContracts in favor of selectContractsMultiTemplate

* move Oracle test execution to separate build target

* move websocket test to itlib

* make a bad array instance for Oracle

* report actually-available JDBC drivers only

* configure Oracle test from CI

* attempt with platforms and constraints

* a mismash of bazel to get it to conditionally enable oracle testing

* fix dep resolution in Scala 2.13

* make the Oracle test a stub (inits and does empty DB query)

* remove commented unused deps

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* repin

* we never supply a value for the surrogate ID columns

- suggested by @cocreature; thanks

* add not null to json in DB-specific place

- suggested by @cocreature; thanks

* why DBContractKey

- suggested by @cocreature; thanks

* textType isn't finalized

- suggested by @cocreature; thanks

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-02-17 03:50:35 -05:00
Moritz Kiefer
7ae28beff9
More Scala 2.13 cleanup (#8855)
This fixes Scaladoc and our pom file generation.

It also clears up the confusing error around gatling and removes a
redundant dependency on sbt (no idea why we had that in the first
place) both of which resulted in Scala 2.12 dependencies in our 2.13
lockfile which is obviously bad.

With this, we should now be ready to publish Scala 2.13 artifacts once
the ledger API test tool PR lands.

changelog_begin
changelog_end
2021-02-16 09:39:16 +00:00
Moritz Kiefer
f02b62a5e8
Port non-repudiation middleware to Scala 2.13 (#8853)
Tests are still missing and blocked on #8821.

The main change here is the switch from `ArraySeq[Byte]` to
`ArraySeq.ofByte`. `ArraySeq` allows for boxed and unboxed
representaitons. That means that `ArraySeq[Byte]unsafeArray` does not always return
an Array[Byte] (boxed version would be Array[AnyRef]).

Apparently collection-compat has taken the yolo approach and pretends
it can give you an Array[Byte] anyway 🤷 Scala 2.13 on the other
hand, does things properly in this regard which means the code relying
on `unsafeArray` fails to compile.

`ArraySeq.ofByte` is the specialized unboxed version where none of
this is an issue on both 2.13 and 2.12.

changelog_begin
changelog_end
2021-02-16 08:30:34 +01:00
Moritz Kiefer
777749539c
Draw the rest of the Scala 2.13 owl (#8852)
* Draw the rest of the Scala 2.13 owl

Not quite but pretty close and this switches us over from inclusions
to exclusions which makes it much easier to track.

Ledger API test tool should be fixed by #8821. Non-repudiation needs a
tiny bit of work since unwrapArray doesn’t work the same on 2.13 but
shouldn’t be hard to fix.

changelog_begin
changelog_end

* Fix ScriptService tests

Those tests were all dumb. They asserted on a fixed order while the
function to sort the things was broken so we ended up with the random
Map order which is unsurprisingly not the same.

This is easily fixed by fixing the sort function.

There is also a second issue with query not sorting.

changelog_begin
changelog_end

* Turns out if you fix one test the next one breaks

And clearly nobody ever tested this or give this a second thought.

changelog_begin
changelog_end
2021-02-15 19:20:24 +00:00
Moritz Kiefer
4d55b58f19
Port extractor to Scala 2.13 (#8845)
* Port extractor to Scala 2.13

changelog_begin
changelog_end

* Less silly view transforms

changelog_begin
changelog_end
2021-02-15 16:52:06 +01:00
Moritz Kiefer
91b185dcc3
Port Navigator to Scala 2.13 (#8847)
changelog_begin
changelog_end
2021-02-15 14:55:36 +00:00
Moritz Kiefer
9cd3909c31
Port the rest of //language-support/... to Scala 2.13 (#8846)
changelog_begin
changelog_end
2021-02-15 15:08:00 +01:00
Moritz Kiefer
f02e0fe42b
Generate Scala code compatible with Scala 2.13 (#8841)
fixes #8498

This fixes the error in 2.13 wtr to the location change of Predef. It
doesn’t yet address the warning wtr to the import of higherKinds. For
now, our build ignores that warning. Trying to figure out if we can
get away with a breaking change here or if we need to hide that change
behind a flag but either way, no need to block fixing the actual error
on that.

changelog_begin
changelog_end
2021-02-15 09:06:40 +01:00
Gary Verhaegen
df0086d26f
ci/linux: kill machines if they fail to clean up (#8835)
It does not seem like CI machines recover from a failed clean-up. This
is not the most elegant solution possible, but it's a cheap one that
should work.

Not: shutting down the machine in the middle of the build will not
provide an error message to Slack for main branch builds (because the
`tell_slack_failed` step would need to run on the same machine) but will
correctly report failure for PRs (that was the original purpose of the
`collect_build_data` step).

An alternative here would be to give a delay to the shutdown command,
and try to calibrate it so that it's long enough for this job to
correctly report its failure to both Azure and Slack, while making it
short enough that no other job gets assigned to the machine. I'm not
clear enough on how often Azure assigns jobs to try and bet on that.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-12 19:32:14 +01:00
Moritz Kiefer
153a23d315
Port the rest of //ledger-service/... to 2.13 (#8836)
changelog_begin
changelog_end
2021-02-12 17:26:19 +01:00
Moritz Kiefer
2558843bc5
Port //daml-script/... to Scala 2.13 (#8831)
* Port //daml-script/... to Scala 2.13

changelog_begin
changelog_end

* fmt

changelog_begin
changelog_end
2021-02-12 13:01:58 +00:00
Moritz Kiefer
c8b82f8e7a
Port HTTP JSON API binary to 2.13 (#8824)
Tests are still missing. Simply haven’t found the time yet, I’ll
tackle those separately.

changelog_begin
changelog_end
2021-02-12 09:54:47 +01:00
Moritz Kiefer
9dc3d2ace4
Upgrade to Bazel 4.0 (#8798)
* Upgrade to Bazel 4.0

changelog_begin
changelog_end

* Go back to default assignment

changelog_begin
changelog_end
2021-02-11 10:08:47 +01:00
Gary Verhaegen
eb14dcf6e9
bump check_releases timeout (#8812)
It's become quite flaky at just 4h.

Yes, I do plan to actually fix it, but it may take a while.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-10 22:45:25 +00:00
Brian Healey
dd73af06fb
replace deprecated blackduck property (#8811)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-10 19:54:31 +00:00
Gary Verhaegen
95c2184dcc
bump disk cleanup threashold (#8807)
I've seen [a build] failing with "disk full" after starting with 41GB
free.

[a build]: https://dev.azure.com/digitalasset/daml/_build/results?buildId=69270&view=logs&j=870bb40c-6da0-5bff-67ed-547f10fa97f2&t=deecee86-545a-596e-8b0d-fb7d606fe9f2

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-10 13:39:29 +00:00
Gary Verhaegen
8c45fd6afd
Revert "Disable MacOS CI jobs" (#8806)
This closes INCIDENT-126. Thanks @nycnewman!

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-10 12:59:03 +01:00
Moritz Kiefer
f14a8c14dd
Disable MacOS CI jobs (#8803)
* Disable MacOS CI jobs

5/6 macos nodes are down and we cannot fix it quickly, so to unblock
everyone, let’s disable those jobs for now.

I deliberately did not remove MacOS from releases. Those really should run on MacOS.

changelog_begin
changelog_end

* Undo unnecessary changes

changelog_begin
changelog_end

* Allow skipping macos jobs

changelog_begin
changelog_end
2021-02-10 10:29:21 +01:00
Moritz Kiefer
40e1a39f2c
Port //triggers/... to Scala 2.13 (#8781)
changelog_begin
changelog_end
2021-02-09 13:35:05 +01:00
Gary Verhaegen
cd33c2015c
ci: use setvar to set variables (#8664)
My goal here is to investigate the new warning Azure has been showing
for the past few days:

> ##[warning]%25 detected in ##vso command. In March 2021, the agent command parser will be updated to unescape this to %. To opt out of this behavior, set a job level variable DECODE_PERCENTS to false. Setting to true will force this behavior immediately. More information can be found at https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/design/percentEncoding.md

As far as I'm aware we are not deliberately passing in any `%25` in any
of our `vso` commands, so I was a bit surprised by this.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-09 11:42:34 +01:00
Moritz Kiefer
beb8a2a9ba
Port parts of //ledger-service to Scala 2.13 (#8776)
Unfortunately missing the actual interesting part since porting
`partitionBimap` seems to be rather annoying but this at least gets us
started on the easy parts.

changelog_begin
changelog_end
2021-02-08 11:27:50 +00:00
Moritz Kiefer
773ddada04
Upgrade nixpkgs (#8190)
* Upgrade nixpkgs

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* No ibazel

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Switch agent pool

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2021-02-08 11:12:07 +00:00
Moritz Kiefer
6c29f95c61
Add a CI job for testing against Oracle DB (#8763)
* Add a CI job for testing against Oracle DB

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Cleanup

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* debug

changelog_begin
changelog_end

* no debugging

changelog_begin
changelog_end
2021-02-05 17:36:56 +01:00
Moritz Kiefer
cf3d0876af
Add a prototype for DAML Script dumps (#7934)
* Add a prototype for DAML Script dumps

This is still fairly rough unfortunately but it does at least have
some tests and it doesn’t interact with anything else, so hopefully we
can land this and then parallelize the work from there on.

changelog_begin
changelog_end

* Update daml-script/dump/src/main/scala/com/daml/script/dump/Encode.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* view all the things

changelog_begin
changelog_end

* Update daml-script/dump/src/main/scala/com/daml/script/dump/Dependencies.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Fixup the switch to exists

changelog_begin
changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2021-02-05 13:19:20 +01:00
Gary Verhaegen
ab5f62abac
ci/clean-up: s/lsof/pgrep (#8748)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-04 12:21:55 +01:00
Gary Verhaegen
5734730d50
tweak local cache cleanup (#8738)
For various reasons, my attempts at improving the cache cleanup process
have been delayed. There are, however, two simple, non-controversial
changes I can "backport" without having to wait for consensus on the
whole thing:

1. Increase the threshold. At least for the compat jobs, we have seen
   builds failing after starting with ~32GB free.
2. Kill dangling Bazel processes, which keep some files open and
   sometimes cause the clean-up process to crash.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 19:47:52 +01:00
Gary Verhaegen
29c2577fa2
fix perf_speedy report (escaping ") (#8655)
The report currently chokes on quotes in the commit message (see
550aa48fc5). Rather than trying to
correctly excape things in Bash, this PR delegates the quote handling to
jq, because having to deal with Bash embedded in YAML is hard enough.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 19:47:27 +01:00
Moritz Kiefer
d7d954335e
Retry asset downloads in check_releases (#8730)
We’ve seen a number of "resource vanished (connection reset by peer)"
errors. Slapping some retries on that should hopefully make the CI job
a bit more robust.

changelog_begin
changelog_end
2021-02-03 12:04:59 +01:00
Moritz Kiefer
c89e00342d
Clean broken entries from the Bazel cache (#8668)
* Clean broken entries from the Bazel cache

This is hopefully a somewhat reasonable workaround for the "output not
created" errors that keep annoying us.

For now, this is just part of the hourly cronjob but we could move it
somewhere else if desired.

changelog_begin
changelog_end

* Fix GCS credentials

changelog_begin
changelog_end
2021-01-28 17:57:09 +00:00
Gary Verhaegen
fef712bf60
Upgrade linux nodes to 20.04 (#8617)
CHANGELOG_BEGIN

- Our Linux binaries are now built on Ubuntu 20.04 instead of 16.04. We
  do not expect any user-level impact, but please reach out if you
  do notice any issue that might be caused by this.

CHANGELOG_END
2021-01-27 17:38:34 +01:00
Gary Verhaegen
fc83f7088d
limit blackduck scans to main (#8647)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-27 17:29:27 +01:00
Moritz Kiefer
e0c5abd647
Switch to GHC 8.10.3 (#8394)
* Switch to GHC 8.10.3

changelog_begin
changelog_end

* Update bazel-haskell-deps.bzl

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

* Comment on rules_haskell patch

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-01-25 11:53:53 +00:00
Andreas Herrmann
5693394650
Publish JARs for trigger service and OAuth 2.0 middleware (#8614)
* include oauth2 logback config in release tarball

overlooked in https://github.com/digital-asset/daml/pull/8611

* Release trigger-service and oauth2-middleware JARs

changelog_begin
changelog_end

* drop from artifacts.yaml

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-01-25 09:14:13 +00:00
Gary Verhaegen
532f996f12
ci: clean-up hard drive more often (#8582)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-20 17:22:53 +01:00
Gary Verhaegen
01f11109fa
faster disk cleanup check (#8565)
I can't reproduce the `chmod` failure and have no clue how to fix it, so
for now let's just hope it's not too frequent.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-19 19:50:44 +00:00
Gary Verhaegen
3641751571 ci/unix: better cache size reporting (#8556)
Current reports look like:

```
Disk cache small enough:\n20G/home/vsts/.bazel-cache
```

because `echo` does not convert `\n`. An alternative would be to replace
`echo` with `printf`, but I have had enough issues with
subshells-in-strings lately that I prefer just avoiding them when
possible.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-19 18:29:07 +01:00
Gary Verhaegen
8350224aef
ci: fix linux cleanup for spaces (#8531)
I hate spaces.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-15 17:01:44 +00:00
Gary Verhaegen
36175c0a77
ci/cron: remove hidden.json (#8525)
I discovered yesterday that the `snapshots.json` (and actually also the
`versions.json`) file is no longer purely internal to the docs process,
as it was meant to be, but is now depended upon by the assistant. This
means the renaming from `snapshots.json` to `hidden.json` cannot happen,
and we reverted that yesterday in #8513 (& #8514), though that was done
in a bit of a hurry. This PR aims at cleaning up the resulting mess and
achieve a better long-term end state.

I will be manually removing the `hidden.json` file as soon as this is
merged, so that nothing ends up depending on _that_. There is no
occurrence of `hidden.json` outside this docs cron so hopefully this
works out.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-15 16:04:54 +00:00
Gary Verhaegen
cf949b6bae
ci: gc linux cache (#8527)
This is the equivalent of #8515 for Linux. There was some concern that
`bazel` would be upset at having that cache removed, so I spent a fair
amount of time trying to break it (on a Linux VM, as for some reason
`bazel` chooses not to use `~/.cache` on macOS). I could not make
`bazel` unhappy by deleting the whole thing. Deleting random files,
however, did end up producing error messages along the lines of:

```
$ bazel build //...
FATAL: corrupt installation: file '/home/vagrant/.cache/bazel/_bazel_vagrant/install/73d06d52dbf3a8e6ed43f5bf5f115eb0/embedded_tools/src/BUILD' is missing or modified.  Please remove '/home/vagrant/.cache/bazel/_bazel_vagrant/install/73d06d52dbf3a8e6ed43f5bf5f115eb0' and try again.
```

which suggest busting the entire thing as a solution, so I think we're
safe here.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-15 16:29:52 +01:00
Gary Verhaegen
96e9dde360
ci: clean-up disk cache if it gets too big (#8515)
Hopefully this works around our recent CI disk space issues, while 80GB
should be large enough that it only happens once per machine per day, so
perf shouldn't be impacted too much.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-14 19:41:07 +00:00
Gary Verhaegen
7f076bcd56
docs cron: update meta files unconditionally (#8514)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-14 20:04:48 +01:00
Moritz Kiefer
dfc48a0010
Update both hidden.json and snapshots.json (#8513)
* Update both hidden.json and snapshots.json

The assistant relies on the latter, our docs cronjob on the former. I
have no idea why we have two but keeping them in sync should be fine.

changelog_begin
changelog_end

* maybe I should test if my code compiles before pushing

changelog_begin
changelog_end
2021-01-14 19:07:35 +01:00
Moritz Kiefer
cdb2c2d0ba
Port the rest of //ledger/... to Scala 2.13 (#8497)
* Port the rest of //ledger/... to Scala 2.13

draw the rest of the fcking owl

Omitted for now are the ledger API test tool which has a dependency
only compatible with 2.12 and the generated code of the Scala
codegen (the codegen compiles and runs with 2.13, the generated code
does not).

changelog_begin
changelog_end

* Less symbols

changelog_begin
changelog_end
2021-01-13 22:23:31 +01:00
Moritz Kiefer
84a9488077
Port more of //ledger/... to Scala 2.13 (#8488)
* Port more of //ledger/... to Scala 2.13

changelog_begin
changelog_end

* Remove unusued dependency

changelog_begin
changelog_end

* Rename bf to factory to reflect the fact that it’s now a Factory

changelog_begin
changelog_end

* Use regex match instead of sliding string equalityt

changelog_begin
changelog_end

* regex matches are bad

changelog_begin
changelog_end
2021-01-13 16:30:43 +01:00
Gary Verhaegen
742feb58be
trigger PRs job on generated PRs (#8489)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-13 11:30:17 +00:00
Moritz Kiefer
290584a378
Port //ledger/ledger-api-client/... to Scala 2.13 (#8478)
* Port //ledger/ledger-api-client/... to Scala 2.13

This pulls in Sandbox next and kvutils as a dependency so those now
build on 2.13 as well.

changelog_begin
changelog_end

* Upgrade scala-colllection-compat

changelog_begin
changelog_end

* Use toVector.sortBy instead of to(LazyList).sortBy

changelog_begin
changelog_end

* Use a view for passing things to varargs

changelog_begin
changelog_end

* avoid symbol literal in CommandClientIT

changelog_begin
changelog_end
2021-01-13 11:35:46 +01:00
Gary Verhaegen
28d9cea05e
remove jfrog-cli (#8477)
As far as I can figure out, this has been unused since #5422.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-12 15:01:01 +00:00
Gary Verhaegen
ce96802a6d
only update NOTICES from main daily compats (#8473)
See #8468 for failure mode of current config.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-12 12:10:27 +00:00
Moritz Kiefer
6b2ac0e0c6
Port parts of //ledger/... to Scala 2.13 (#8470)
* Port parts of //ledger/... to Scala 2.13

Fairly random choice of directories, I just went through them in
alphabetical order. The one thing that I had to disable for now are
the conformance tests since the ledger API test tool has a dependency
not compatible with Scala 2.13.

changelog_begin
changelog_end

* Remove accidentally included //ledger/ledger-api-client/...

doesn’t actually work yet

changelog_begin
changelog_end
2021-01-12 10:55:00 +01:00
Moritz Kiefer
1abde753c9
Build and test //ledger-api/... against Scala 2.13 (#8452)
changelog_begin
changelog_end
2021-01-11 16:53:54 +01:00
Gary Verhaegen
7ca49bacc7
publish docs bundle as pipeline artifact (#8454)
This make the docs bundle available as a download from any build on
Azure. I mostly thought of this as a workaround for @bame-da because of
the Big Sur thing, but I figure that may occasionally useful to other
people too.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-11 13:30:51 +00:00
Moritz Kiefer
b83c4e945d
Bump perf test for scalafmt update (#8444)
changelog_begin
changelog_end
2021-01-09 13:12:54 +01:00
Moritz Kiefer
3a8f5e8aaa
Port //language-support/scala to Scala 2.13 (#8442)
The one thing that is still missing is making the generated Scala code
from the codegen compatible with Scala 2.13 so the examples are
excluded for now.

changelog_begin
changelog_end
2021-01-08 20:28:15 +01:00
Bernhard Elsner
cda93db944
Daml case and logo (#8433)
* Replace many occurrences of DAML with Daml

* Update docs logo

* A few more CLI occurrences

CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END

* Fix some over-eager replacements

* A few mor occurrences in md files

* Address comments in *.proto files

* Change case in comments and strings in .ts files

* Revert changes to frozen proto files

* Also revert LF 1.11

* Update get-daml.sh

* Update windows installer

* Include .py files

* Include comments in .daml files

* More instances in the assistant CLI

* some more help texts
2021-01-08 12:50:15 +00:00
Moritz Kiefer
0af4f522c7
Port the rest //daml-lf/... to Scala 2.13 (#8436)
* Port the rest //daml-lf/... to Scala 2.13

Draw the rest of the owl

changelog_begin
changelog_end

* Update daml-lf/encoder/src/main/scala/com/digitalasset/daml/lf/archive/testing/DamlLfEncoder.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-01-08 10:38:17 +01:00
Moritz Kiefer
424faa923a
Port damlc dependencies to Scala 2.13 (#8423)
* Port damlc dependencies to Scala 2.13

I got a bit fed up by the fact that going directory by directory
didn’t really work since there are two many interdependencies in
tests (e.g., client tests depend on sandbox, sandbox tests depend on
clients, engine tests depend on DARs which depend on damlc, …).

So before attempting to continue with the per-directory process, this
is a bruteforce approach to break a lot of those cycles by porting all
dependencies of damlc which includes client bindings (for DAML Script)
and Sandbox Classic (also for DAML Script).

If this is too annoying to review let me know and I’ll try to split it
up into a few chunks.

changelog_begin
changelog_end

* Update daml-lf/data/src/main/2.13/com/daml/lf/data/LawlessTraversals.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* fixup lawlesstraversal

changelog_begin
changelog_end

* less iterator more view

changelog_begin
changelog_end

* document safety of unsafeWrapArray

changelog_begin
changelog_end

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-01-08 07:22:38 +01:00
Moritz Kiefer
0549d07bdc
Port //daml-lf/interpreter to Scala 2.13 (#8421)
* Port //daml-lf/interpreter to Scala 2.13

For now the perf tests are left out since they depend on a DAR built
by damlc which depends on daml script which depends on the world
:exploding-head:

changelog_begin
changelog_end

* Scala 2.13-style to for ImmArray and FrontStack

changelog_begin
changelog_end

* Avoid extra conversion

changelog_begin
changelog_end
2021-01-07 10:13:08 +00:00
Gary Verhaegen
7f7e4f9fdc
fix docs cron (#8412)
Typo introduced in #8384.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-06 13:25:52 +00:00
Moritz Kiefer
02d8e8fe95
Port //daml-lf/(parser|validation) to Scala 2.13 (#8391)
* Port //daml-lf/(parser|validation) to Scala 2.13

changelog_begin
changelog_end

* Rename (Expr|Type)Traversable to (Expr|Type)Iterable

changelog_begin
changelog_end
2021-01-05 13:11:27 +01:00
Gary Verhaegen
f45a065c54
ci: pin down Ubuntu versions (#8388)
For a couple weeks now there has been a warning on the Azure Pipelines
web UI that says `ubuntu-latest` is in the process of switching from
18.04 to 20.04. I am not aware of any specific issue this would cause
for our particular workflows, but I don't like my dependencies changing
from under me.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-05 10:39:59 +01:00
Gary Verhaegen
7edc57712d
separate CI config for main & prs (#8374)
This is another take on #8276, with the same underlying motivation.
However, this approach is mostly duplication-free, which seems better,
especially given the already-pretty-sorry state of our CI config.

Like #8276, this is done in 2 commits for ease of review. The first
commit is wholly unintresting and just copies `azure-pipelines.yml` to
both `ci/prs.yml` and `ci/build.yml`; the second commit removes from
each part what it shouldn't have. The intention is for `ci/build.yml` to
have all of the common parts.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-04 20:45:30 +01:00
Gary Verhaegen
eb9aba680e
ci/cron: remove temp hack (#8385)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-04 19:06:30 +00:00
Gary Verhaegen
b506393dc8
ci/cron: use proc instead of shell (#8384)
As suggested by @cocreature in #8382.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-04 19:47:13 +01:00
Gary Verhaegen
2c497a3e75
fix typo in docs cron (#8382)
Introduced in #8372.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-04 18:32:57 +01:00
Gary Verhaegen
2083f74cf2
add docs.daml.com/latest (#8372)
This commit changes the docs cron to create a new file
`docs.daml.com/latest`, a simple text file containing the version number
of the latest released version. This is done in response to #8354, to
avoid having to replicate the logic for which version is the latest
across this, the assistant and the get-daml.sh script.

This commit also cleans up a small transitional FIXME in the docs cron
regarding the transition from `snapshots.json` to `hidden.json`.

For the solution to #8354 to be complete, we'll also need to update
get-daml.sh and the assistant to use the new latest file. Note that this
file would only be published on the next stable release, so this commit
also includes a temporary hack to re-generate it (and `versions.json`
and `hidden.json`) unconditionally on every run; this can be removed as
soon as this has run once.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-04 15:14:42 +01:00
Gary Verhaegen
b45e37991f
update test sha for copyright update (#8361)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-01 22:16:37 +00:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Gary Verhaegen
93f449d245
rename master to main (#8245)
As we strive for more inclusiveness, we are becoming less comfortable
with historically-charged terms being used in our everyday work.

This is targeted for merge on Dec 26, _after_ the necessary
corresponding changes at both the GitHub and Azure Pipelines levels.

CHANGELOG_BEGIN

- DAML Connect development is now conducted from the `main` branch,
  rather than the `master` one. If you had any dependency on the
  digital-asset/daml repository, you will need to update this parameter.

CHANGELOG_END
2020-12-27 14:19:07 +01:00
Moritz Kiefer
f3e481525c
Fix compare.sh again (#8346)
Turns out bash is hard and I’m stupid :sadpanda:

We need to write thoutput to stderr, otherwise this ends up in the
JSON output which obviously is not valid JSON.

changelog_begin
changelog_end
2020-12-18 20:59:38 +00:00
Moritz Kiefer
0391b867ee
Fix compare.sh in perf test (#8344)
We changed the patch to target more than one file which made the
checkout insufficient for restoring the state and then the following
git checkout of current fails with:

```
error: Your local changes to the following files would be overwritten by checkout:
        stack-snapshot.yaml
```

A git reset --hard should make sure everything gets reset.

changelog_begin
changelog_end
2020-12-18 20:59:22 +01:00
nickchapman-da
a7891a32b5
Avoid duplicating template let bindings (#8259)
* update ghc-lib patch hash

* update stack-snapshot.yaml

* update ghc-lib patch again

changelog_begin
changelog_end

* update stack-snapshot.yaml

* bazel run @stackage-unpinned//:pin (on linux)

* update ghc patch -- no singleton tuples!

* update stack-snapshot.yaml

* update stackage_snapshot.json

* expect error just once, not repeated 5 times

* remove 4x: --ghc-option -Werror

* ghc-lib patch

* stackage_snapshot.json

* stackage_snapshot.json (really, last commit was the yaml)

* Revert "remove 4x: --ghc-option -Werror"

This reverts commit 34b65fc7b1.

* ci/da-ghc-lib/compile.yml

* stack-snapshot.yaml

* stackage_snapshot.json

* stack pin on windows
2020-12-18 14:33:28 +00:00
Gary Verhaegen
e51838efff
fail on failed perf check (#8334)
Today the [perf check failed], but we got no notification of it. I'm not
sure what's happening as I can't reproduce any of it locally: not only
does the `bazel run` command work for me (despite the ghc-lib URL
returning a 404 when I try it manually), I also can't reproduce the fact
that Bash, on CI, doesn't seem to fail on either the `bazel run` error
or the fact that on the next line `cat` tries to access a file that
doesn't exist (for which CI does print the error message).

This PR does two things:

- Add an explicit check that _should_ get Bash to actually fail should
  this happen again in the future. It is not a great fix but at least
  we'll know if it happens again (to the best of my knowledge today was
  the first time we hit this).
- Amend the existing patch we apply on the baseline commit to use the
  GCS-hosted ghc-lib packages.

CHANGELOG_BEGIN
CHANGELOG_END

[perf check failed]: https://dev.azure.com/digitalasset/daml/_build/results?buildId=64395&view=results
2020-12-18 13:42:54 +01:00
Gary Verhaegen
604787eb07
fix Slack notifications (#8327)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-17 14:32:49 +01:00
Moritz Kiefer
b32789025e
Reset Windows cache (#8326)
changelog_begin
changelog_end
2020-12-17 12:24:07 +00:00
Moritz Kiefer
fbf1820f94
Fix slack escaping (#8311)
The previous escaping syntax doesn’t seem to work (after the first
layer you no longer have a variable) and has broken our build
reporting completely.

changelog_begin
changelog_end
2020-12-16 11:18:41 +00:00
Gary Verhaegen
e28699dbb0
fix Slack messages (#8292)
When including commit titles in Slack messages, care has to be taken to
escape what Slack considers [control characters], namely `&`, `>` & `<`.

[control characters]: https://api.slack.com/reference/surfaces/formatting#escaping

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-15 18:11:11 +01:00
Remy
3783a158ff
Bump perf test (#8269)
Needs bumping due to the API changes for GenNode (#8217)

changelog_begin
changelog_end
2020-12-11 17:37:44 +00:00
Brian Healey
6a1e0a633b
Avoid haskell and jvm bazel blackduck scan stomping (#8247)
* Run bazel scan for all but haskell first, then haskell at end so they do not stomp on each other

CHANGELOG_BEGIN
CHANGELOG_END

Signed-off-by: Brian Healey <brian.healey@digitalasset.com>

* use common prefix between runs so results are aggregated, get branch name from running job rather than assuming master

* DO NOT MERGE: disable all jobs except for blackduck scan

* haskell before full scan

* parens instead of braces

* differentiate haskell and jvm bazel runs with unique code location

* unique code location prefix

* fix syntax

* unique code location to avoid clashing bazel runs

* Use master security-blackduck script helper

* reenable all jobs to make mergeable

* cleanup whitespace

* Use Build.SourceBranchName for branch

* Update ci/cron/daily-compat.yml

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* DO NOT MERGE: skip all jobs but blackduck, skip update notices file step

* reenable all jobs to make mergeable

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-12-11 07:56:05 -05:00
Moritz Kiefer
75d28d1242
Bump perf test (#8256)
Needs bumping due to the minor API changes for multi-party submissions

changelog_begin
changelog_end
2020-12-11 12:29:49 +00:00
Gary Verhaegen
917ffe8c8b
daily ci: remove debug output (#8255)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-11 12:09:29 +00:00