Skip to content

ci(release): smoke test the published image after each release - #540

Open
tobyhede wants to merge 2 commits into
mainfrom
test/released-image-smoke-test-main
Open

tobyhede wants to merge 2 commits into
mainfrom
test/released-image-smoke-test-main

Conversation

@tobyhede

@tobyhede tobyhede commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

After each release, the integration suite now runs against the Proxy image published to Docker Hub, not only against an image built from source. A broken published image (a bad build, packaging, or a missing file) shows up straight after the release instead of when a customer pulls it.

This is the main (3.x) version of #539, which made the same change on release/2.2.

Changes

  • mise.toml: proxy:up takes a PROXY_IMAGE variable. When it is set, it pulls that image and tags it as cipherstash/proxy:latest instead of building. Without it, nothing changes.
  • .github/workflows/smoke-test.yml (new): runs mise run test:integration against a published image on PostgreSQL 14 to 17, printing the image digest first. It is called by release.yml and runs on pull requests that change it.
  • .github/workflows/release.yml: the merge job exposes the published version. A new Smoke test published image job runs after it, on release events only.
  • tests/docker-compose.yml, DEVELOPMENT.md: document PROXY_IMAGE.

Verification

  • actionlint on smoke-test.yml and release.yml: no new findings. The only reports are the custom Blacksmith runner label, which test.yml uses too, and an existing shellcheck warning in the merge job.
  • mise tasks info proxy:up parses the changed task.
  • I didn't run the integration suite locally. This PR's Smoke test run is the real test: it runs the suite against cipherstash/proxy:latest (3.1.1). The Test workflow covers the build-from-source path.
  • On release/2.2, the same workflow passed against the published 2.2.7 image on all four PostgreSQL versions (PostgreSQL 15 after one rerun for a Python test timeout).
  • The release job itself is first exercised by the next 3.x release.

Review notes

  • The smoke test runs after the image is published, so it flags a bad release rather than blocking it.
  • The test clients come from the checked-out tag, so a release is tested with its own tests.
  • Unlike test.yml, the workflow has no Slack notification step, because that action only notifies for runs on main, and release runs are on a tag.
  • The PR trigger tests latest, which is the newest 3.x release, not this branch's code.

Acknowledgment

By submitting this pull request, I confirm that CipherStash can use, modify, copy, and redistribute this contribution, under the terms of CipherStash's choice.

The integration suite only ever ran against a Proxy image built from
source, so nothing checked the image customers actually pull from Docker
Hub after a release.

`mise run proxy:up` now takes a PROXY_IMAGE variable. When it is set,
proxy:up pulls that image and tags it as cipherstash/proxy:latest, the
image tests/docker-compose.yml runs, instead of building from source.

A new Smoke test workflow runs the integration suite against a published
image on PostgreSQL 14 to 17. release.yml calls it after the merge job
publishes a release's multi-platform image, passing the released
version. A pull request that changes the workflow runs it against
`latest`.

Ported from the release/2.2 change.
@tobyhede
tobyhede marked this pull request as ready for review December 4, 2026 06:33

@cipherstash-agent cipherstash-agent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review attestation

Reviewed 54abbe4 · posted from Claude Code · claude-opus-5-5
Sources: code-review (medium) · claude-opus-5-5; mattpocock-skills:code-review · claude-opus-5-5; company-skills:rust-security · claude-opus-5-5
Skills: code-review, mattpocock-skills:code-review, company-skills:rust-security, company-skills:review-cross-check

Each finding was checked against 54abbe4 before posting. One claim was dropped: a 2.x release cannot move latest, because the 2.2.x release.yml sets latest=false.

Findings (10): 3 major, 7 minor. 9 inline, 1 below.

  • DEVELOPMENT.md:383, DEVELOPMENT.md:559 (outside diff) major These lines still say Proxy must always be built from source for testing, which contradicts the new PROXY_IMAGE section at lines 463–472. Say the build happens unless PROXY_IMAGE is set, and link to the new section.

    Source: mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

pg_version: [14, 15, 16, 17] # PG 18 not currently supported
env:
PG_VERSION: ${{ matrix.pg_version }}
PROXY_IMAGE: cipherstash/proxy:${{ inputs.version || 'latest' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major On pull_request, this runs the PR's own integration tests against the released latest, so it fails as soon as main has a test for behaviour that is not yet released. That already happened between v3.1.0 and v3.1.1: log_redaction.rs expected a startup warning that 3.1.0 does not emit. On pull_request, check out the latest release's tag (actions/checkout with ref: v<version>), or test cipherstash/proxy:main.

Sources: code-review, mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

run: |
mise run --output prefix test:integration

- name: Show proxy logs on failure

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major A failed smoke test alerts nobody. The image is already published by then, and the only signal is a red job in the release run. Copying send-slack-notification from test.yml would not help, because that action is gated on github.ref == 'refs/heads/main' and a release run's ref is refs/tags/vX.Y.Z. Add a Slack step with if: failure() and no ref gate.

Sources: code-review, mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

Comment thread mise.toml Outdated
# Test a published image instead of building from source.
# tests/docker-compose.yml never pulls, so tag the image as the one it runs.
echo "Using published image: ${PROXY_IMAGE}"
docker pull --quiet "${PROXY_IMAGE}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor With PROXY_IMAGE set, every proxy:up call pulls the image again. That is 9 calls from test:integration plus the workflow's own pull, 10 per job and 40 per release, all anonymous. Any one Docker Hub error (toomanyrequests, a 5xx) fails a good release under set -e. Pull only when the image is missing: docker image inspect "${PROXY_IMAGE}" >/dev/null 2>&1 || docker pull --quiet "${PROXY_IMAGE}".

Source: code-review · claude-opus-5-5


Generated by Claude Code

- name: Show the image under test
run: |
docker pull --quiet "${PROXY_IMAGE}"
docker image inspect "${PROXY_IMAGE}" --format '{{index .RepoDigests 0}} {{.Created}}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor The digest printed here comes from the first pull only. Every later proxy:up resolves the mutable tag again, so if latest moves during a pull-request run, later steps test a different image under the printed digest. Resolve the tag to its digest once and export it, for example echo "PROXY_IMAGE=$(docker image inspect "$PROXY_IMAGE" --format '{{index .RepoDigests 0}}')" >> "$GITHUB_ENV".

Source: code-review · claude-opus-5-5


Generated by Claude Code

jobs:
smoke-test:
name: Smoke test cipherstash/proxy:${{ inputs.version || 'latest' }} (PostgreSQL ${{ matrix.pg_version }})
runs-on: blacksmith-16vcpu-ubuntu-2204

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Only the amd64 image is smoke tested: this runner is x86_64, and both pulls omit --platform. The arm64 image that release.yml:42 publishes is never run, so an arm64-only packaging fault ships green. Add an architecture axis to the matrix, using blacksmith-16vcpu-ubuntu-2404-arm (already used by merge) with linux/arm64.

Sources: code-review, mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

Comment thread mise.toml
# tests/docker-compose.yml never pulls, so tag the image as the one it runs.
echo "Using published image: ${PROXY_IMAGE}"
docker pull --quiet "${PROXY_IMAGE}"
docker tag "${PROXY_IMAGE}" cipherstash/proxy:latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor This leaves the published image tagged as the local cipherstash/proxy:latest after the run. A later POOLERS_SKIP_BUILD=1 mise run test:poolers, or the manual release:docker task, then uses or pushes it as if it were a source build. Tag a dedicated name and parameterise the compose image:, or remove the tag in proxy:down.

Sources: code-review, mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

branches:
- main
paths:
- '.github/workflows/smoke-test.yml'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor The path filter lists only this file. A change to the PROXY_IMAGE branch in mise.toml or to the image and pull_policy coupling in tests/docker-compose.yml never runs this path before the next release. Add mise.toml and tests/docker-compose.yml, after fixing the latest mismatch at line 32, or this trigger will fail more often.

Sources: code-review, mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

@@ -0,0 +1,69 @@
name: Smoke test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor This workflow sets no permissions:, so the job runs a pulled image and the test code with the default-scope GITHUB_TOKEN, which actions/checkout keeps in .git/config. The job only needs permissions: contents: read, and a called workflow may narrow the token.

Source: company-skills:rust-security · claude-opus-5-5


Generated by Claude Code

Comment thread .github/workflows/release.yml Outdated
uses: ./.github/workflows/smoke-test.yml
with:
version: ${{ needs.merge.outputs.version }}
secrets: inherit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor secrets: inherit passes every repository and organisation secret, but smoke-test.yml reads only the four CS_VAULT_* values. Declare them under on.workflow_call.secrets and map them explicitly here.

Source: company-skills:rust-security · claude-opus-5-5


Generated by Claude Code

Address review feedback on the release smoke test:

- Notify Slack when the smoke test fails on a release. The image is
  already published by then, and the shared notification action only
  fires on main, so a failure would otherwise alert nobody.
- Pull the published image only when it is missing. test:integration
  calls proxy:up many times, and each extra Docker Hub pull was another
  chance for a rate limit to fail a good release.
- Limit the token to contents: read and pass the five secrets the
  workflow uses instead of inheriting every secret.
- Update the two DEVELOPMENT.md passages that still said Proxy is always
  built from source for tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants