Repository navigation
Conversation
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.
cipherstash-agent
left a comment
There was a problem hiding this comment.
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 newPROXY_IMAGEsection at lines 463–472. Say the build happens unlessPROXY_IMAGEis 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' }} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
| # 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}" |
There was a problem hiding this comment.
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}}' |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
| # 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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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
| uses: ./.github/workflows/smoke-test.yml | ||
| with: | ||
| version: ${{ needs.merge.outputs.version }} | ||
| secrets: inherit |
There was a problem hiding this comment.
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.
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:uptakes aPROXY_IMAGEvariable. When it is set, it pulls that image and tags it ascipherstash/proxy:latestinstead of building. Without it, nothing changes..github/workflows/smoke-test.yml(new): runsmise run test:integrationagainst a published image on PostgreSQL 14 to 17, printing the image digest first. It is called byrelease.ymland runs on pull requests that change it..github/workflows/release.yml: themergejob exposes the published version. A newSmoke test published imagejob runs after it, onreleaseevents only.tests/docker-compose.yml,DEVELOPMENT.md: documentPROXY_IMAGE.Verification
actionlintonsmoke-test.ymlandrelease.yml: no new findings. The only reports are the custom Blacksmith runner label, whichtest.ymluses too, and an existing shellcheck warning in themergejob.mise tasks info proxy:upparses the changed task.Smoke testrun is the real test: it runs the suite againstcipherstash/proxy:latest(3.1.1). TheTestworkflow covers the build-from-source path.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).Review notes
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.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.