Skip to content

fix(workflow): Fix type choices being a snapshot list of grouptype registry #116637

Merged
Christinarlong merged 3 commits into
masterfrom
crl/fix-static-list-type-choices
Jun 2, 2026
Merged

fix(workflow): Fix type choices being a snapshot list of grouptype registry #116637
Christinarlong merged 3 commits into
masterfrom
crl/fix-static-list-type-choices

Conversation

@Christinarlong

Copy link
Copy Markdown
Contributor

TYPE_CHOICES was getting populated at import time so GroupType import order changed or came after TYPE_CHOICES then they wouldn't get into the label which caused failing tests. This PR changes the populating of labels to just call get_type_choices directly and at runtime

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 1, 2026
@Christinarlong Christinarlong marked this pull request as ready for review June 1, 2026 22:20
@Christinarlong Christinarlong requested a review from a team as a code owner June 1, 2026 22:20
@Christinarlong Christinarlong requested a review from leeandher June 1, 2026 22:20
Comment thread src/sentry/rules/filters/issue_type.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e456a19. Configure here.

Comment thread src/sentry/rules/filters/issue_type.py Outdated
Comment thread src/sentry/rules/filters/issue_type.py

@leeandher leeandher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you! 🙏

choices=list(INCLUDE_CHOICES.items()), required=False, initial="true"
)
value = forms.ChoiceField(choices=list(TYPE_CHOICES.items()))
value = forms.ChoiceField(choices=get_type_choices)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TIL i didnt know you could pass a callable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

honestly did not know either until I was 3 stackoverflow threads deep lol

@Christinarlong Christinarlong merged commit 493aefc into master Jun 2, 2026
63 checks passed
@Christinarlong Christinarlong deleted the crl/fix-static-list-type-choices branch June 2, 2026 18:24
leeandher added a commit that referenced this pull request Jun 2, 2026
…rt (#116721)

Should be safe for CI now that
#116637 is merged.

Revert-revert of #116508
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