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 removing reducer when inital value is instant #97054

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

soniaAguilarPeiron
Copy link
Member

What is this feature?

This PR initialize the alert rule form when creating a new alert rule with the right removal of reduce expression done when using instant query in Prometheus or Loki data source.

We were removing the reduce expression once user updates something in the editor.

Why do we need this feature?

This removal should be done from the initial render of the form.

Who is this feature for?

All users.

Which issue(s) does this PR fix?:

Fixes #

see problem: https://raintank-corp.slack.com/archives/C01LJ5F8NRX/p1732625698749139

Special notes for your reviewer:

After the fix and clicking new alert rule from the list view:

removeok.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
Copy link
Member Author

/deploy-to-hg

@ephemeral-instances-bot
Copy link

  • Preparing your instance. A comment containing your instance's url will be added to this PR when the instance is ready.
  • Your instance will be ready in ~10 minutes. Follow the workflow progress
  • Slack channel: #proj-ephemeral-hg-instances
  • Building instance with alerting/fix-removing-reducer oss branch and main enterprise branch. How to choose a branch

@ephemeral-instances-bot
Copy link

Error building instance: Contact #proj-ephemeral-hg-instances if it is not a compile error. Logs

@soniaAguilarPeiron
Copy link
Member Author

/deploy-to-hg

@ephemeral-instances-bot
Copy link

  • Preparing your instance. A comment containing your instance's url will be added to this PR when the instance is ready.
  • Your instance will be ready in ~10 minutes. Follow the workflow progress
  • Slack channel: #proj-ephemeral-hg-instances
  • Building instance with alerting/fix-removing-reducer oss branch and main enterprise branch. How to choose a branch

@ephemeral-instances-bot
Copy link

Error building instance: Contact #proj-ephemeral-hg-instances if it is not a compile error. Logs

@soniaAguilarPeiron
Copy link
Member Author

/deploy-to-hg

@ephemeral-instances-bot
Copy link

  • Preparing your instance. A comment containing your instance's url will be added to this PR when the instance is ready.
  • Your instance will be ready in ~10 minutes. Follow the workflow progress
  • Slack channel: #proj-ephemeral-hg-instances
  • Building instance with alerting/fix-removing-reducer oss branch and main enterprise branch. How to choose a branch

@ephemeral-instances-bot
Copy link

Copy link
Contributor

@konrad147 konrad147 left a comment

Choose a reason for hiding this comment

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

LGTM!

@soniaAguilarPeiron soniaAguilarPeiron merged commit 2e14c20 into main Nov 27, 2024
13 checks passed
@soniaAguilarPeiron soniaAguilarPeiron deleted the alerting/fix-removing-reducer branch November 27, 2024 14:59
gelicia pushed a commit that referenced this pull request Dec 4, 2024
* Fix removing reducer when inital value is instant

* use ID to allow clicking label to toggle the switch

---------

Co-authored-by: Gilles De Mey <[email protected]>
@zserge zserge modified the milestones: 11.4.x, 11.4.1, 11.4.0 Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants