-
Notifications
You must be signed in to change notification settings - Fork 831
Return first validation error on sample ingestion #2383
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
Conversation
This commit changes which error we return on validation back to the clients (Prometheus or Distributors). The samples that do not pass validation at distributors and/or ingesters now return the first validation error as opposed to the last. Signed-off-by: gotjosh <josue@grafana.com>
@@ -357,7 +357,7 @@ func (i *Ingester) Push(ctx context.Context, req *client.WriteRequest) (*client. | |||
return nil, fmt.Errorf("no user id") | |||
} | |||
|
|||
var lastPartialErr *validationError |
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.
TSDB blocks ingester already does this.
Signed-off-by: gotjosh <josue@grafana.com>
Signed-off-by: gotjosh <josue@grafana.com>
Hi everyone 👋, A question and a statement from me.
|
Yes, please. To me there's no strong need to do it within this PR. You can take a bit more time and work on a overall improvement of the "Cortex API" doc which include mentioning this behaviour. |
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.
I agree on this change and thanks for testing it. Much appreciated!
What this PR does:
This commit changes which error we return on validation back to the
clients (Prometheus or Distributors).
The samples that do not pass validation at distributors and/or ingesters
now return the first validation error as opposed to the last.
Which issue(s) this PR fixes:
Abstract from a conversation in #2336
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]