Skip to content

Declare the RELEASE build arg and report it to Sentry - #862

Merged
f213 merged 2 commits into
masterfrom
release-build-arg
Nov 27, 2026
Merged

f213 merged 2 commits into
masterfrom
release-build-arg

Conversation

@f213

@f213 f213 commented Nov 27, 2026

Copy link
Copy Markdown
Member

The generated CI passes RELEASE=${{ github.sha }} to all three image builds, but the Dockerfile never declares ARG RELEASE, so Docker drops it (with a "build-arg not consumed" warning) and the container has no idea which commit it runs.

  • ARG RELEASE / ENV RELEASE=$RELEASE in the base stage.
  • sentry_sdk.init(release=…) — Sentry only auto-reads SENTRY_RELEASE, so without this errors still carry no release. Empty → None, Sentry's own fallback.

Validation. Image built from this template with --build-arg RELEASE=c5fc975abc: $RELEASE in the container and sentry_sdk.get_client().options["release"] are both c5fc975abc; built without the arg, release is None. ruff and mypy pass on the changed module. medical-backend has declared the arg the same way and tagged GlitchTip events with it for months (app/release.py, used for Sentry and outgoing User-Agents).

🤖 Generated with Claude Code

f213 and others added 2 commits November 27, 2026 12:28
CI passes RELEASE=<sha> to every image build, but the Dockerfile never
declared the ARG, so docker dropped it and nothing in the container knew
which commit it runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@f213
f213 merged commit 5111d66 into master Nov 27, 2026
3 checks passed
@f213
f213 deleted the release-build-arg branch November 27, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant