Repository navigation
Conversation
Replace four Integration.objects.filter(id=...).first() calls with get_or_none(). Each filters on the primary key, so at most one row matches, and this drops the implicit ORDER BY pk that .first() adds. Refs ISWF-3679
leeandher
added a commit
that referenced
this pull request
Nov 17, 2026
Master's #131321 replaced the per-file SeerRun lookup helpers in seer/autofix/pr_iteration (emit.py, missing_permissions.py, out_of_credits.py, pause.py) with a shared get_seer_run() in run_markers.py. Take master's side in all five conflicts, which drops the # noqa: S035 comments on the deleted lines. The PR stays comment-only. New S035 violations from master are not marked here: - run_markers.py get_seer_run() and four Supabase Integration lookups are handled in #131503. - .agents/skills/verify-sentry/scripts/sentry_dev.py is exempted in #130924. Refs ISWF-3679
…wf-3679-get-or-none-supabase
Address a new S035 violation that landed on master after the noqa PRs: #131321 added get_seer_run() in seer/autofix/pr_iteration/run_markers.py with an unordered SeerRun .first(). SeerRun.seer_run_state_id is unique but nullable, the case the noqa PRs leave for a person to check, so mark it instead of switching to get_or_none(). Refs ISWF-3679
leeandher
marked this pull request as ready for review
November 17, 2026 20:34
joseph-sentry
approved these changes
Nov 17, 2026
cvxluo
approved these changes
Nov 17, 2026
Member
Author
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.
AI Commentary
Addresses the S035 violations that landed on master after the earlier
get_or_none()and noqa PRs. Without this, these files would fail the new S035 lint rule (#130924) the next time someone edits them.src/sentry/integrations/supabase/client.py: fourIntegration.objects.filter(id=...).first()calls become.get_or_none(...), keeping the same filters. Each filters onid, the primary key, so at most one row can match. This drops the implicitORDER BY pkthat.first()adds. The same script used for the earlier swaps confirmed all four, and the Supabase tests pass.src/sentry/seer/autofix/pr_iteration/run_markers.py:get_seer_run(), added by feat(seer): Comment on the PR when the PR iteration setting skips feedback #131321, gets# noqa: S035.SeerRun.seer_run_state_idis unique but nullable, the case the noqa PRs leave for a person to check, so it isn't swapped here.The third new violation, in
.agents/skills/verify-sentry/scripts/sentry_dev.py, is handled in #130924, which exempts.agents/from S035.Refs ISWF-3679