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 for data source filter on cloud rules. #79327

Merged
merged 2 commits into from Dec 11, 2023

Conversation

soniaAguilarPeiron
Copy link
Member

@soniaAguilarPeiron soniaAguilarPeiron commented Dec 11, 2023

What is this feature?

This PR fix data source filter not working for cloud rules.
The bug was introduced by this PR

Who is this feature for?

All users.

Special notes for your reviewer:

After the fix:

fix-filter.mp4

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.

@soniaAguilarPeiron soniaAguilarPeiron added this to the 10.3.x milestone Dec 11, 2023
@soniaAguilarPeiron soniaAguilarPeiron self-assigned this Dec 11, 2023
@soniaAguilarPeiron soniaAguilarPeiron requested a review from a team as a code owner December 11, 2023 14:44
@soniaAguilarPeiron soniaAguilarPeiron requested review from gillesdemey, VikaCep and konrad147 and removed request for a team December 11, 2023 14:44
@soniaAguilarPeiron soniaAguilarPeiron added backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x labels Dec 11, 2023
@JohnnyQQQQ
Copy link
Member

I’m not working on the front end, but could we add a regression test to ensure we don't break this again in the future?

@soniaAguilarPeiron
Copy link
Member Author

I’m not working on the front end, but could we add a regression test to ensure we don't break this again in the future?

💯

Copy link
Contributor

@VikaCep VikaCep left a comment

Choose a reason for hiding this comment

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

LGTM! I agree it would be great to add a test for it :)

@soniaAguilarPeiron
Copy link
Member Author

test added @JohnnyQQQQ @VikaCep

@soniaAguilarPeiron soniaAguilarPeiron added backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x and removed backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x labels Dec 11, 2023
@soniaAguilarPeiron soniaAguilarPeiron changed the title Alerting: fix data source filter not working for cloud rules Alerting: Fix for data source filter on cloud rules. Dec 11, 2023
@soniaAguilarPeiron soniaAguilarPeiron added backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x and removed backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x labels Dec 11, 2023
@soniaAguilarPeiron soniaAguilarPeiron merged commit e6f2de5 into main Dec 11, 2023
32 checks passed
@soniaAguilarPeiron soniaAguilarPeiron deleted the alerting/fix-filtering branch December 11, 2023 16:14
Copy link
Contributor

The backport to v10.2.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-79327-to-v10.2.x origin/v10.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b

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-79327-to-v10.2.x
# Create the PR body template
PR_BODY=$(gh pr view 79327 --json body --template 'Backport e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b from #79327{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.2.x] Alerting: Fix for data source filter on cloud rules." --body-file - --label "type/bug" --label "area/alerting" --label "area/frontend" --label "add to changelog" --label "backport" --base v10.2.x --milestone 10.2.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-79327-to-v10.2.x

# Create a pull request where the `base` branch is `v10.2.x` and the `compare`/`head` branch is `backport-79327-to-v10.2.x`.

# Remove the local backport branch
git switch main
git branch -D backport-79327-to-v10.2.x

@soniaAguilarPeiron soniaAguilarPeiron restored the alerting/fix-filtering branch December 11, 2023 16:49
@soniaAguilarPeiron soniaAguilarPeiron added no-backport Skip backport of PR backport v9.2.x Mark PR for automatic backport to v9.2.x backport v10.2.x and removed backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x no-backport Skip backport of PR labels Dec 11, 2023
Copy link
Contributor

The backport to v9.2.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-79327-to-v9.2.x origin/v9.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b

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-79327-to-v9.2.x
# Create the PR body template
PR_BODY=$(gh pr view 79327 --json body --template 'Backport e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b from #79327{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v9.2.x] Alerting: Fix for data source filter on cloud rules." --body-file - --label "type/bug" --label "area/alerting" --label "area/frontend" --label "add to changelog" --label "no-backport" --label "backport" --base v9.2.x --milestone 9.2.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-79327-to-v9.2.x

# Create a pull request where the `base` branch is `v9.2.x` and the `compare`/`head` branch is `backport-79327-to-v9.2.x`.

# Remove the local backport branch
git switch main
git branch -D backport-79327-to-v9.2.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 Dec 11, 2023
Copy link
Contributor

The backport to v10.2.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-79327-to-v10.2.x origin/v10.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b

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-79327-to-v10.2.x
# Create the PR body template
PR_BODY=$(gh pr view 79327 --json body --template 'Backport e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b from #79327{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.2.x] Alerting: Fix for data source filter on cloud rules." --body-file - --label "type/bug" --label "area/alerting" --label "area/frontend" --label "add to changelog" --label "backport" --base v10.2.x --milestone 10.2.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-79327-to-v10.2.x

# Create a pull request where the `base` branch is `v10.2.x` and the `compare`/`head` branch is `backport-79327-to-v10.2.x`.

# Remove the local backport branch
git switch main
git branch -D backport-79327-to-v10.2.x

soniaAguilarPeiron added a commit that referenced this pull request Dec 11, 2023
* fix data source filter not worling for cloud rules

* Add test

(cherry picked from commit e6f2de5)
@soniaAguilarPeiron soniaAguilarPeiron added backport v9.4.x Mark PR for automatic backport to v9.4.x and removed backport v9.2.x Mark PR for automatic backport to v9.2.x labels Dec 11, 2023
Copy link
Contributor

The backport to v9.4.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-79327-to-v9.4.x origin/v9.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b

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-79327-to-v9.4.x
# Create the PR body template
PR_BODY=$(gh pr view 79327 --json body --template 'Backport e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b from #79327{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v9.4.x] Alerting: Fix for data source filter on cloud rules." --body-file - --label "type/bug" --label "area/alerting" --label "area/frontend" --label "add to changelog" --label "backport" --base v9.4.x --milestone 9.4.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-79327-to-v9.4.x

# Create a pull request where the `base` branch is `v9.4.x` and the `compare`/`head` branch is `backport-79327-to-v9.4.x`.

# Remove the local backport branch
git switch main
git branch -D backport-79327-to-v9.4.x

soniaAguilarPeiron added a commit that referenced this pull request Dec 11, 2023
* fix data source filter not worling for cloud rules

* Add test

(cherry picked from commit e6f2de5)
soniaAguilarPeiron added a commit that referenced this pull request Dec 11, 2023
* fix data source filter not worling for cloud rules

* Add test

(cherry picked from commit e6f2de5)
soniaAguilarPeiron added a commit that referenced this pull request Dec 11, 2023
… (#79350)

Alerting: Fix for data source filter on cloud rules. (#79327)

* fix data source filter not worling for cloud rules

* Add test

(cherry picked from commit e6f2de5)
soniaAguilarPeiron added a commit that referenced this pull request Dec 11, 2023
#79353)

Alerting: Fix for data source filter on cloud rules. (#79327)

* fix data source filter not worling for cloud rules

* Add test

(cherry picked from commit e6f2de5)
@gillesdemey gillesdemey deleted the alerting/fix-filtering branch December 11, 2023 21:35
Copy link
Contributor

The backport to v10.1.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-79327-to-v10.1.x origin/v10.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b

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-79327-to-v10.1.x
# Create the PR body template
PR_BODY=$(gh pr view 79327 --json body --template 'Backport e6f2de51a3e190832c8b2cd4fc4db2b7a2ee917b from #79327{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.1.x] Alerting: Fix for data source filter on cloud rules." --body-file - --label "type/bug" --label "area/alerting" --label "area/frontend" --label "add to changelog" --label "backport" --base v10.1.x --milestone 10.1.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-79327-to-v10.1.x

# Create a pull request where the `base` branch is `v10.1.x` and the `compare`/`head` branch is `backport-79327-to-v10.1.x`.

# Remove the local backport branch
git switch main
git branch -D backport-79327-to-v10.1.x

aangelisc pushed a commit that referenced this pull request Dec 21, 2023
… (#79350)

Alerting: Fix for data source filter on cloud rules. (#79327)

* fix data source filter not worling for cloud rules

* Add test

(cherry picked from commit e6f2de5)
(cherry picked from commit b1cb170)
@summerwollin summerwollin modified the milestones: 10.3.x, 10.3.0 Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/alerting Grafana Alerting area/frontend backport v9.4.x Mark PR for automatic backport to v9.4.x backport v10.2.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. type/bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants