Skip to content
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

Alerting: Set error annotation on EvaluationError regardless of underlying error type #61506

Merged
merged 1 commit into from Jan 13, 2023

Conversation

alexweav
Copy link
Contributor

What is this feature?

Previously we only set the error annotation on a state if the expr.Result's attached error is an expr.QueryError. This assumes that the expression engine always wraps its error types consistently. If it fails to do so, there is no Error annotation.

This PR makes it so we always set the Error annotation for all errors, regardless of its type. This appears to be a bug based on the comment, which intends to just add special fields from expr.QueryError like ref_id/datasource_uid

Which issue(s) does this PR fix?:

n/a

Special notes for your reviewer:

@alexweav alexweav merged commit b289b8a into main Jan 13, 2023
@alexweav alexweav deleted the alexweav/set-error-anno branch January 13, 2023 19:58
@grafanabot
Copy link
Contributor

The backport to v9.3.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-61506-to-v9.3.x origin/v9.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x b289b8ac6e84816ebdcd00b6d76b8cd60a7bc8e8
# Push it to GitHub
git push --set-upstream origin backport-61506-to-v9.3.x
git switch main
# Remove the local backport branch
git branch -D backport-61506-to-v9.3.x

Then, create a pull request where the base branch is v9.3.x and the compare/head branch is backport-61506-to-v9.3.x.

@grafanabot grafanabot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label Jan 13, 2023
alexweav added a commit that referenced this pull request Jan 13, 2023
…lying error type (#61506)

Set error annotation regardless of underlying error type

(cherry picked from commit b289b8a)
armandgrillet pushed a commit that referenced this pull request Jan 16, 2023
…lying error type (#61508)

* Alerting: Set error annotation on EvaluationError regardless of underlying error type (#61506)

Set error annotation regardless of underlying error type

(cherry picked from commit b289b8a)

* Also cherrypick the nilcheck that got added prior to 9.4
GuYounes pushed a commit to paul-wurth/BIXpert that referenced this pull request Feb 8, 2023
…lying error type (grafana#61508)

* Alerting: Set error annotation on EvaluationError regardless of underlying error type (grafana#61506)

Set error annotation regardless of underlying error type

(cherry picked from commit b289b8a)

* Also cherrypick the nilcheck that got added prior to 9.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/alerting/evaluation Issues when evaluating alerts area/alerting Grafana Alerting area/backend backport v9.3.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. enterprise-ok type/bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants