Skip to content

chore(preprod): Update status check parsing logic for build_configuration and platform name tweaks#106829

Merged
chromy merged 2 commits intomasterfrom
tweak-status-check-filter-names
Jan 23, 2026
Merged

chore(preprod): Update status check parsing logic for build_configuration and platform name tweaks#106829
chromy merged 2 commits intomasterfrom
tweak-status-check-filter-names

Conversation

@NicoHinderling
Copy link
Contributor

Required backend update to land if #106806 merges

@NicoHinderling NicoHinderling requested a review from a team as a code owner January 22, 2026 21:37
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 22, 2026
Comment on lines +61 to 71
"platform_name": ["platform_name"],
"git_head_ref": ["git_head_ref"],
"app_id": ["app_id"],
"build_configuration": ["build_configuration"],
"build_configuration_name": ["build_configuration_name"],
},
allowed_keys={
"platform",
"platform_name",
"git_head_ref",
"app_id",
"build_configuration",
"build_configuration_name",
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: The updated preprod_artifact_search_config expects new filter keys (platform_name), but existing saved rules use old keys (platform), causing them to fail parsing and never match.
Severity: HIGH

Suggested Fix

A data migration should be added to update all existing saved status check filter queries in project options. The migration should replace the old keys (platform, build_configuration) with the new keys (platform_name, build_configuration_name). Alternatively, the parsing logic could be updated to support both old and new keys for backward compatibility.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/sentry/preprod/vcs/status_checks/size/tasks.py#L55-L71

Potential issue: The change to `preprod_artifact_search_config` renames filter keys from
`platform` and `build_configuration` to `platform_name` and `build_configuration_name`.
However, existing status check rules stored in the database have filter queries using
the old keys, such as `platform:ios`. When `_rule_matches_artifact` attempts to parse
these old queries with the new config, it will raise an `InvalidSearchQuery` exception.
This exception is caught, and the function returns `False`, causing all existing status
check rules with filters to silently fail and never trigger, breaking existing user
configurations.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this feature hasn't been released yet, so no need to worry about backwards compatibility

@chromy chromy merged commit b7bfa27 into master Jan 23, 2026
70 checks passed
@chromy chromy deleted the tweak-status-check-filter-names branch January 23, 2026 13:24
JonasBa pushed a commit that referenced this pull request Jan 27, 2026
…tion and platform name tweaks (#106829)

Required backend update to land if
#106806 merges
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 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.

2 participants