Commit Graph

119 Commits

Author SHA1 Message Date
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
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
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
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
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
Remy
65f1a247d0
Bump test_sha in perf tests (#7441)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 18:30:39 +00: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
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
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
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
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
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
Remy
28ab504b21
Bump test_sha in perf tests (#6825)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-22 11:00:53 +00:00
Remy
d538d9a53e
Bump test_sha in perf tests (#6816)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-21 16:56:01 +00: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