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

Update the scheduler message when preponing #1260

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Jul 20, 2023

Motivation

In practice this should update the reconciliation reason, fixing #1114. Obsoletes #1241.

Solution

hashbrown::HashMap lets us update the key, as long as the new value is still considered equivalent to the old one (in terms of both Eq and Hash). We can't update the version of the value stored in the DelayQueue, so instead we have to ensure that we resolve it via the HashMap.

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #1260 (c60f8cc) into main (db585dd) will increase coverage by 0.68%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1260      +/-   ##
==========================================
+ Coverage   72.60%   73.28%   +0.68%     
==========================================
  Files          72       75       +3     
  Lines        5899     6057     +158     
==========================================
+ Hits         4283     4439     +156     
- Misses       1616     1618       +2     
Impacted Files Coverage Δ
kube-runtime/src/scheduler.rs 97.38% <100.00%> (+0.43%) ⬆️

... and 19 files with indirect coverage changes

In practice this should update the reconciliation reason, fixing kube-rs#1114

Signed-off-by: Natalie Klestrup Röijezon <[email protected]>
Copy link
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.

nice easy solution hashbrown is already in dependency tree (via serde_json).
nice tests. minor nit in comments, but don't feel strongly about it.

kube-runtime/src/scheduler.rs Outdated Show resolved Hide resolved
kube-runtime/src/scheduler.rs Outdated Show resolved Hide resolved
@clux clux added the changelog-fix changelog fix category for prs label Jul 20, 2023
@clux clux added this to the 0.85.0 milestone Jul 20, 2023
Signed-off-by: Natalie Klestrup Röijezon <[email protected]>
@nightkr nightkr enabled auto-merge July 20, 2023 17:26
@clux clux disabled auto-merge July 20, 2023 17:43
@clux clux merged commit 20a6f2e into kube-rs:main Jul 20, 2023
@nightkr nightkr deleted the feature/scheduler-update-message branch July 20, 2023 17:44
@clux clux changed the title Update the scheduler message when preponing Update the scheduler message when preponing Jul 21, 2023
@clux clux added the runtime controller runtime related label Jul 21, 2023
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.

Reconciliation reason gets stuck as "reconciler requested retry" even if short-circuited
2 participants