Skip to content

Conversation

@chromy
Copy link
Contributor

@chromy chromy commented Dec 16, 2025

No description provided.

@chromy chromy requested a review from a team as a code owner December 16, 2025 14:31
@chromy chromy requested a review from runningcode December 16, 2025 14:31
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 16, 2025
Copy link
Contributor

@runningcode runningcode left a comment

Choose a reason for hiding this comment

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

ah nice!

occurrence, event_data = diff_to_occurrence(project_id, "download", diff)
occurrence, event_data = diff_to_occurrence(
project_id, "download", diff, head_metric.preprod_artifact.artifact_type
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Nullable artifact_type may cause ValueError exception

The artifact_type field on PreprodArtifact is nullable (defined with null=True in the model), but platform_from_artifact_type raises ValueError when given None or an unknown type. Other parts of the codebase check artifact_type is not None before calling this function. If artifact_type is unexpectedly None, the exception will be caught silently and the issue won't be emitted. The previous hardcoded "other" platform value wouldn't have had this failure mode.

Additional Locations (1)

Fix in Cursor Fix in Web

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/preprod/size_analysis/tasks.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #105039   +/-   ##
========================================
  Coverage   80.58%    80.58%           
========================================
  Files        9405      9405           
  Lines      403218    403221    +3     
  Branches    25630     25630           
========================================
+ Hits       324948    324953    +5     
+ Misses      77821     77819    -2     
  Partials      449       449           

@chromy chromy merged commit 9f198fe into master Dec 16, 2025
68 checks passed
@chromy chromy deleted the chromy/2025-12-16-set-platform branch December 16, 2025 14:53
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants