Skip to content

fix(remote)[v3.8]: stop PRW1 receiver from emitting bad PRW2 response headers#17683

Merged
bwplotka merged 2 commits intorelease-3.8from
prw2fix-3.8.1
Dec 15, 2025
Merged

fix(remote)[v3.8]: stop PRW1 receiver from emitting bad PRW2 response headers#17683
bwplotka merged 2 commits intorelease-3.8from
prw2fix-3.8.1

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Dec 12, 2025

When adopting new client_golang remote lib for RW handler we made a bug where we don't provide a correct WriteResponseStats in the Store handler abstraction for PRW1. This caused remote write handler to send X-Prometheus-Remote-Write-Samples-Written 0 PRWv2 response headers claiming no samples were processed.

Prometheus RW sender part then interprets that as partial error, so emits scary error log and reports incorrect metrics. Sharding might have been impacted too as they depend on this data.

This affected many users #17659

Kudos to @kgeckhart who narrowed the root cause down #17659 (comment) ❤️

The fix for now is to NOT send response headers for PRWv1 flow, but the long term fix would be likely to change the client_golang remote lib Store API to be safer (explicit confirm).

This PR:

  • Adds regression test
  • Adds commentary on problematic interface
  • Bumps remoteapi to have fix which resolves the issue

cc @pipiland2612

Which issue(s) does the PR fix:

Fixes #17659

Does this PR introduce a user-facing change?

[BUGFIX] remote: fix Remote Write receiver, so it does not send wrong response headers for v1 flow. 

…tats

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka requested review from bboreham, jan--f and krajorama and removed request for cstyan and tomwilkie December 12, 2025 23:01
@bwplotka bwplotka changed the title fix(remote): stop PRW1 receiver from emitting bad PRW2 response headers fix(remote)[v3.8]: stop PRW1 receiver from emitting bad PRW2 response headers Dec 12, 2025
Copy link
Contributor

@pipiland2612 pipiland2612 left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

… headers

Signed-off-by: bwplotka <bwplotka@gmail.com>
Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM

@bwplotka
Copy link
Member Author

Ignoring OSS fuzzing failure due to #17693

@bwplotka bwplotka merged commit dbdb7de into release-3.8 Dec 15, 2025
80 of 95 checks passed
@bwplotka bwplotka deleted the prw2fix-3.8.1 branch December 15, 2025 15:22
This was referenced Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants