Pass commit hash as COMMIT_HASH to ECS task definition#103
Merged
hannahscovill merged 5 commits intomainfrom Feb 7, 2026
Merged
Pass commit hash as COMMIT_HASH to ECS task definition#103hannahscovill merged 5 commits intomainfrom
hannahscovill merged 5 commits intomainfrom
Conversation
7ffe443 to
d3c5d67
Compare
Wire the 7-char git SHA through CDK context into the COMMIT_HASH env var on the ECS task so service.version in traces shows the deployed commit. Also clean up the deploy workflow: - Remove redundant meta step (use get-outputs + GITHUB_SHA instead) - Remove dead -c prerequisite=true flag - Remove commented-out job scaffolding - Remove orphaned ECR_REPOSITORY env var Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d3c5d67 to
8e295b3
Compare
Read COMMIT_HASH env var in GitHubIssueService and render it as "- Commit: `abc1234`" in the Environment section of created issues. This lets us correlate bug reports to the exact deployed version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The issue route already requires authentication, so user ID is always available from JWT claims. Make the type reflect that: &str instead of Option<&str>. Reporter section now always renders with at least the user ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add explicit guard for empty user ID in issue route handler. Update OpenAPI schema with userAgent/pageUrl fields and reporter/commit hash details in endpoint description. Update Bruno example request. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
-c commitHash=...) into theCOMMIT_HASHenv var on the ECS task definitionAPP_VERSION: 'latest'with the dynamic commit hash soservice.versionin OTEL traces reflects the actual deployed commit"dev"to"dev-0000000"— the 7 zeroes mirror the short SHA format, making it obvious in Grafana that a trace came from localTest plan
cdk synthwithout-c commitHash→COMMIT_HASH: dev-0000000(fallback)cdk synth -c commitHash=abc1234→COMMIT_HASH: abc1234(CI path)service.versionshows the commit hash in Grafana🤖 Generated with Claude Code