Commit Graph

81 Commits

Author SHA1 Message Date
Gary Verhaegen
c82a4d813b
[3.1] fix dev-env in various places (#19127) 2024-05-01 18:23:29 +02:00
Gary Verhaegen
483bfc9a1c
fix hourly cron: docker (#18830) 2024-03-23 11:08:46 +01:00
Gary Verhaegen
e40aad897f
move to subdir 3.0 (#18520)
* move most files

* update CI configuration
2024-03-22 02:27:46 +01:00
Gary Verhaegen
179d85362d
update copyright (#18167)
* update copyright

* undo hack from #18168

* update hash in platform-independence-pre-check
2024-01-15 20:27:42 +01:00
Gary Verhaegen
0b5c4b2a08
remove hourly canton-3x build (#18085)
We want to run this daily instead, which already happens as part of the
daily canton bump PR.
2024-01-04 19:07:41 +01:00
Paul Brauner
56018b5d6e
do a proper canton 3.x code drop in the canton-3x directory (#17980)
* do a proper canton 3.x code drop in the canton-3x directory

* copy the code from canton3

* address Gary's comments

* fix canton-3x
2023-12-06 10:47:47 +01:00
Paul Brauner
1794212369
build canton 3x in the CI (#17966)
* build canton 3.x in build.yml

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* apply suggestions

---------

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2023-12-05 15:18:35 +00:00
Gary Verhaegen
9d0ac21c86
cron: fix canton3 checkout (#17926)
Turns out CI doesn't have `pull.default = current`.
2023-11-27 15:44:43 +00:00
Gary Verhaegen
bab1cd43b6
cron/canton3: build with current main (#17920) 2023-11-27 14:08:07 +01:00
Paul Brauner
18e0e9e656
Test that canton 3.x builds with bazel hourly (#17876)
* introduce a canton2 directory

* rename to canton-3x and only keep the bazel rules

* add canton-3x to bazelignore

* fix visibility rules

* add a build-canton-3x script

* add build-canton-3x.sh temporarily to prs.yml to test it out

* try sending a message to stack when failing

* backport 243125adee

* restore prs.yml and add the job to azure-cron.yml

* restore tell-slack-failed condition

* address comments

* display the revision at which canton was cloned, to ease debugging
2023-11-23 08:54:35 +01:00
Gary Verhaegen
00b28969b2
re-start publishing daml-sdk image (#17760)
Turns out some people depend on it. I still think they shouldn't, and we
should work with them to help them move away, but short-term the right
thing to do is to not block their upgrade.
2023-11-06 17:58:23 +01:00
Gary Verhaegen
c71b781cc6
stop publishing daml-sdk image (#17132) 2023-07-17 17:21:12 +02:00
Gary Verhaegen
d75ca23db5
update get-daml-com (#16985)
So far updates to the result of `curl https://get.daml.com` have been
made manually. This automates the process.

Fixes #3915.
2023-06-13 15:36:32 +00:00
Gary Verhaegen
856cf788bb
fix cron (#16394)
Four years in, I still don't understand why Azure Pipelines chose to
make those paths relative.
2023-02-27 16:32:46 +01:00
Gary Verhaegen
4fa880a5fc
don't run fix-bazel-cache on PRs (#16377)
I'm annoyed at how slow it runs. The hourly cron should be good enough.
2023-02-23 15:59:57 +01:00
Gary Verhaegen
fc8eadf164
stop managing docs (#16226)
The docs S3 bucket will now be entirely managed by the docs repo CI.
2023-02-06 13:29:03 +01:00
Gary Verhaegen
151e12b81a
bump copyright (#16002)
This is the result of:

- Updating `./COPY` to say `2023`.
- Running `./dev-env/bin/dade-copyright-headers update .`
2023-01-04 18:21:15 +01:00
Gary Verhaegen
7853cbe2f2
run fix_bazel_cache on cron (#15575) 2022-11-15 13:07:41 +00:00
Gary Verhaegen
f2d78a85ea
cron: do not checkout version Dockerfile (#14459)
So that the Docker image file depends on when the image was created
rather than the branch. I think that makes more sense overall, but we
need this to include the OpenSSL bump into 2.3.1.

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-18 15:18:59 +02:00
Gary Verhaegen
c9070471cb
docker: bump base image (#14437)
CHANGELOG_BEGIN

- The base image used by the `digitalasset/daml-sdk` Docker image has
  been bumped from Ubuntu Focal to Ubuntu Kinetic. Please remember that
  this image is meant for demonstration purposes only and is not supported
  for use in any kind of production setup.

CHANGELOG_END
2022-07-15 16:06:55 -04:00
Gary Verhaegen
78e4d33346
fix Docker image (#14063)
Same goal as #14055, but this should fix this week's image (we build
from the release commit, so #14055 only fixes future images), as well as
allow us to rebuild past images should we ever need to.

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-02 08:27:07 +00:00
Moritz Kiefer
bf39f4890c
Upgrade vsce and markdown-it (#12431)
This upgrades vsce to the latest version and also markdown-it which is
unfortunately still pinned to an older version with a vulnerability.

There are some minor changes required to our invocations of vsce. I
tried to test this locally up to the point where it fails due to me
not having a token. We’ll only fully see it working after the next
stable release unfortunately.

changelog_begin
changelog_end
2022-01-17 13:40:42 +00:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Moritz Kiefer
f847767e36
Avoid nix result-* symlinks on CI (#12220)
We really don’t want those anywhere and they currently trip up
blackduck which starts scanning our nix store.

changelog_begin
changelog_end
2021-12-21 07:59:02 -05:00
Moritz Kiefer
10ab05f36f
Fix vsce publishing (#10043)
changelog_begin
changelog_end
2021-06-17 14:34:36 +02:00
Gary Verhaegen
83d60f0561
more frequent Windows cache cleanup (#9743)
We'd like this to run more than once an hour, and Azure doesn't support
that as a cron.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-19 14:24:47 +02:00
Moritz Kiefer
16f074f557
Handle curl failures in vscode publish process (#9547)
Currently CI is failing with a 401. Confusingly, it doesn’t fail
during this step but fails during the upload below later because
$MARKET ends up pointing to garbage. This does not solve the failure
but it produces a more sensible error.

changelog_begin
changelog_end
2021-05-03 15:11:30 +02: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
2f01a1c034
reduce ci/cron noise (#8563)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-19 19:12:30 +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
Gary Verhaegen
b9c1746abf
add env vars back to azure-cron (#7882)
Looks like I was wrong and [secret variables] do indeed require
explicit mapping:

[secret variables]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables

> Unlike a normal variable, they are not automatically decrypted into
> environment variables for scripts. You need to explicitly map secret
> variables.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-04 12:42:23 +01:00
Gary Verhaegen
d5060fa94c
sign SDK Docker image (#7868)
Nobody should be using it anyway, but at least now they can trust it's
from us. If they bother to check.

CHANGELOG_BEGIN

- The SDK Docker image is now signed. Reminder: this is a dev-only
  image, with absolutely no support for any kind of production use-case.
  To verify the signature, use the `docker trust inspect` command.
  You can also set the `DOCKER_CONTENT_TRUST` environment variable to 1
  to instruct Docker commands to only pull and run signed images. Keep
  in mind, however, that this only checks that there is a signature, not
  that the signer is who you expect it to be. For optimal security, you
  should manually check the signature once with `docker trust inspect
  --pretty` and then pin the image hash rather than relying on tags.

  The expected output of the `docker sign inspect` command should
  mention a signer named `automation` with a public key ID matching
  533a6e09faa512f974f217668580da1ceb6aa5b00aad34ea1240afc7d249703f
  (note that the `--pretty` output only shows the first 12 chars) and a
  repository key matching
  f5dc2aee6aed2d05d7eda75db7aa2b3fac7fc67afbb880d03535d5a5295a0d3b.

CHANGELOG_END
2020-11-04 10:33:04 +01: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
Moritz Kiefer
5668576b78
Upgrade rules-nodejs to the latest release (#6870)
changelog_begin
changelog_end
2020-07-27 16:50:23 +00:00
Gary Verhaegen
4a6ab84b69
add default machine capability (#5912)
add default machine capability

We semi-regularly need to do work that has the potential to disrupt a
machine's local cache, rendering it broken for other streams of work.
This can include upgrading nix, upgrading Bazel, debugging caching
issues, or anything related to Windows.

Right now we do not have any good solution for these situations. We can
either not do those streams of work, or we can proceed with them and
just accept that all other builds may get affected depending on which
machine they get assigned to. Debugging broken nodes is particularly
tricky as we do not have any way to force a build to run on a given
node.

This PR aims at providing a better alternative by (ab)using an Azure
Pipelines feature called
[capabilities](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser#capabilities).
The idea behind capabilities is that you assign a set of tags to a
machine, and then a job can express its
[demands](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/demands?view=azure-devops&tabs=yaml),
i.e. specify a set of tags machines need to have in order to run it.

Support for this is fairly badly documented. We can gather from the
documentation that a job can specify two things about a capability
(through its `demands`): that a given tag exists, and that a given tag
has an exact specified value. In particular, a job cannot specify that a
capability should _not_ be present, meaning we cannot rely on, say,
adding a "broken" tag to broken machines.

Documentation on how to set capabilities for an agent is basically
nonexistent, but [looking at the
code](https://github.com/microsoft/azure-pipelines-agent/blob/master/src/Microsoft.VisualStudio.Services.Agent/Capabilities/UserCapabilitiesProvider.cs)
indicates that they can be set by using a simple `key=value`-formatted
text file, provided we can find the right place to put this file.

This PR adds this file to our Linux, macOS and Windows node init scripts
to define an `assignment` capability and adds a demand for a `default`
value on each job. From then on, when we hit a case where we want a PR
to run on a specific node, and to prevent other PRs from running on that
node, we can manually override the capability from the Azure UI and
update the demand in the relevant YAML file in the PR.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-09 18:21:42 +02:00
Gary Verhaegen
0d65065e60
fix typo in vscode cron (#5800)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 14:40:08 +00:00
Gary Verhaegen
681c862d88
fix daml extension upload (#5780)
With the current setup, we always push whatever version GitHub considers
as the latest, which is defined by date. This means that at the moment a
patch release could overwrite a less recent but higher-version release,
essentially downgrading the SDK to a previous, presumably less good user
experience.

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

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:10:30 +02:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Moritz Kiefer
cacbb3a269
Publish docker images for snapshot releases as well (#5205)
* Publish docker images for snapshot releases as well

We got a couple of requests for this and given the current release
process this seems very reasonable. Snapshot releases are clearly
marked as such so I think there this is fine.

We could think about differentiating between a stable release version
marked as a prerelease and not publish the docker image for that but
given our current release process where the stable version is based on
an already existing snapshot and therefore testing is very unlikely to
fail when we mark it as stable, that doesn’t seem worth the complexity
here.

changelog_begin
changelog_end

* Update azure-cron.yml

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-03-26 10:51:15 +01:00
Gary Verhaegen
872a5fc0df
do not send release notes to hubspot (#4956)
@bame-da wants a more manual process where he can control exactly when
release notes are posted, possibly in advance.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-11 21:41:46 +01:00
Gary Verhaegen
47bd131f15
add copyright headers to yml files (#4407)
We seem to have forgotten about them in the copyright scripts.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-06 12:54:07 +01:00
Gary Verhaegen
00224c2480
ci: alert Slack on PR build completion (#4286)
One of the outputs of our brainstorming about how to make CI better was
that it is annoying to have to "babysit" pull requests. This PR attempts
to introduce a notification mechanism by which Azure will notify people
on Slack when a build finishes, so they know they need to go and rerun
or merge the corresponding PR.

This commit also changes the existing $Slack.URL variable to
$Slack.team-daml, to make more explicit where the Slack message is being
sent to (Slack works with one token per destination channel). Both
$Slack.URL and $Slack.team-daml are currently defined as the same token
in Azure.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-03 16:29:13 +01:00
Gary Verhaegen
9d8e8d494a
ci cron: tell Slack on failure (#4179)
Currently, when cron jobs fail, this is completely silent. After #4178,
in which we realized the VSCode extension had not been updated for about
a month, I believe it may be a good idea to get error messages sent to
Slack when a cron job fails.

We'll need to monitor for verbosity, but hopefully they will work most
of the time.

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-23 15:28:37 +01:00
Moritz Kiefer
d62006daaa
Fix yarn target in VSCode ext cron job (#4178)
This has changed in 0a26591849 which
broke the build. We only build the latest release so changing this
should be safe and not break older releases.

changelog_begin
changelog_end
2020-01-23 14:07:05 +01:00
Gary Verhaegen
0b1a2d1577 Docker cron: fix, and improve perf (#4055)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-15 18:34:48 +00:00
Gary Verhaegen
e3ec25333e docker cron: ensure nix tools are installed (#4024)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-13 14:05:15 +00:00
Moritz Kiefer
e2df7e7ea3
Build docker images using the Dockerfile for the corresponding tag (#4008)
changelog_begin

- [DAML SDK] Docker images for this release and releases in the future
are built using the Dockerfile of the corresponding git tag and are
therefore stable. Previously, they were updated whenever the
Dockerfile changed.

changelog_end
2020-01-13 11:53:38 +01:00
Gary Verhaegen
f8c247cadf
partial fix for docs cron (#3941)
This commit aims at mitigating two issues we have noticed with the
0.13.41 release:

1. The initial cron run for that release got interrupted at the 50
minutes mark, which happened to be right in the middle of the s3 upload.
This means it had already changed the versions.json file, but had not
finished updating the actual html files. Right now, the docs.daml.com
website shows version 0.13.41 in the drop-down, but actually displays
the content for 0.13.40. Additionally, trying to explicitly visit the
website for 0.13.41 (https://docs.daml.com/0.13.41) yields a 404. Note
that this also means the cron job did not reach the "tell HubSpot"
point, so 0.13.41 did not get announced.
2. As the script also did not reach the "clear cache" step, subsequent
runs have been rebuilding the documentation for no reason as the
sequence of steps was: check versions.json through HTTP, get cached one,
see it's not up-to-date, build docs, check versions.json through s3 API,
bypassing the cache, see it's up-to-date, stop.

To address those issues, this PR changes the cron to:
1. Increase the timeout to 2h instead of 50 minutes.
2. Always check the versions.json file through s3, rather than go
through the HTTP cache first.

These are not complete solutions but I'm not sure how to do better given
that s3 does not have atomic operations.
2020-01-03 14:43:22 +01:00