-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ResponseOps] add snoozing MVP implementation to alerting framework #127402
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolves elastic#126512 This PR fills in some of the missing pieces with the new rule snoozing functionality described in meta issue elastic#125804 The main bit is the calculation of whether a rule is "snoozed". Prior to this, we only had the `mute_all` boolean property, but now we also have a `snooze_end_time` Date | null property. Here's how they work: | | snooze_end_time: null | snooze_end_time: date | | ------------------- | ----------------------- | -------------------------- | | **mute_all: true** | rule is snoozed forever | invalid | | **mute_all: false** | rule is not snoozed | rule is snoozed till date | This is handled in the function `isRuleSnoozed()` in `x-pack/plugins/alerting/server/task_runner/task_runner.ts`
resolves elastic#126512 Changes the calculation of rule-level muting to take into account snoozeEndTime. If muteAll is true, the rule is considered snoozing forever, regardless of the setting of snoozeEndTime. If muteAll is false, snoozeEndTime determines whether the rule is snoozed. If snoozeEndTime is null, the rule is not snoozed. Otherwise, snoozeEndTime is a Date, and if it's >= than Date.now(), the rule is snoozed. Otherwise, the rule is not snoozed.
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Public APIs missing comments
Page load bundle
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
closing in favor of #127694 |
tylersmalley
added
ci:cloud-deploy
Create or update a Cloud deployment
and removed
ci:deploy-cloud
labels
Aug 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport:skip
This commit does not require backporting
ci:cloud-deploy
Create or update a Cloud deployment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
resolves #126512
This PR fills in some of the missing pieces with the new rule
snoozing functionality described in meta issue
#125804
The main bit is the calculation of whether a rule is "snoozed". Prior
to this, we only had the
mute_all
boolean property, but now we alsohave a
snooze_end_time
Date | null property. Here's how they work:This is handled in the function
isRuleSnoozed()
inx-pack/plugins/alerting/server/task_runner/task_runner.ts
Summarize your PR. If it involves visual changes include a screenshot or gif.
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers