-
Notifications
You must be signed in to change notification settings - Fork 850
PRW2: return 415 when prw2 is disabled #7238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PRW2: return 415 when prw2 is disabled #7238
Conversation
45e3122 to
01fa2c9
Compare
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
01fa2c9 to
dcbeb30
Compare
CHANGELOG.md
Outdated
| * [FEATURE] Distributor: Add a per-tenant flag `-distributor.enable-type-and-unit-labels` that enables adding `__unit__` and `__type__` labels for remote write v2 and OTLP requests. This is a breaking change; the `-distributor.otlp.enable-type-and-unit-labels` flag is now deprecated, operates as a no-op, and has been consolidated into this new flag. #7077 | ||
| * [FEATURE] Querier: Add experimental projection pushdown support in Parquet Queryable. #7152 | ||
| * [FEATURE] Ingester: Add experimental active series queried metric. #7173 | ||
| * [ENHANCEMENT] Distributor: If remote write v2 is disabled, explicitly return HTTP 415 (Unsupported Media Type) for Remote Write V2 requests instead of attempting to parse them as V1. #7238 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be bugfix?
pkg/util/push/push.go
Outdated
| handlePRW1() | ||
| case remote.WriteV2MessageType: | ||
| if !remoteWrite2Enabled { | ||
| http.Error(w, "Remote Write V2 is disabled", http.StatusUnsupportedMediaType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a better error message? Remote write v2 disabled seems not a good message and expose server side details.
https://github.com/prometheus/client_golang/blob/main/exp/api/remote/remote_api.go#L593
Can we follow similar error message here
|
@yeya24 |
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
13da9fb to
8e67879
Compare
yeya24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
Related Documentation No published documentation to review for changes on this repository. |
This PR changes push handler behavior.
If remote write v2 is disabled, explicitly return HTTP 415 (Unsupported Media Type) for Remote Write V2 requests instead of attempting to parse them as V1.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]