Commit Graph

601 Commits

Author SHA1 Message Date
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
Gary Verhaegen
029c655adc
blackduck: open PR on NOTICES file change (#8215)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-10 10:08:28 +01:00
Moritz Kiefer
ec0fcb39f1
Fix docs cron again (#8208)
Unfortunately, I missed the fact that we had our own logic for
handling process failures which resulted in uncatchable
exceptions. I’ve changed one place to use the upstream handling and
the other to call `fail` which throws an IOException like I would have
expected.

changelog_begin
changelog_end
2020-12-08 22:06:22 +01:00
Moritz Kiefer
0c7791bc1c
Fix docs cron (#8207)
The change in #8191 to publish daml on sql docs failed because the
versions.json and snapshots.json files don’t exist initially. This PR
fixes that by catching the exception and treating it as an empty file.

changelog_begin
changelog_end
2020-12-08 21:32:33 +01:00
Moritz Kiefer
880d290285
Publish DAML on SQL Docs (#8191)
changelog_begin
changelog_end
2020-12-08 13:49:37 +01:00
Brian Healey
ca294eb14d
add blackduck scan to run on master (#6130) (#8161)
* add blackduck scan to run on master (#6130)

* add blackduck scan

* disable go scanning
exclude entire language-support/ts directory for node scanning
break to multiple lines to make command line params easier to parse

* Increase timeout for blackduck binary scan

* update blackduck scan config

* remove some exclusions, force python3

* exclude GO until path to go executable can be resolved

* added readme explanation of why we want this file

* fail in case of policy violation

* ensure haskell bazel scan completes before running second round scan for bazel jvm and node and other langs

* trigger notices file gen to ensure BOM complete

* remove trailing end of lines

* run with latest detect version and unique code location name changes to wrapper script

* Add blackduck to daily compat job

* DO NOT MERGE: condition false to disable other jobs for testing

* remove parameters not available to cronjob

* Revert changes to regular CI pipeline

CHANGELOG_BEGIN
CHANGELOG_END

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

* Do not get branch name from variable

* Upgrade com.fasterxml.jackson.core:jackson-databind to 2.12.0 to address security vulnerability

* Remove disabling of other jobs, set to branch to be used on prod runs

* Apply suggestions from code review

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

* Address code review comments

* Updated NOTICES file

* Run bazel build, update NOTICES file

* Correct dade-assist

* do not have perms to pipe to dev/null

* Add md file explaining how to update NOTICES file

* Add instructions for running blackduck locally

* Add a link to full security-blackduck readme

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-12-07 19:59:39 +00:00
Gary Verhaegen
46b7decbca
notify_user: consider changelog entries (#8166)
The current implementation of the notify_user job sometimes reports
success while the build has actually failed. Azure does not provide a
way to query the overall state of the current build, so a general
solution to this problem does not seem possible (see #6796 for an
example of a failed attempt). However, all reported cases were
specifically about the `check_changelog_entry` job, which we can easily
query for, so this PR does that.

Note: originally pushed without a changelog entry to test new
notification mechanism.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-04 12:16:34 +00:00
nickchapman-da
0867605e1a
Don't loose signatures in template let binding (#8136)
* update ghc-lib patch

* update stack-snapshot.yaml

changelog_begin
changelog_end

* bazel run @stackage-unpinned//:pin (on linux) and update stackage_snapshot.json

* testcase to check type signatures in template-lets are not ignored

* update to ghc-lib commit hash following merge

* update snapshot

* update snapshot after pin on windows

* update stack pin on linux

Co-authored-by: Nick Chapman <nchapman@digitalasset.com>
2020-12-03 15:08:02 +00:00
Gary Verhaegen
485dd1b597
perf_json_http: compress results (#8123)
I wanted to suggest that on the PR but caught it after it was merged. So
I made a note of it, which promptly got lost. As the end of the year
approaches I've started trying to clean up a little.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-01 17:44:43 +01:00
Gary Verhaegen
3cef53135c
ci/cron: do not push artifacts to gcs bucket (#8067)
Having the cron push artifacts to GCP was really only meant to happen
once. I got distracted and worked on other things. This PR closes that
work loop such that the current state and expectations are:

- Every new release pushes to GCP as part of the release process.
- The cron only checks that the GCP backup exists and matches, but does
  not push if it doesn't.

The reason for this is we want the cron job to fail if there are
additional, unexpected files in a release, rather than automatically
commit those files for the long term.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-25 19:12:03 +01:00
Gary Verhaegen
b23304c691
add default capability to macos (#5915)
This is the macOS part of #5912, which I have separated because our
macOS nodes have a different deployment process so it seemed easier to
track the deployment of the change separately.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-25 15:34:33 +01:00
nickchapman-da
6a745ed1fa
Support choice observers in 1.dev (#7922)
* Adapt to new desugaring for choice observers.

update hash of ghc patch.

changelog_begin
changelog_end

update ghc patch to final version

update stack-snapshot hashes for ghc-lib(-parser)

update stackage_snapshot.json, following `bazel run @stackage-unpinned//:pin`

expose Optional constructors for desugared code to use

adapt LFConversion to expect a 4-tuple for a desugared choice def/sig

update LFConversion for choice-observers

first example using new choice observer syntax.

fix scala type checker to have correct scoping rules for choice-observers

remove comment from example which says it is broken

improve variable names

improve tests for choice-observer clause

only test choice-observers SINCE 1.dev

add jq queries for choice observeres

make positive statement in jq test which checks choice obserers are present

test behaviour of choice observers

squash me

typo

* test more choice-observer divulgence

* Update documention for choice observers.

changelog_begin
Support choice observers in 1.dev
changelog_end

* fix docs build

* fix daml docs choice-observers example

* address comments: rewording text

* annotate choices observers as early-access in documention

* split out documentation code-snippets which require --target=1.dev

* final tweaks to documentation text
2020-11-18 19:51:15 +00:00
Gary Verhaegen
d4b6b06923
update docker image description (#7915)
Note: this file is meant to represent the content on [Docker Hub], but
syncing is currently a manual process. I will propagate once this is
approved and merged.

[Docker Hub]: https://hub.docker.com/repository/docker/digitalasset/daml-sdk

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-06 16:39:16 +01:00
Gary Verhaegen
ba2ce20bb2
Docker Hub description for digitalasset/daml-sdk (#7886)
This commit just copies the existing description of the image from
DockerHub so we have a starting point to change it.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-04 18:25:08 +01:00
Remy
cb5b439e39
Bump test_sha (#7512) (#7860)
This changed in #7858 but it’s a harmless change.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-02 20:18:32 +00:00
Gary Verhaegen
cdf6160c76
ci/cron/check: use whileJust_ for recursion (#7747)
As suggested in #7746.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-20 16:03:46 +02:00
Gary Verhaegen
dd01dbc5a4
ci/cron: change github contact email (#7741)
GitHub requests that when we use the API without a token, which is what
we do here, we use a user-agent header that allows them to contact us in
case there is an issue they need to discuss. This PR updates that
address, and cleans-up a bit of duplication around it.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-20 12:08:31 +02:00
Gary Verhaegen
7eb4b352dd
ci/cron/check: replace wget with Haskell code (#7731)
As promised in #7696.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-19 19:07:09 +02:00
Gary Verhaegen
e1b26d27ad
ci/cron/check: limit simultaneous downloads (#7703)
As requested in review of #7696.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-16 11:37:50 +02:00
Gary Verhaegen
305a097a93
ci/cron: move concurrency from Bash to Haskell (#7696)
One small step further in removing the Bash.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-15 14:00:55 +02:00
Gary Verhaegen
ad79acdb65
ci/cron: ability to run check locally (#7690)
This PR allows the script to run without GCP credentials. It will
obviously then skip the bits that require GCP credentials, but that
still leaves it with plenty of things to do.

Because checking all releases can still be quite long (around an hour on
CI, and my personal connection is a bit slower), this also introduces a
new parameter that restricts the number of releases to test.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-15 12:18:45 +02:00
Moritz Kiefer
80a25bf54a
Bump perf sha (#7679)
The change from #7666 is benign so we can simply bump this.

changelog_begin
changelog_end
2020-10-14 11:38:49 +00:00
Gary Verhaegen
8e905b34c0
ci/bash-lib: fix gcs return code (#7630)
Currently the return code of the function is the return code of the
`eval "$restore_trap"` line, whereas semantically we want the return
code of the `gsutil` call. This is not an issue in most cases as the
`set -e` should kick in, but if the function appears as the condition in
an `if` statement the `-e` flag is suspended.

The main use-case right now is that the daily license check is _not_
uploading artifacts.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-11 19:07:22 +02:00
Gary Verhaegen
42b7fa5ab9
ci/cron: fix gcs path (#7626)
Change the path used to push to the backup gcs bucket to match what is
put by the release script. This needs to get merged before we run the
next daily.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-09 15:31:52 +02:00
Gary Verhaegen
cd427dc2d2
ci/cron: upload artifact to daml-data if missing (#7616)
If we don't already have a copy of an artifact in our "disaster
recovery" storage box, put one.

Note: as implemented, this upload mechanism happens only if the release
was successfully verified signature-wise, so this should not result in
us saving broken artifacts. Also, CI does not have deletion or overwrite
access to this bucket, so overall this should be pretty safe.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-09 14:55:37 +02:00
Gary Verhaegen
8c1fbf6225
ci/bash_lib: generalize save_gcp_data (#7599)
This PR extends the existing `save_gcp_data` function to handle any
`gsutil` command. This is done to support existence checking using
`gsutil ls` for private artifacts in release checking (`ci/cron`).

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-08 18:37:14 +02:00
Gary Verhaegen
19d7086a21
fix ci/cron: remove references to LOG (#7607)
CHANGELOG_BEGIN
CHANGELOG_END
2020-10-08 18:15:25 +02:00
Gary Verhaegen
19c658ae15
ci/cron: move temp file handling to Haskell (#7596)
CHANGELOG_BEGIN
CHANGELOG_END
2020-10-07 17:45:00 +02:00
Gary Verhaegen
c238985bf9
ci/cron: actually fail on invalid signature (#7592)
At the moment, because the signature check appears in a `if` statement,
failed signatures do not actually fail the script and would thus still
result in "success" messages to Slack.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-07 13:12:13 +02:00
Gary Verhaegen
5799557570
ci/cron: check all releases (#7586)
This walks through the paginated GH API to fetch all releases and check
their signatures.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-07 12:04:08 +02:00
Gary Verhaegen
4db8c3ada1
ci/cron: move Bash cron inside Haskell script (#7585)
Yes, this is how I write Haskell. I'm told it's an improvement over
Bash.

Jokes aside, plan is to chip away at the Bash script, starting with
replacing the outermost loop with a proper "get _all_ releases" call
from Haskell, but I like keeping things working in small steps, and even
long-term I have no desire to reimplement the gpg signature checking
code in Haskell.

I have tested that things still work (on my machine); the only
difference is that we now only get the full output all at once at the
end, rather than one signature at a time. I don't think anyone is
looking at the output in real-time, so this should not be a huge issue.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-06 18:45:29 +02:00
Gary Verhaegen
21374713d0
ci/cron: add opt-parse applicative (#7583)
As requested in [previous PR].

[previous PR]: https://github.com/digital-asset/daml/pull/7569#discussion_r499733636

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-06 17:14:27 +02:00
Gary Verhaegen
6d94208226
stop notifying shayne on pr builds (#7581)
CHANGELOG_BEGIN
CHANGELOG_END
2020-10-06 14:20:43 +02:00
Gary Verhaegen
67746b7710
ci/cron: add arg to select docs (#7569)
This is a preparatory step for moving at least some of the logic of
checking signatures to this script. The reasoning for putting signatures
in the same script basically boils down to "it already has GitHub
pagination".

I also removed the `run.sh` wrapper because it did not add anything
anymore. It used to be useful, but across various changes it's sort of
lost its purpose.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-05 19:35:09 +02:00
Gary Verhaegen
eb6b2ce1c6
ci/cron: small cleanup (#7570)
Small improvements I noticed could be made while working on #7569, in a
separate PR because they're quite unrelated.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-05 19:33:48 +02:00
Gary Verhaegen
2973228f77
signature check: report to Slack (#7568)
If a tree falls in the forest and all that.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-05 17:31:11 +02:00
Gary Verhaegen
fda2eca084
periodically check signatures (#7543)
This is a first, very incomplete step in the spirit of small,
incremental PRs. Known missing features:

- Should check all versions, not just the 30 most recent ones.
- Should also download from GCP backup and compare.
- Should alert on Slack if anything is unexpected.
- Should handle versions prior to us starting to sign (and do what?).
- Should also check artifacts in Artifactory, not just GitHub Releases.
- Optionally should save to GCP if we don't have a backup already.

So at the moment it's just downloading the artifacts for the 30 most
recent releases and printing a message stating whether we have a
signature and whether it's valid.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-01 21:01:42 +02:00
Gary Verhaegen
60b300199b
improve "patch bazel windows" UX (#6764)
This does not get used very often so it is likely nobody will remember
how it works when we do use it. It's And due to the ordering Azure makes
of jobs in its UI, it's very easy to miss that there is a final,
Linux-based step and the values are actually printed there.

So this adds a little note to remind us of that.

Note that as this changes the `ci/patch_bazel_windows` folder, this will
also generate a new Bazel, so this PR will also update the Scoop
reference.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 14:09:51 +02:00
Moritz Kiefer
1243afc4a1
Remove reference to release-notes.rst (#7524)
* Remove reference to release-notes.rst

https://github.com/digital-asset/daml/pull/7458 shuffled this
around. While we could update it, it doesn’t really make any sense. We
post our release notes to the blog now and not in the docs so this
whole checkout procedure is redundant. This is also true if we wanted
to make a bugfix release for a release < 1.5 where this file still
existed. The trigger_sha is always on master (following our current
release process) so the file would still not exist.

I did also remove it from the docs cronjob. We never reupload old docs
so this doesn’t make a difference.

changelog_begin
changelog_end

* Stupid whitespace change because windows is pissing me off

changelog_begin
changelog_end
2020-09-30 11:34:43 +00:00
Moritz Kiefer
89c0f6ca41
Bump test_sha (#7512)
This changed in #7501 but it’s a harmless change.

changelog_begin
changelog_end
2020-09-29 11:01:01 +00:00
Sofia Faro
c5d145358d
Patch ghc to add a daml version header marker. (#7489)
* Update ghc to add a daml version header marker.

(WIP)

changelog_begin
changelog_end

* update stack snapshot

* See what happens with daml-doc

* update patch

* update stack snapshot

* unpin stackage

* Update daml docs tests

* Remove version header ann when parsing module doc

* Update the test

* Set final patch commit SHA.

* update stack snapshot

* unpin stackage (mac/linux)

* lint

* unpin stackage (win)
2020-09-28 17:01:20 +00:00
Remy
65f1a247d0
Bump test_sha in perf tests (#7441)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 18:30:39 +00:00
Gary Verhaegen
29b876920e
ci/patch_bazel_windows: fail on curl failure (#7431)
At the moment, with the `curl` call comfortably nested inside an `if`
statement, `curl` failures are interpreted as simply going down the
`else` branch of the conditional. Hoisting it up to a separate variable
declaration makes the script fail on the curl call itself.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 15:57:21 +02:00
Gary Verhaegen
f98b92d7ba
reset Windows cache (#7423)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-16 22:38:40 +02:00
Leonid Shlyapnikov
d13e7aa184
JSON API daily perf test cron job (#7406)
* Add http-json-perf daily cron job

changelog_begin
changelog_end

* commenting out other jobs so we can manually test the new one

* commenting out other jobs so we can manually test the new one

* Fix the shell script

* Fixing the gs bucket, `gs://http-json bucket does not exist`

* uncomment the other jobs

* timestamp from git log

* get rid of DAR copying

* comment out the other jobs, so we can test it

* uncomment the other jobs
2020-09-16 13:02:02 -04:00
Gary Verhaegen
9632a2fa43
fix check-changelog (#7419)
In #7386 I inadvertently removed the default value for the argument
`check-changelog.sh` takes. This did not break CI because CI always
passes the argument explicitly, but it did break local workflows for
some developers.

Apologies.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-16 13:19:37 +00:00
Gary Verhaegen
b2d58a3304
save daily perf results (#7396)
It's a real shame I forgot to do this sooner, but better late than never
I suppose.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-14 18:38:31 +00:00
Gary Verhaegen
bcee8f9152
let dependabot bypass changelog check (#7386)
Currently, when Dependabot makes a PR, not only do we need to manually
trigger CI through `/azp run`, we also need to either change the commit
or add a new one to pass the changelog check. This addresses that second
part by making a exception for PRs signed by dependabot.

This is also a bit of an excuse to play with git signatures and gpg.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-14 14:04:37 +02:00
Moritz Kiefer
c3d758a2d3
Ignore failed ipcrm calls (#7218)
* Ignore failed ipcrm calls

changelog_begin
changelog_end

* Update ci/clear-shared-segments-macos.yml

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-08-25 08:39:11 +00:00
Moritz Kiefer
5936644970
Bump windows cache (#7212)
changelog_begin
changelog_end
2020-08-24 18:19:28 +02:00
Gary Verhaegen
6d1adee92f
push script-runner and trigger-runner to Artifactory (#7196)
I have created the corresponding user and repositories on Artifactory,
and tested the `curl` command manually. I'll add the corresponding
credentials to Azure once this is approved.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-20 19:11:27 +02:00
Gary Verhaegen
51e7c88bf5
announce release rotation on Tuesday (#7151)
It's been pointed out to me that some people actually plan their work,
and for them, it would be useful to know at least a day in advance that
they will be doing a release. This PR attempts to accommodate that.

Note: this will run as a new, separate cron. I'll do the Azure setup
after this gets approved.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-17 13:42:35 +02:00
Gary Verhaegen
d43419d339
update perf sha (#7140)
Change in Speedy API.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-14 12:55:06 +02:00
Gary Verhaegen
1baea84ca0
fix auth header for compat pr (#7134)
On the last release, the job succeeded despite no being able to create
the compat PR. This fixes:

- The curl call to actually return non-0 on non-2xx HTTP response.
- The way in which we encode the credentials.

This also attempts to create a Bash library, hopefully this time in a
way that doesn't get destroyed by our release process. IIUC pipeline
instructions (YAML files) are all parsed and read before any execution,
so by embedding the Bash library in a template we should get the correct
version (i.e. the one that is running the pipeline) even when checking
out other commits.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-14 11:35:57 +02:00
Moritz Kiefer
67f350694c
Fix release cron job (#7095)
CI failed because $4 was unset. We explicitly check later if it is set
so this is intentional, we just need to actually get to that check and
not fail due to set -u.

changelog_begin
changelog_end
2020-08-12 10:50:28 +02:00
Stephen Compall
6306b9f8d8
perf test harmlessly changed in #6907; match sha (#7065)
CHANGELOG_BEGIN
CHANGELOG_END
2020-08-10 07:26:18 +00:00
Moritz Kiefer
31c2ce0220
Bump Windows cache (#7056)
The "output was not created" errors seem to have become very
frequent. While taking out nodes seems to work as a bandaid, I’d like
to see if resetting the cache buys us a few days of not having to deal
with this. Admittedly, I don’t really have an explanation for why
resetting the cache should help if taking out the machines seems to do
something (suggesting that it hasn’t propagated fully).

changelog_begin
changelog_end
2020-08-07 09:05:32 +00:00
Gary Verhaegen
00f3de63c9
rotate responsibility for release process (#7011)
This PR attempts to add some automation around assigning release
management. The PR adds a file `release/rotation`; each week, the
updated CI cron job will:

- Open a PR for the new release [as current].
- Assign the first user in the file to that PR.
- Add the Standard-Change label to the PR.
- Start the build for that PR [as current].
- Open a new PR that rotates the `release/rotate` file, i.e. pushes back
  the first line to the end of the file.

This PR also adds mentions of the "release handler" (the first line of
`release/rotation`) to the various messages we send to Slack along the
release process.

The initial state of the `release/rotation` file has been created by
listing all the volunteers (Language team, Application Runtime team, as
well as @SamirTalwar-DA and @stefanobaghino-da) and piping the file
through `shuf`. (Then I put myself at the top so I can hopefully iron
out the issues with the first attempt.)

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-05 18:58:56 +02:00
Gary Verhaegen
1ff75f1256
remove monthly report (#6967)
This script is no longer relevant to our internal processes. The report
is now generated by the security team and validated by us, rather than
produced and validated by us.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-04 12:01:07 +02:00
Remy
cc0b497d23
Bump test_sha in perf tests (#6972)
CHANGELOG_BEGIN
CHANGELOG_END
2020-08-03 17:21:49 +00:00
Gary Verhaegen
614b4298a1
update base image for SDK Docker image (#6970)
The openjdk-alpine images we were relying on so far do not have security
updates anymore.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-03 18:20:31 +02:00
Gary Verhaegen
ef465de0a8
run build on automated release PRs (#6964)
Even though the Azure Pipelines bot account _clearly_ has write access
to our repo, as it can create the PR, it does not count as having write
access for the purposes of Azure deciding to run the build on the PRs it
opens. Not having the build run on the release PR would defeat the whole
point of having it, so this adds a little nudge to Azure so it does
start the build after opening the PR.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-03 16:42:00 +02:00
Samir Talwar
11bc582a9e
Publish DAML on SQL to GitHub Releases. (#6876) 2020-07-27 17:33:20 +02:00
Gary Verhaegen
8043756883
better release triggers (#6859)
Based on feedback from @nickchapman-da, this PR aims at making the
release process easier by:

- Automatically opening a release PR on Wednesday morning. The goal here
  is that by the time we start working, there is a release already
  built, so we save about an hour on waiting for that. This obviously
  doesn't help with ad-hoc releases.
- On a release PR build, posting to Slack when the release is ready to
  merge.
- On a release master build, posting to Slack when a release is ready to
  be tested.

My hope is that this makes the release process less tedious. This is not
trying to address the actual release testing, but hopefully should
reduce the annoyance of having to constantly go and check if the release
is ready.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-24 16:40:11 +00:00
Gary Verhaegen
97d1fa1e04
fix docs cron (#6864)
I lost the public ACL in #6817.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-24 16:13:00 +00:00
Gary Verhaegen
818a52b094
simplify docs cron (#6817)
simplify docs cron

This commit changes the "live state" to be that all versions are there
on S3, most of them hidden the way snapshots currently are, and only
displays in the drop-down the list of "supported" versions, i.e. stable
and >= 1.0.0.

The docs cron will now:

- Get list of versions from GitHub (as it does now)
- Get list of versions from S3 (as it does now: versions.json +
  snapshots.json, though it assumes we'll have a follow-up PR to change
  the latter to hidden.json)
- Compare; if the sets of versions are the same, stop there. (Note: this
  "set of versions" here includes the notion of which versions are shown,
  not just which ones exist. See the Versions data type in the code.)
- If there is a new hidden version, just build that, push it, change
  nothing else. No need to download any of the existing versions or mess
  around with anything else (except updating `hidden.json`, otherwise
  we're going to be doing this way too often.)
- If there is a new visible version:
  - check if we have it locally (i.e. from the previous step: it's a
    version we just added)
  - figure out the old and new default versions, and then apply the diff
    to the top-level directory. Basically download the two folders, list
    files that exist in the old one and not in the new one, delete those
    from S3, then push the new one to the top-level on S3.
- update versions.json & hidden.json (and for now snapshots.json)

This means that:

- we never mess with the existing versions; we don't need to download
  them, we don't need to change them, we don't clean them up. Old links
  keep working forever.
- The running time for the docs cron is roughly constant, in that it
  should very rarely have to either build or upload (or download) more
  than 2 versions per run, and if those instances happen they'd be
  accidents (we made 3 actual releases in an hour), not build-up over
  time.
2020-07-24 14:40:32 +02:00
Andreas Herrmann
4b1438276c
Update Bazel 2.1.0 --> 3.3.1 (#6761)
* Upgrade nixpkgs revision

* Remove unused minio

It used to be used as a gateway to push the Nix cache to GCS, but has
since been replaced by nix-store-gcs-proxy.

* Update Bazel on Windows

changelog_begin
changelog_end

* Fix hlint warnings

The nixpkgs update implied an hlint update which enabled new warnings.

* Fix "Error applying patch"

Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files
and applying patches has been reversed. The allows users to define
patches to these files that will not be immediately overwritten.
However, it also means that patches on another repository's original
`WORKSPACE` file will likely become invalid.

* a948eb7255
* https://github.com/bazelbuild/bazel/issues/10681

Hint: If you're generating a patch with `git` then you can use the
following command to exclude the `WORKSPACE` file.

```
git diff ':(exclude)WORKSPACE'
```

* Update rules_nixpkgs

* nixpkgs location expansion escaping

* Drop --noincompatible_windows_native_test_wrapper

* client_server_test using sh_inline_test

client_server_test used to produce an executable shell script in form of
a text file output. However, since the removal of
`--noincompatible_windows_native_test_wrapper` this no longer works on
Windows since `.sh` files are not directly executable on Windows.

This change fixes the issue by producing the script file in a dedicated
rule and then wrapping it in a `sh_test` rule which also works on
Windows.

* daml_test using sh_inline_test

* daml_doc_test using sh_inline_test

* _daml_validate_test using sh_inline_test

* damlc_compile_test using sh_inline_test

* client_server_test find .exe on Windows

* Bump Windows cache for Bazel update

Remove `clean --expunge` after merge.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 09:46:04 +02:00
Remy
28ab504b21
Bump test_sha in perf tests (#6825)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-22 11:00:53 +00:00
Moritz Kiefer
edd84a09d5
Fix reference to return produced by ApplicativeDo (#6821)
* Fix reference to return produced by ApplicativeDo

see https://github.com/digital-asset/ghc/pull/53 for details.

fixes #6820

changelog_begin
changelog_end

* bump to merged commit

changelog_begin
changelog_end

* switch to new ghc-lib

changelog_begin
changelog_end
2020-07-22 10:09:23 +00:00
Remy
d538d9a53e
Bump test_sha in perf tests (#6816)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-21 16:56:01 +00:00
Robert Autenrieth
7ce9748066
Split sandbox code into separate packages (#6695)
* Move public code into daml-integration-api

CHANGELOG_BEGIN
[DAML Integration Kit]: Removed sandbox specific code from the API intended to be used by ledger integrations. Use the maven coordinates ``com.daml:participant-integration-api:VERSION`` instead of ``com.daml:ledger-api-server`` or ``com.daml:sandbox``.
CHANGELOG_END
2020-07-17 17:06:06 +02:00
Moritz Kiefer
147a2700c0
Bump Windows cache (#6770)
To “fix” the “output was not created” errors.

changelog_begin
changelog_end
2020-07-17 12:41:10 +02:00
Moritz Kiefer
52b9eabbcc
Revert "refactor ci jobs: add setvar to ci/lib.sh (#6708)" (#6732)
This reverts commit 61e9df3eaf.

This interacts very badly with the fact that we check out old commits
for releases. While we could fix it for this particular issue, I don’t
think this buys us enough to make this worth doing and it makes it
easy to introduce issues in the future if we modify lib.sh

changelog_begin
changelog_end
2020-07-14 23:53:49 +02:00
Gary Verhaegen
61e9df3eaf
refactor ci jobs: add setvar to ci/lib.sh (#6708)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-13 17:34:54 +02:00
Moritz Kiefer
631ed3e891
Bump timeouts in compat tests (#6689)
This bumps the timeout of the compat tests on PRs to 360 minutes
matching other jobs on a PR (we mainly hit this if ghc-lib is rebuilt)
and the timeout on the daily jobs to 720 minutes (we hit this if
_everything_ is rebuilt).

I am slightly worried about the timeout on the daily job. After having
taken a look at it, there are a few reasons how we ended up here:

1. We started including more tests, e.g., sandbox-classic. Not much we
   can do here, those tests are useful.

2. We have a very large number of snapshots for 1.3.0. There are a few
   reasons for this:

   1. Timing: We branched off early for the 1.2.0 release so the first
      snapshot for 1.3 was on June 3th. For 1.4 it looks like the first
      snapshot will be on July 15th so that’s roughly 2 extra
      snapshots just due to timing.

   2. Additional snapshots: We had one broken snapshot due to a broken
      VSCode extension that we didn’t delete (probably not worth doing
      at this point). We also had to backport to an old snapshot which
      resulted in another extra snapshot. We also had one extra
      snapshot which was supposed to be the RC but wasn’t since the
      ANF revert needed to go in.

   The only thing that is clearly useless is the one broken snapshot
   but that doesn’t change things that much. I see 2 orthogonal
   options for improving this assuming we agree that the current
   runtime is worryingly high.

   1. Prune snapshots more aggressively, e.g., only include the last 3
      snapshots. That’s a pretty arbitrary decision but it would
      enforce a hard limit.

   2. Reduce test combinations. E.g., only test snapshots vs stable
      releases but not snapshots vs snapshots.

3. We end up forcing a full build quite frequently. Here are just 2
   examples of how we’ve done that so far.

   1. Upgrade rules_haskell. Basically all tests are run by a Haskell
      binary so this forces a full rebuild.

   2. Change runfiles of `daml`.

I don’t think there is much we can do about 1 or 3 which leaves us
with 2. One not entirely unreasonable option is to just do nothing. We
did have periods where things went pretty smoothly for the most part
and each month we reset to a much smaller number of releases (we also
have to start throwing out old stable releases at some
point). Otherwise reducing the number of test combinations seems the
most promising option to me.

changelog_begin
changelog_end
2020-07-10 12:34:53 +00:00
Moritz Kiefer
6c0bbd3ba6
Bump test_sha in perf tests (#6649)
This changed by the revert of the ANF changes which is harmless by the
same reasoning that made bumping it harmless when we introduced it.

changelog_begin
changelog_end
2020-07-08 12:26:11 +00:00
Samir Talwar
89369b3bb9
CI: Increase the PostgreSQL connections from 100 to 200. (#6647)
We saw a flake recently where PostgreSQL stopped accepting connections
during a CI run, leading the build to fail. This increases the number of
connections to 200 from the default of 100, hopefully mitigating issues
such as this one.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-08 10:49:11 +00:00
Moritz Kiefer
ade99dd2c1
Reset windows cache (#6604)
We are seeing caching errors again.

changelog_begin
changelog_end
2020-07-03 16:36:35 +00:00
nickchapman-da
14ca4e5e79
bump-perf (#6553)
changelog_begin
changelog_end
2020-06-30 22:08:36 +00:00
Gary Verhaegen
8539873d84
document shared memory segment issue (#6546)
document shared memory segment issue

After discussion with @SamirTalwar-DA, we agree the CI script to clear
memory segments is a bit too dangerous to make it easy to run on
developer machines. Still, developers may run into similar issues if
they run lots of tests and/or do not reboot their laptop frequently.
On developer laptops, we  usually spawn one PostgreSQL instance per
build/test that needs it (as opposed to CI where we create a single one
for the entire build; see `build.sh`), so they can actually build up
fairly quickly in some scenarios.

As an alternative, I have added a section to the README to cover what to
do if that issue happens.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-30 17:48:14 +02:00
Gary Verhaegen
beb33f2ab1
add explanation for clearing shared segments (#6545)
As requested on #6530.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-30 13:21:32 +00:00
Gary Verhaegen
55776f92ba
clear shared memory segment on macOS (#6530)
For a while now we've had errors along the line of

```
FATAL:  could not create shared memory segment: No space left on device
DETAIL:  Failed system call was shmget(key=5432001, size=56, 03600).
HINT:  This error does *not* mean that you have run out of disk space.
It occurs either if all available shared memory IDs have been taken, in
which case you need to raise the SHMMNI parameter in your kernel, or
because the system's overall limit for shared memory has been reached.
        The PostgreSQL documentation contains more information about
shared memory configuration.
child process exited with exit code 1
```

on macOS CI nodes, which we were not able to reproduce locally. Today I
managed to, sort of by accident, and that allowed me to dig a bit
further.

The root cause seems to be that PostgreSQL, as run by Bazel, does not
always seem to properly unlink the shared memory segment it uses to
communicate with itself. On my machine, running:

```
bazel test -t- --runs_per_test=100 //ledger/sandbox:conformance-test-wall-clock-postgresql
```

and eyealling the results of

```
watch ipcs -mcopt
```

I would say about one in three runs leaks its memory segment. After much
googling and some head scratching trying to figure out the C APIs for
managing shared memory segments on macOS, I kind of stumbled on a
reference to `pcirm` in a comment to some low-ranking StackOverflow
answer. It looks like it's working very well on my machine, even if I
run it while a test (and therefore an instance of pg) is running. I
believe this is because the command does not actually remove the shared
memory segments, but simply marks them for removal once the last process
stops using it. (At least that's what the manpage describes.)

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-30 01:40:16 +02:00
Remy
f5c65696f7
Update LF Perf test SHA (#6510)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-26 12:11:50 +00:00
Shayne Fletcher
4d896bc3bd
Update ghc-lib, da-ghc-master-8.8.1 (#6460)
changelog_begin
changelog_end
2020-06-23 08:29:16 -04:00
Gary Verhaegen
7d3dae4b1f
update perf-sha (#6457)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-22 18:46:19 +02:00
Gary Verhaegen
2923048935
remove purge_old_agents (#6439)
This script was supposed to remove old agents from the Azure Pipelines
UI. It may have been useful at some time (notably, when we used
ephemeral instances, they did not necessarily get to run their shutdown
script), but as it stands now, it's broken. The output from that step
ends in:

```
error: 2 derivations need to be built, but neither local builds ('--max-jobs') nor remote builds ('--builders') are enabled
```

after listing the nix packages it would build. Furthermore, it does not
seem to be useful as I have not seen any spurious entry in the agents
list on Azure since we switched to permanent nodes, on either the Linux
or Windows side (and this would only run on Linux, if it ran).

I'm also not convinced it ever ran, as I used to see a lot of spurious
machines on both Linux and Windows when we did use ephemeral instances.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-20 17:37:24 +02:00
Shayne Fletcher
cec2693dc7
enable -Wunused-matches (#6423)
changelog_begin
changelog_end
2020-06-19 19:35:10 +00:00
Remy
149bfc89ff
Update LF Perf test SHA (#6416)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-18 14:27:26 +00:00
Moritz Kiefer
2c1d4cb805
Fix nix installation (#6400)
Nix now requires -L, I’ve gone ahead and just normalized everything to
use -sfL which we were already using in one place.

changelog_begin
changelog_end
2020-06-18 10:34:08 +02:00
Moritz Kiefer
7e0a684857
Bump Windows cache (#6383)
changelog_begin
changelog_end
2020-06-17 19:33:26 +02:00
Moritz Kiefer
a178f62613
Fix packaging performance (#6350)
fixes #3150

This PR introduces a patch to GHC to fix the performance of the
pattern match checker in the presence of multiple packages which
is currently significantly (orders of magnitude) slower than having
everything in a single package. I also added a test case that hits
this. Here’s what you need to hit this issue:

1. A typeclass with a functional dependency. `HasField` is the obvious
   candidate for this.

2. A lot of instances of this typeclass in a separate package (this is
   the only part where the separate package matters).

3. A reasonably large ADT with a bunch of strict fields.

4. A pattern match in the context of some constraints of the
   typeclass. The constraints can be completely unused.

In that case, you will get a significant slowdown in the number of
instances, number of constructors and number of constraints (didn’t
verify if it’s linear but it is significant which is all that
matters).

Here’s why this happens:

1. The pattern match checker checks for strict fields if the type is
   inhabited.

2. This calls `pmTopNormaliseType_maybe` to normalize a type (the details don’t
   matter) which in turn calls into the typechecker. This function is
   called very often (presumably linear in the number of constructors
   but didn’t verify.)

3. The typechecker has some logic in `improveFromInstEnv` for
   generating additional equations by unifying functional
   dependencies `a -> b` with constraints in scope
   and thereby deducing information about `b`.

4. In the pattern match checker the list of instances of the home
   package is empty since the pattern match checker (apparently)
   doesn’t actually care about those extra equations. However, the
   list of instances in the EPS is not empty. This is the issue here:
   By moving it to an external package we suddenly end up with
   thousands of instances that we try to unify with the functional
   dependencies every time we normalize which happens very often.

Proposed fix:

The solution is rather simple: Since the pattern match checker
apparently does not care about the instances of the home package, it
almost certainly doesn’t care about instances in general so we just
empty the instances of external packages explicitly.

Is the fix correct?

1. I verified that the GHC test suite passes with this patch which
   gives me a reasonable level of confidence.

2. I verified that our own test suite passes.

3. The most dodgy part is actually emptying the instance since the
   whole EPS stuff is a mutable mess. What could in theory happen is that
   the PM ends up loading an interface file that mutates this
   again. However, afaiu it is impossible for the PM to need an
   interface that the typechecker didnt already need. I did do a bunch
   of debugging and this is exactly what I observed in my experiments.

Alternative ideas and upstreaming:

The other option would be to not try and mess with the EPS but somehow
have a conditional flag somewhere in the typechecker env to disable
this logic in the pattern match checker. However, that sounds
significantly more complex so I don’t think it’s worth the effort.

GHC 8.10 has a new pattern match checker that has different
performance characteristics and seems to do much better here so there
is little reason to try and upstream this. I strongly want to avoid
upgrading DAML to 8.10 at this point (too much risk, let’s wait until
things calm down)

changelog_begin

- [DAML Compiler] Fix an issue where compilation slowed down
  significantly when code was split up into several packages. See
  https://github.com/digital-asset/daml/issues/3150

changelog_end
2020-06-16 15:12:34 +02:00
nickchapman-da
e19888d979
update for no stack-tracing in speedy perf (#6363) 2020-06-16 11:36:05 +00:00
Gary Verhaegen
1300644668
fix error message on daily compat failure (#6337)
When I changed the quoting for the success case as part of #6267, I
forgot to update the error case, so now we don't get well-formed JSON
for errors.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-14 22:52:57 +02:00
Andreas Herrmann
d1e422580a
Increment Windows cache URL (#6321)
We've seen a series of failures of the form
```
ERROR: D:/a/1/s/daml-assistant/integration-tests/BUILD.bazel:162:1: output 'daml-assistant/integration-tests/create-daml-app-tests.exe' was not created
ERROR: D:/a/1/s/daml-assistant/integration-tests/BUILD.bazel:162:1: not all outputs were created or valid
```
across multiple machines. We suspect cache poisoning as the cause. This
increments the cache URL to effectively clear the cache.

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-06-12 15:33:38 +02:00
Moritz Kiefer
7717574d00
Bump Windows cache (#6310)
We are seeing

ERROR: D:/a/2/s/compiler/scenario-service/protos/BUILD.bazel:67:1:
output
'compiler/scenario-service/protos/_obj/scenario_service_haskell_proto/ScenarioService.o'
was not created

again so following our experiments, let’s reset the cache to see if it
fixes anything.

changelog_begin
changelog_end
2020-06-11 16:26:31 +02:00
Gary Verhaegen
9c8c1fa909
lightly safer docs cron: fail instead of error (#6288)
See @cocreature's comment on #6285.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-10 19:18:14 +02:00
Gary Verhaegen
485069f017
fix docs cron for releae notes (#6285)
Thinking about the upcoming release, I realized our current docs cron
has somehow lost the step of taking the release notes from the
triggering commit, probably in all the back-and-forth about which
release notes version to use to overwrite all the other ones.

This restores that, and adapts the algorithm for the new, multi-line
LATEST file format.

This _should_ work for all the current history, including releases made
on `release/*` branches and the unifying commit that turned the LATEST
file multiline (it adds more than one line so won't be matched as a
trigger commit).

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-10 14:43:23 +02:00
Moritz Kiefer
20d26394e1
Modify the cache URL instead of relying on platform_suffix (#6273)
For some reason, platform_suffix doesn’t seem to provide enough
isolation to fix the “undeclared inclusion” errors even though it does
fix the issues for me locally.

This PR tries to address the problem by switching from
`platform_suffix` to modifying the actual URL of the cache.

To avoid leaking stuff from the local cache, I’ve added a clean
--expunge for now. We should be able to remove this once nodes have
been reset tomorrow. It will slow down nodes but that is clearly
better than having everything fail.

changelog_begin
changelog_end
2020-06-09 17:05:19 +02:00
Moritz Kiefer
aac1e16794
Fix caching on Linux and MacOS (#6270)
When bumping the cache url on Windows, I accidentally also changed the
URL we push to on Linux and MacOS. This is obviously a bad idea so
this PR fixes it.

changelog_begin
changelog_end
2020-06-09 08:08:06 +00:00
Gary Verhaegen
664df64e13
fix daily perf Slack notification (#6267)
This PR fixes the Slack notification on daily perf runs. It also updates
the perf sha.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-09 06:45:58 +00:00
Moritz Kiefer
1d3c8f3390
Bump cache suffix (#6265)
* Bump cache suffix

As discussed, we are going to bump this every time we feel like
resetting the cache might help. This is a temporary measure to get
some metrics on how often things break and if resetting the cache
helps.

changelog_begin
changelog_end

* Update configure-bazel as well

changelog_begin
changelog_end
2020-06-08 17:15:12 +02:00
Moritz Kiefer
f1822f6daa
Fix variable in daily slack notifications (#6221)
Currently the report fails with variables[Build.SourceBranchName]:
command not found which is obviously not what we want (it’s mixing up
the syntax in Azure’s yaml config and Bash). Looking at the
code in the tell-slack-failed.yml, this one does seem to work but I
haven’t tested this so :crossed-fingers:.

changelog_begin
changelog_end
2020-06-04 12:41:36 +02:00
Gary Verhaegen
2fe320fe48
automated ghc-lib build (#6188)
automated ghc-lib build

This PR aims at automating the build of ghc-lib. The current process
still has a few manual steps; it needs to be updated because Bintray is
going away, so this seemed like a good opportunity to fully automate it.

This works like the "patch bazel on Windows" jobs: the filename will
contain a hash of the `ci/da-ghc-lib` folder, and the job will run only
if the corresponding filename does not yet exist on the GCS bucket. PRs
aiming at changing the ghc-lib version will need to run twice: once to
create the artifacts, and once to change the `stack-snapshot.yaml` file
to match.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-04 12:05:03 +02:00
Moritz Kiefer
b993339844
Include rules_haskell revision in platform suffix (#6209)
* Include rules_haskell revision in platform suffix

Hopefully this makes CI a bit less of a dumpsterfire. I’ve also
followed the comment and made the suffix actually 3 characters long
instead of 2 since that makes me worry less about collisions and
should hopefully still be short enough to not hit MAX_PATH.

changelog_begin
changelog_end

* Update ci/configure-bazel.sh

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

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-06-03 21:33:37 +02:00
Gary Verhaegen
445f6467d9
daily run: warn on master only (#6177)
Currently the message to Slack is always triggered by running the daily
checks. This means that it gets very noisy to:

1. Run the check on PRs affecting the check (like this one),
2. Rerun the check multiple times to ascertain that a given failure is
   flaky.

With this PR, the message to Slack is replaced with a simple `echo` when
these checks are not run from the `master` branch, so whoever (manually)
triggered them can still get feedback on the result, but other people
don't get spurious `@here` mentions.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-03 16:36:05 +02:00
Moritz Kiefer
405f3ad6ee
Sort files when calculating CACHE_KEY (#6173)
* Sort files when calculating CACHE_KEY

The order returned by `find` is unspecified and seems to have changed
for whatever reason in some cases. This changed the cache key which is
obviously not intended. It looks like the one we currently have in our
scoop manifest is the one that we get by sorting. Reversing the sort
produces the one CI currently calculates.

changelog_begin
changelog_end

* update manifest to match CI output

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-05-31 22:02:13 +02:00
Gary Verhaegen
90547e6ab4
build old docs with their release notes (#6128)
In light of #6127, I kept wondering why rebuilding 1.1.1 would fail. The
problem addressed by #6127 is that we tried to rebuild it, which we
shouldn't, but the reason I noticed it is because the build failed, and
there is no good reason for the 1.1.1 docs to not build anymore. Looking
at the logs confused me even more as it failed with (elided):

```
docs/source/support/new-assistant.rst:
WARNING: document isn't included in any toctree
```

and that change happened _after_ 1.1.1. So I went back to the code, and
discovered I somehow had gotten confused as I changed the approach
mid-way through editing the file. If we're overwriting the
`release-notes.html` file post-build, which we are now doing (and is the
reason for ignoring it when checking checksums), then we should not be
touching the `release-notes.rst` file pre-build.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 22:19:18 +00:00
Gary Verhaegen
e2d416e335
fix docs cron not ignoring release-notes (#6127)
The docs cron is supposed to ignore the release-notes.html page when
checking whether a docs folder is corrupted, because we manually
override it. However, that currently doesn't work, either because the
`sed` version we are using does not support changing the delimiters, or
because no version of `sed` does and I just imagined it.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 18:47:40 +02:00
Gary Verhaegen
ccb496ee0d
update perf test sha (#6125)
Changed by #6123, relevant part of the diff is:

```
           ledger.lookupGlobalContract(ParticipantView(committers.head),
effectiveAt, acoid) match {
-            case LookupOk(_, result) =>
+            case LookupOk(_, result, _) =>
               cachedContract = cachedContract + (step -> result)
```

which seems benign enough.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 15:10:11 +00:00
Gary Verhaegen
6e48abc793
update perf benchmark following #6080 (#6120)
This should be merged after #6080. This PR adds a patch (and
consequently updates the `ci/cron/perf/compare.sh` script) to apply the
same logical change as #6080 on top of the baseline commit, so our
performance comparison remains "apples to apples".

I am well aware that managing patches is not going to be a great way
forward. The rate of changes on the benchmark seems to be slow enough
that this is good enough for now, but should we change the benchmark
more often and/or want to add new benchmarks, a better approach would be
to handle the changes at the Scala level. That is:

- Create a "rest of the world" (world = Speedy, its compiler, and all of
  the associated types) interface that benchmarks would depend on,
  rather than depend directly on the rest of the codebase.
- Create two implementations of that interface, one that compiles
  against the current state of the world, and one that compiles against
  the baseline.
- Change the script to load the relevant implementation, and then run
  all the benchmarks as-is, with no match necessary.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 13:34:08 +02:00
Gerolf Seitz
d55ebf08ec
Use Sandbox Classic as DAML on SQL (#6095)
CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 08:31:27 +02:00
Gary Verhaegen
9c7c8918a3
fix fatjar versions (#6091)
Version is taken from the env var (or defaulted to 0.0.0) at build-time.
Since those two packages are not build by default by Bazel, we need to
add the env var to the Bash step where they do get explicitly built.

Fixes #6090.

CHANGELOG_BEGIN
- sandbox and http-api fatjars will now display correct version number.
CHANGELOG_END
2020-05-25 15:59:23 +02:00
nickchapman-da
fb6cafa311
Bump the sha for CI perf (#6078)
changelog_begin
changelog_end
2020-05-22 16:24:18 +00:00