Repository navigation
feat(seer): Support conditional requests on the autofix state endpoint - #121885
Merged
alexsohn1126 merged 8 commits intoAug 26, 2026
Merged
alexsohn1126 merged 8 commits into
alexsohn1126 merged 8 commits into
Conversation
The autofix drawer polls this endpoint continuously, and each response is about 161 kB. Add ETag/If-None-Match so a poll that finds no change costs a 304 instead of the full payload. Adds a reusable ConditionalGetResponseMixin, gated per endpoint by an option so it can be turned off without a deploy. Refs CW-1738.
alexsohn1126
force-pushed
the
alexsohn/cw-1738-conditional-requests-for-autofix-feedback-queue-polling
branch
from
August 12, 2026 20:41
98e1340 to
408d38a
Compare
Repository.name is not unique per organization, and the filter spans two GitHub providers, so same-name rows had no defined order. The last row won the dict entry, which made the response body differ between web pods.
Some CDNs do not treat "no-cache" as equal to "max-age=0, must-revalidate", per the note on NO_CACHE in sentry/web/constants.py.
This reverts commit e481127. The CDN caveat behind that change applies to publicly cacheable responses. This response is private, so a shared cache must not store it either way, and the two forms are equivalent here.
Every endpoint that inherits the mixin now shares api.conditional_get.enabled. The per-endpoint attribute allowed a separate option for each endpoint, which no endpoint needs.
Sum api.conditional_get.body_bytes over result:hit for the bytes a 304 saved, and over result:miss for the bytes still sent.
These tests mock the run state and never query Snuba.
joseph-sentry
approved these changes
Aug 24, 2026
alexsohn1126
deleted the
alexsohn/cw-1738-conditional-requests-for-autofix-feedback-queue-polling
branch
August 26, 2026 19:25
3 tasks
This was referenced Oct 26, 2026
This branch was successfully deployed
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.
The autofix drawer polls
GET /issues/{id}/autofix/continuously and each response is ~161 kB, so an open tab burns through a lot of bandwidth.Using If-None-Match header, we will use the cache if the hash of the payload has not changed.
Example:
It is gated by
api.conditional_get.enabledoption, to disable/enable this caching behaviour.let's also use metrics (temporarily) to track how much data we are saving by doing this
the best solution would be to stop polling altogether but this is a stopgap while the poll-less version gets implemented
Refs CW-1738.