Skip to content

Making git-reader return 206 for older expected than since values#1364

Open
alexcottner wants to merge 2 commits into
mainfrom
206-on-git-reader
Open

Making git-reader return 206 for older expected than since values#1364
alexcottner wants to merge 2 commits into
mainfrom
206-on-git-reader

Conversation

@alexcottner

@alexcottner alexcottner commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Git-reader should return a 206 instead of a 400 when clients request data with an older _expected value than the _since value.
This will mirror the existing v1 behavior, which is what clients are expecting.

Client-side code (link) in remote-settings.sys.mjs is expecting a 400 to mean the etag should be cleared so it can resync. But this is a behavior change from v1.

@alexcottner alexcottner requested a review from a team as a code owner June 17, 2026 14:25
@alexcottner alexcottner added the bug Something isn't working label Jun 17, 2026
@leplatrem

Copy link
Copy Markdown
Contributor

This will mirror the existing v1 behavior,

I can't recall the reason why we did use 206 in the first place. Wasn't it because of GCP caching limitation on 400?

This will mirror the existing v1 behavior

206 Partial Content seems like a hack. If we can stick with 400 I think it matches more what we want for a future-proof v2

which is what clients are expecting.

In what sense the client expects 206?

Couldn't we switch v1 to 400 instead?

If we really have no choice, then yeah let's do this :)

@alexcottner

Copy link
Copy Markdown
Contributor Author

Added a comment to the jira ticket (link) but the evidence seems pretty strong here.

image image

@alexcottner

alexcottner commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

I can't recall the reason why we did use 206 in the first place. Wasn't it because of GCP caching limitation on 400?

I think the GCP limitation was the big reason before. But I don't think we were returning 400 responses for long enough to encounter this secondary problem.

In what sense the client expects 206?

I think the main thing here is if we return a 206, the clients don't do anything and keep working with their current data. And will catch up on the next sync. But if we return a 400, the etag value is cleared and they could go backwards.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants