Add cancelations to policy monitor dispatches#5111
Merged
michel-laterman merged 6 commits intoelastic:mainfrom Jul 10, 2025
Merged
Add cancelations to policy monitor dispatches#5111michel-laterman merged 6 commits intoelastic:mainfrom
michel-laterman merged 6 commits intoelastic:mainfrom
Conversation
Add support for canceling dispatching policies to agents. This occurs whenever a new policy is recieved by the policy monitor. This allows the monitor to stop sending revision N when N+1 is recieved.
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
Contributor
|
This pull request does not have a backport label. Could you fix it @michel-laterman? 🙏
|
michel-laterman
commented
Jul 7, 2025
Contributor
Author
|
buildkite run perf-tests |
michel-laterman
commented
Jul 7, 2025
Contributor
Author
|
buildkite run perf-tests |
blakerouse
reviewed
Jul 9, 2025
Contributor
blakerouse
left a comment
There was a problem hiding this comment.
Overall this looks good and is a nice improvement. See inline comment about checking the error type.
changelog/fragments/1751913009-Cancel-policy-dispatches-when-a-new-revision-arrives.yaml
Outdated
Show resolved
Hide resolved
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




What is the problem this PR solves?
Add support for canceling dispatching policies to agents. This occurs whenever a new policy is recieved by the policy monitor. This allows the monitor to stop sending revision N when N+1 is recieved.
How does this PR solve the problem?
Policy dispatches now occur in a goroutine. If a new doc is detected by the dispatch, the routine is canceled and another is launched.
Design Checklist
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog toolRelated issues