Skip to content

Use 202 Accepted for SetOverrides and buffer GetOverrides response#7370

Open
friedrichg wants to merge 1 commit intomasterfrom
use-status-accepted
Open

Use 202 Accepted for SetOverrides and buffer GetOverrides response#7370
friedrichg wants to merge 1 commit intomasterfrom
use-status-accepted

Conversation

@friedrichg
Copy link
Copy Markdown
Member

What this PR does: SetOverrides writes to the object storage bucket like the ruler API, so it should return 202 Accepted to indicate the change has been stored Also buffer the GetOverrides JSON response so http.Error works correctly if encoding fails.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

SetOverrides writes to the object storage bucket like the ruler API,
so it should return 202 Accepted to indicate the change has been stored
Also buffer the GetOverrides JSON response so http.Error works correctly if encoding fails.

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg friedrichg force-pushed the use-status-accepted branch from b3990f7 to df9b749 Compare March 23, 2026 19:24
@SungJin1212
Copy link
Copy Markdown
Member

LGTM, the e2e tests also need to be changed to 202.

Copy link
Copy Markdown
Member

@CharlieTLe CharlieTLe left a comment

Choose a reason for hiding this comment

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

DeleteOverrides also writes to the bucket via deleteOverridesFromBucket but still returns 200 OK. The same async reasoning for using 202 Accepted applies here — should this be updated too?

Changing the SetOverrides status code from 200 to 202 is a user-facing API change — clients checking == 200 would need to update. Should this have a [CHANGE] entry in the CHANGELOG?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants