Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/startup-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
#
# Not a release gate. Wiring it into consumers or promotion is a separate
# maintainer decision (#1021, #1022).
#
# Pull request runs boot the digest pinned in image-versions.yml, which the v1
# gate also boots. Renovate bumps that pin in a pull request, and this lane is
# what proves the new image still installs and boots (#1123). A manual run
# boots the image given as input.

name: Startup Qualification

Expand All @@ -46,6 +51,7 @@ on:
- scripts/startup_lane.py
- scripts/startup_lane_collect.sh
- startup_service_inventory.yaml
- image-versions.yml

permissions:
contents: read
Expand All @@ -65,7 +71,7 @@ jobs:
control: ${{ fromJSON(inputs.negative_control == 'skip' && '["candidate"]' || '["candidate","broken"]') }}

env:
IMAGE: ${{ inputs.image || 'ghcr.io/projectbluefin/dakota:testing' }}
IMAGE_INPUT: ${{ inputs.image }}
PROFILE: ${{ inputs.profile || 'dakota' }}
CONTROL: ${{ matrix.control }}
SSH_COMMON: "-i /tmp/vm_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ControlMaster=auto -o ControlPersist=600 -o ControlPath=/tmp/ssh-ctrl-%C -o ConnectTimeout=3"
Expand All @@ -74,6 +80,20 @@ jobs:
- name: Checkout testsuite
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Choose the image
run: |
set -euo pipefail
if [[ -n "${IMAGE_INPUT}" ]]; then
IMAGE="${IMAGE_INPUT}"
else
PIN_IMAGE=$(awk '$1 == "image:" { print $2 }' image-versions.yml)
PIN_TAG=$(awk '$1 == "tag:" { print $2 }' image-versions.yml)
PIN_DIGEST=$(awk '$1 == "digest:" { print $2 }' image-versions.yml)
IMAGE="${PIN_IMAGE}:${PIN_TAG}@${PIN_DIGEST}"
fi
echo "IMAGE=${IMAGE}" >> "$GITHUB_ENV"
echo "Image under test: ${IMAGE}"

- name: Plan required units
run: |
python3 -c 'import yaml' 2>/dev/null || sudo apt-get install -y python3-yaml
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/update-v1-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ concurrency:
cancel-in-progress: true

env:
# Image the gate boots. Resolved to a digest at plan time so the run records
# exactly what it tested. Override with the V1_GATE_IMAGE repository variable.
# dakota:testing is what Dakota publishes now; dakota:latest stopped in June.
GATE_IMAGE: ${{ vars.V1_GATE_IMAGE || 'ghcr.io/projectbluefin/dakota:testing' }}
# Image the gate boots: image-versions.yml, pinned by digest and bumped by
# Renovate through a pull request, so a Dakota build that cannot be
# installed fails that pull request instead of holding v1 (#1123). The
# V1_GATE_IMAGE repository variable overrides it in an emergency; a tag
# without a digest is resolved at plan time so the run records what it tested.
GATE_IMAGE: ${{ vars.V1_GATE_IMAGE }}

jobs:
plan:
Expand Down Expand Up @@ -135,10 +137,24 @@ jobs:
if: steps.plan.outputs.action == 'gate'
run: |
set -euo pipefail
NAME="${GATE_IMAGE%@*}"
if [[ -n "${GATE_IMAGE}" ]]; then
REF="${GATE_IMAGE}"
SOURCE="repository variable V1_GATE_IMAGE"
else
PIN_IMAGE=$(awk '$1 == "image:" { print $2 }' image-versions.yml)
PIN_TAG=$(awk '$1 == "tag:" { print $2 }' image-versions.yml)
PIN_DIGEST=$(awk '$1 == "digest:" { print $2 }' image-versions.yml)
REF="${PIN_IMAGE}:${PIN_TAG}@${PIN_DIGEST}"
SOURCE="image-versions.yml"
fi
NAME="${REF%@*}"
LAST="${NAME##*/}"
if [[ "${LAST}" == *:* ]]; then REPO="${NAME%:*}"; else REPO="${NAME}"; NAME="${NAME}:latest"; fi
DIGEST=$(skopeo inspect --format '{{.Digest}}' "docker://${NAME}")
if [[ "${REF}" == *@sha256:* ]]; then
DIGEST="${REF##*@}"
else
DIGEST=$(skopeo inspect --format '{{.Digest}}' "docker://${NAME}")
fi
case "${DIGEST}" in
sha256:*) ;;
*) echo "::error::Could not resolve a digest for ${NAME}"; exit 1 ;;
Expand All @@ -149,7 +165,7 @@ jobs:
echo "image=${NAME}@${DIGEST}"
echo "baseline_image=${REPO}@${DIGEST}"
} >> "$GITHUB_OUTPUT"
echo "Gate image: \`${NAME}@${DIGEST}\`" >> "$GITHUB_STEP_SUMMARY"
echo "Gate image: \`${NAME}@${DIGEST}\` (from ${SOURCE})" >> "$GITHUB_STEP_SUMMARY"

gate:
name: Boot merged tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ entry uses it.
"Nothing to do" and exited 0. `bluefin:stable` is a frozen build of the
archived projectbluefin/bluefin repository (2026-09-17), so the lane now
defaults to `ghcr.io/projectbluefin/dakota:testing` with the `dakota`
profile.
profile. Since #1123, pull request runs boot the digest pinned in
`image-versions.yml` rather than the moving tag, and a pull request that
bumps that pin runs this lane; manual runs boot the `image` input.
- The `dakota` profile requires only what the dakota build is known to
enable: `flatpak-preinstall.service` and `NetworkManager-wait-online.service`.
The lane now reports `brew-setup.service`, `firewalld.service`,
Expand Down
8 changes: 6 additions & 2 deletions docs/skills/ci-ops/ops/references/candidate-vm-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ and `.../check-runs`.
2. Turns the plan into an action with `scripts/v1_gate.py`:
- `move`: nothing reaches a VM (docs, unit tests, repo tooling).
- `gate`: boot the planned suites through `e2e.yml` at the merged SHA,
on `GATE_IMAGE` pinned by digest (repository variable `V1_GATE_IMAGE`,
default `ghcr.io/projectbluefin/dakota:testing`). `v1` moves if the
on the Dakota digest pinned in `image-versions.yml` (the repository
variable `V1_GATE_IMAGE` overrides it in an emergency; a tag without a
digest there is resolved at plan time). Renovate bumps the pin in a pull
request, and that pull request's `startup` checks prove the new image
installs and boots, so a Dakota build that cannot be installed fails one
pull request instead of holding `v1` (#1123). `v1` moves if the
call succeeds, which includes the #1022 `assert_passed.py` verdict.
If it fails, the same suites boot again with the tests at the current
`v1` on the same digest (the baseline), and
Expand Down
9 changes: 9 additions & 0 deletions image-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dakota image that the v1 gate (update-v1-tag.yml) and the startup lane's PR
# checks (startup-qualification.yml) boot. Pinned by digest so a Dakota build
# that cannot be installed fails one pull request instead of every gate run
# (#1123). Renovate opens a pull request when :testing moves; its startup
# checks show whether the new image installs and boots before anything else
# uses it.
image: ghcr.io/projectbluefin/dakota
tag: testing
digest: sha256:c10a8b189c34e53cf213f4b03342ac89c322b7e6a4eb0eb19012c6a59d7e4378
3 changes: 3 additions & 0 deletions scripts/vm_validation_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
("LICENSE", ()),
("renovate.json", ()),
("codecov.yml", ()),
# The gate image pin changes no test: the bump PR's startup checks prove
# the new image installs and boots (#1123).
("image-versions.yml", ()),
("Justfile", ()),
("plans/*", ()),
(".github/workflows/pr-validate.yml", ()),
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_vm_validation_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"tests/unit/test_image_slug.py",
"dashboard/index.html",
"Justfile",
"image-versions.yml",
".github/workflows/unit-tests.yml",
".github/workflows/update-v1-tag.yml",
"scripts/validate_docs.py",
Expand Down
Loading