Skip to content

Clamp scheduling delay to 6 months#1779

Merged
nightkr merged 4 commits into
kube-rs:mainfrom
dervoeti:fix/clamp-rescheduling-delay
Jun 25, 2025
Merged

Clamp scheduling delay to 6 months#1779
nightkr merged 4 commits into
kube-rs:mainfrom
dervoeti:fix/clamp-rescheduling-delay

Conversation

@dervoeti
Copy link
Copy Markdown
Contributor

Motivation

Fixes #1772 (long durations cause panics in DelayQueue.html#method.insert_at and DelayQueue.html#method.reset_at).

Solution

Clamp the scheduling delay to a maximum of 6 months. This value is now also used as fallback if checked_add fails.

@dervoeti dervoeti force-pushed the fix/clamp-rescheduling-delay branch from 5c4be2e to 9f1261b Compare June 25, 2025 09:16
@clux clux added the changelog-fix changelog fix category for prs label Jun 25, 2025
Copy link
Copy Markdown
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

clean solution. thank you very much!

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.5%. Comparing base (acb5625) to head (dd00553).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1779     +/-   ##
=======================================
+ Coverage   76.5%   76.5%   +0.1%     
=======================================
  Files         84      84             
  Lines       7895    7896      +1     
=======================================
+ Hits        6034    6038      +4     
+ Misses      1861    1858      -3     
Files with missing lines Coverage Δ
kube-runtime/src/controller/mod.rs 30.2% <ø> (ø)
kube-runtime/src/scheduler.rs 96.1% <100.0%> (+1.4%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@nightkr nightkr left a comment

Choose a reason for hiding this comment

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

Implementation LGTM. Just a few comment nits.

Comment thread kube-runtime/src/controller/mod.rs Outdated
Comment thread kube-runtime/src/scheduler.rs Outdated
Comment thread kube-runtime/src/scheduler.rs Outdated
dervoeti and others added 3 commits June 25, 2025 11:59
Co-authored-by: Natalie Klestrup Röijezon <[email protected]>
Signed-off-by: Lukas Krug <[email protected]>
Co-authored-by: Natalie Klestrup Röijezon <[email protected]>
Signed-off-by: Lukas Krug <[email protected]>
@nightkr nightkr added the runtime controller runtime related label Jun 25, 2025
@nightkr nightkr merged commit 3366a61 into kube-rs:main Jun 25, 2025
17 checks passed
@clux clux added this to the 1.2.0 milestone Jun 25, 2025
@clux clux modified the milestones: 1.2.0, 2.0.0 Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-fix changelog fix category for prs runtime controller runtime related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controller scheduler crashes if Action::requeue delay is too far into the future

3 participants