Skip to content

Add per-rule custom plugin intervals#1320

Merged
kubernetes-prow[bot] merged 3 commits into
kubernetes:masterfrom
DigitalVeer:per-rule-invoke-interval
Jul 22, 2026
Merged

Add per-rule custom plugin intervals#1320
kubernetes-prow[bot] merged 3 commits into
kubernetes:masterfrom
DigitalVeer:per-rule-invoke-interval

Conversation

@DigitalVeer

@DigitalVeer DigitalVeer commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Custom plugin rules can set an optional invoke interval and rules without this field will use the global invoke interval.
The scheduler groups rules with equal parsed durations.
Each group runs one synchronized batch for each tick.

Compatibility

The default schedule keeps one shared batch for all rules.
The scheduler creates all tickers before the combined boot batch.
Downstream result handling does not change.

Tests

This PR adds fake-clock tests for the scheduler.

The lifecycle bot closed prior attempts #357 and #358.

Custom plugin rules can set their own invoke intervals.

Group rules by their effective invoke interval.
Use the global interval when a rule omits its interval.
Reject non-positive invoke intervals before scheduler startup.
Test grouped cadence, concurrency, and shutdown behavior.
@kubernetes-prow
kubernetes-prow Bot requested review from mmiranda96 and sjenning July 20, 2026 21:09
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 20, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @DigitalVeer. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 20, 2026
State that rules with different intervals run on independent schedules.
State the concurrency limit and the catch-up behavior.
State the rule timeout validation limit.
@wangzhen127

Copy link
Copy Markdown
Member

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 21, 2026
Return a snapshot struct from the test execution recorder.
Move the apply-configuration test table into a helper function.

@hakman hakman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @DigitalVeer!

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 22, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DigitalVeer, hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 146a394 into kubernetes:master Jul 22, 2026
15 checks passed
@DigitalVeer
DigitalVeer deleted the per-rule-invoke-interval branch July 22, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants