Skip to content

feat(preprod): Add Git commit field #93651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2025
Merged

feat(preprod): Add Git commit field #93651

merged 2 commits into from
Jun 16, 2025

Conversation

trevor-e
Copy link
Member

@trevor-e trevor-e commented Jun 16, 2025

Adds a new commit column with a foreign key to the commits table. This will track which commit was used to build the PreprodArtifact uploaded to Sentry. Writing to this column will come later.

@trevor-e trevor-e requested a review from a team as a code owner June 16, 2025 20:23
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 16, 2025

This comment was marked as outdated.

@trevor-e trevor-e changed the title feat(preprod): Add Git SHA field feat(preprod): Add Git commit field Jun 16, 2025
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/preprod/migrations/0005_add_git_commit.py

for 0005_add_git_commit in preprod

--
-- Add field commit to preprodartifact
--
ALTER TABLE "sentry_preprodartifact" ADD COLUMN "commit_id" bigint NULL;
ALTER TABLE "sentry_preprodartifact" ADD CONSTRAINT "sentry_preprodartifact_commit_id_97171e7d_fk_sentry_commit_id" FOREIGN KEY ("commit_id") REFERENCES "sentry_commit" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_preprodartifact" VALIDATE CONSTRAINT "sentry_preprodartifact_commit_id_97171e7d_fk_sentry_commit_id";
CREATE INDEX CONCURRENTLY "sentry_preprodartifact_commit_id_97171e7d" ON "sentry_preprodartifact" ("commit_id");

Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #93651      +/-   ##
==========================================
+ Coverage   83.10%   88.02%   +4.91%     
==========================================
  Files       10326    10327       +1     
  Lines      595663   595673      +10     
  Branches    23137    23137              
==========================================
+ Hits       495050   524321   +29271     
+ Misses     100120    70859   -29261     
  Partials      493      493              

@trevor-e trevor-e merged commit 3d8d55c into master Jun 16, 2025
66 checks passed
@trevor-e trevor-e deleted the telkins/preprod-sha branch June 16, 2025 21:33
billyvg pushed a commit that referenced this pull request Jun 18, 2025
Adds a new `commit` column with a foreign key to the commits table. This
will track which commit was used to build the `PreprodArtifact` uploaded
to Sentry. Writing to this column will come later.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
Adds a new `commit` column with a foreign key to the commits table. This
will track which commit was used to build the `PreprodArtifact` uploaded
to Sentry. Writing to this column will come later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants