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

Ruler shutdown behaviour improvements #8346

Merged
merged 8 commits into from
Jul 8, 2024
Merged

Ruler shutdown behaviour improvements #8346

merged 8 commits into from
Jul 8, 2024

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Jun 12, 2024

What this PR does

This PR improves the behaviour of rulers while shutting down.

In particular:

  • Rulers will no longer log msg="error starting notifier discovery manager" err="context canceled" when they shut down cleanly

  • Rulers will stop their notifiers after stopping rule evaluation, to allow for the notifier to send notifications from rules that are still evaluating when a ruler is asked to stop

  • If -ruler.drain-notification-queue-on-shutdown=true, then rulers will now also drain their notification queues when shutting down, rather than dropping any inflight notifications. Once we've tested this further at Grafana Labs, I'll make this the default, but for now, I've left this disabled by default.

Which issue(s) this PR fixes or relates to

(none)

Checklist

  • Tests updated.
  • [n/a] Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • [n/a] about-versioning.md updated with experimental features.

@charleskorn charleskorn marked this pull request as ready for review July 5, 2024 09:49
@charleskorn charleskorn requested review from a team and tacole02 as code owners July 5, 2024 09:49
@charleskorn charleskorn requested a review from pracucci July 5, 2024 09:49
Copy link
Contributor

@tacole02 tacole02 left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Nice work, LGTM! Let's see if the usage of sleep in the test makes it flaky or not. We can always get back to it later.

@charleskorn charleskorn merged commit 43140f8 into main Jul 8, 2024
29 checks passed
@charleskorn charleskorn deleted the charleskorn/ruler branch July 8, 2024 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants