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: Fix MatcherFilter onChange handling #87511

Merged
merged 2 commits into from
May 10, 2024

Conversation

konrad147
Copy link
Contributor

What is this feature?
This PR fixes MatcherFilter component

debouce function delays the invocation of the inner function and the event parameter gets changed between the event occurrence and actually calling the function resulting in undefined error

Fixes #82044

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@konrad147 konrad147 added type/bug area/alerting Grafana Alerting area/frontend no-changelog Skip including change in changelog/release notes backport v11.0.x Mark PR for automatic backport to v11.0.x labels May 8, 2024
@konrad147 konrad147 added this to the 11.0.x milestone May 8, 2024
@konrad147 konrad147 self-assigned this May 8, 2024
@konrad147 konrad147 requested a review from a team as a code owner May 8, 2024 15:13
@konrad147 konrad147 requested review from gillesdemey, tomratcliffe and soniaAguilarPeiron and removed request for a team May 8, 2024 15:13
@grafana-delivery-bot grafana-delivery-bot bot modified the milestones: 11.0.x, 11.1.x May 8, 2024
Copy link
Contributor

This PR must be merged before a backport PR will be created.

1 similar comment
Copy link
Contributor

This PR must be merged before a backport PR will be created.

Copy link
Member

@soniaAguilarPeiron soniaAguilarPeiron left a comment

Choose a reason for hiding this comment

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

LGTM!

@konrad147 konrad147 merged commit c203a03 into main May 10, 2024
14 checks passed
@konrad147 konrad147 deleted the alerting/82044-labels-filter-input branch May 10, 2024 13:42
Copy link
Contributor

The backport to v11.0.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-87511-to-v11.0.x origin/v11.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x c203a030e8e6123b9abe5d580ea00a16aa81e0ba

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-87511-to-v11.0.x
# Create the PR body template
PR_BODY=$(gh pr view 87511 --json body --template 'Backport c203a030e8e6123b9abe5d580ea00a16aa81e0ba from #87511{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v11.0.x] Alerting: Fix MatcherFilter onChange handling" --body-file - --label "type/bug" --label "area/alerting" --label "area/frontend" --label "no-changelog" --label "backport" --base v11.0.x --milestone 11.0.x --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-87511-to-v11.0.x

# Create a pull request where the `base` branch is `v11.0.x` and the `compare`/`head` branch is `backport-87511-to-v11.0.x`.

# Remove the local backport branch
git switch main
git branch -D backport-87511-to-v11.0.x

@grafana-delivery-bot grafana-delivery-bot bot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label May 10, 2024
@konrad147 konrad147 added no-backport Skip backport of PR and removed backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. backport v11.0.x Mark PR for automatic backport to v11.0.x labels May 13, 2024
@konrad147
Copy link
Contributor Author

No backport needed. v11.0 is not affected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Grafana Alerting area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes type/bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Alert Rule: Search by Label results in an error in browser webconsole
3 participants