Skip to content

[Alerting v2] Lower MIN_SCHEDULE_INTERVAL from 1m to 5s#259836

Merged
darnautov merged 1 commit intoelastic:alerting_v2from
jasonrhodes:fix/min-schedule-interval-5s
Mar 26, 2026
Merged

[Alerting v2] Lower MIN_SCHEDULE_INTERVAL from 1m to 5s#259836
darnautov merged 1 commit intoelastic:alerting_v2from
jasonrhodes:fix/min-schedule-interval-5s

Conversation

@jasonrhodes
Copy link
Copy Markdown
Member

@jasonrhodes jasonrhodes commented Mar 26, 2026

Summary

Fixes a regression introduced by #258526, which added a MIN_SCHEDULE_INTERVAL = '1m' server-side validation on schedule.every. This broke the Scout episode_lifecycle tests that create rules with a 5s schedule interval — the API now rejects those requests, causing the "should track multiple groups independently" test (and others in the suite) to fail.

Fix: Lower MIN_SCHEDULE_INTERVAL from '1m' to '5s' in constants.ts. Update corresponding unit tests to reflect the new boundary.

Test removal: Removes one createRuleDataSchema test case ("rejects schedule.every below 1m via cross-unit (59s)") that was meant to validate cross-unit comparison but wasn't doing that for 1m so was an unnecessary test before and after these PR changes. (if the min value had been 2m, you could test failures at 1m and at 95s, and that's cross-unit testing ... but when the value is 1m and the lowest unit we allow is seconds, there's no cross-unit test possible).

A follow-up issue will be created to discuss whether 5s is the right long-term minimum or if this should be configurable per environment.

Test plan

  • rule_data_schema.test.ts — 95 tests pass
  • validation.test.ts — 48 tests pass

Made with Cursor

elastic#258526 introduced a 1m minimum for schedule.every which broke the
Scout episode_lifecycle tests that use a 5s interval. Lower the floor
to 5s so existing tests (and short-interval rules) remain valid.

Removes one redundant "cross-unit" test case that no longer applies at
the 5s boundary.

Made-with: Cursor
@jasonrhodes jasonrhodes requested a review from a team as a code owner March 26, 2026 17:01
@github-actions github-actions bot added the author:actionable-obs PRs authored by the actionable obs team label Mar 26, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Mar 26, 2026

Approvability

Verdict: Needs human review

This PR changes a configuration constant that controls minimum alerting schedule intervals (from 1 minute to 5 seconds), which is a runtime behavior change with potential performance implications. Additionally, all changed files are owned by @elastic/rna-project-team, not the PR author.

You can customize Macroscope's approvability policy. Learn more.

@darnautov darnautov merged commit 677065f into elastic:alerting_v2 Mar 26, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:actionable-obs PRs authored by the actionable obs team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants