Repository navigation
ci: release the runtime that the checks built when it lands - #5
Merged
Merged
Conversation
martinothamar
added a commit
that referenced
this pull request
Oct 25, 2026
udevadm trigger returns before udev has applied the rule that opens /dev/kvm to the runner user, so the check right after it can fail on a runner that has KVM. The CLI smoke tests failed this way three times in a row on #5, while the integration tests, with the same step, passed. Wait for udev to settle, and list the device so that a runner without KVM shows as one.
martinothamar
force-pushed
the
ci/release-tag-on-publish
branch
from
October 25, 2026 10:50
534d37c to
e19435e
Compare
martinothamar
marked this pull request as ready for review
October 25, 2026 10:51
martinothamar
force-pushed
the
ci/release-tag-on-publish
branch
2 times, most recently
from
October 25, 2026 12:07
4494b5a to
e33b1fa
Compare
martinothamar
force-pushed
the
ci/release-tag-on-publish
branch
from
October 25, 2026 13:18
e33b1fa to
7de216c
Compare
check-digdir.yml now builds the runtime once, with the release profile, runs its tests against those binaries, and assembles them into the release assets, which the run keeps as an artifact. Before, the checks tested a CI-profile build and the release built the runtime again from the tag, so what was published was never what was tested. release-digdir.yml runs when main-digdir moves to a version that has no release yet. It builds nothing: it finds the release assets by the tree that landed, which check-digdir.yml names them by, takes the oldest successful run in this repository, verifies its checksums and publishes them, creating the v<version> tag on the landed commit as it publishes the release. The oldest run is the one whose digests a consumer could have pinned, since the bundles are not byte-reproducible. A failed run spends no version and can run again. It refuses when libkrunfw is untagged or no check run built the tree. The manual dry run, the check and dry run on main-digdir before a release, and the hand-pushed tag are gone. The bundle digests are final once the sync branch's checks pass, so a consumer can pin them before the release. The firmware source archive is named by its libkrunfw commit for that reason; the notes name the tag. The upstream base is checked with the other checks, before landing, and the third-party notices are generated alongside the builds.
martinothamar
force-pushed
the
ci/release-tag-on-publish
branch
from
October 25, 2026 13:55
7de216c to
3c263e2
Compare
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of digdir/digdir-agents#279.
What changes: the runtime is built once, in the pull request's checks, and landing that commit on
main-digdirpublishes exactly those files. Nobody runs a release workflow or pushes a tag by hand.How a release works today (
MAINTAINING-digdir.md, step 6)check-digdir.ymlbuilds the runtime with the CI profile (opt-level 1, no LTO) and runs the KVM integration and smoke tests against it.check-digdir.ymlonmain-digdiragain and wait for it to pass.release-digdir.ymlonmain-digdir, a dry run that builds the runtime again, this time with the release profile, and validates it.v<version>by hand. That startsrelease-digdir.ymla third time, which builds the runtime once more and publishes it.So a release builds the runtime three times, the published runtime is never the one the tests ran against, and a step 5 failure that needs a code fix spends the version.
How a release works after this PR
The pull request's checks build the runtime once, with the release profile, and run the KVM integration and smoke tests against those binaries. Then they assemble the release files: the bundles, libraries, guest agents, licenses, third-party notices, firmware source and
checksums.sha256. The run keeps them as an artifact namedrelease-<tree>, after the tree it built: for a pull request, its merge withmain-digdiras it was when the run started.pull_requestchecks, so start them withgh workflow run check-digdir.yml --ref sync/digdir-X.Y.Z, as today.main-digdirmoves before a pull request merges, rebase the pull request onto it and force-push, so that its checks build the tree that will land.Tag the libkrunfw commit, as today.
Land it. Which way depends on the change:
main-digdirto the approved sync branch:git push --force-with-lease=main-digdir:<old-tip> origin sync/digdir-X.Y.Z:main-digdir. Never use its PR's merge button, which would replay the rebuilt queue onto the oldmain-digdir. Oncemain-digdirpoints at the sync branch's head, GitHub marks the PR as merged by itself. Don't close or merge it.Either way,
release-digdir.ymlruns on the push. It releases only if theCargo.tomlversion has no release yet, which is true only for a version bump: the last commit of a synchronization (X.Y.Z-digdir.1), or a PR that bumps-digdir.<n>between synchronizations. For a version bump, it:v<version>A push whose version is already released publishes nothing.
What this gets us
main-digdir) and runrelease-digdir.ymlagain.Other changes:
msb. The new build job builds the shipped one and smoke-tests it.After merging:
gh workflow run check-digdir.yml --ref main-digdironce. The release builds use new caches, which only runs onmain-digdirsave, so until then pull requests build without them. The runbook's step 4 now says to do this after any cache key change.main-digdirruleset, so that a pull request can't merge before its release files exist.Evidence
e33b1fa8, the first run of the single build, passed in 37 minutes.7de216c2, the final design apart from later doc wording, passed in 36 minutes. The integration and smoke tests ran against the release-profile binaries. The notices job ran alongside the builds, so assembly took under a minute instead of 5. The run kept the release files asrelease-700a0e3e…, the PR's tree.release-digdir.ymlsees.0.7.8-digdir.2is already released, so that run should publish nothing.Risk
github-actions[bot].