-
-
Notifications
You must be signed in to change notification settings - Fork 358
Closed
Labels
dependenciesupgrades to dependenciesupgrades to dependencieshelp wantedNot immediately prioritised, please help!Not immediately prioritised, please help!runtimecontroller runtime relatedcontroller runtime related
Milestone
Description
Failed CI in #1591 at kube-runtime with:
error[E0599]: no method named `replace_key` found for struct `hashbrown::hash_map::OccupiedEntry` in the current scope
--> kube-runtime/src/scheduler.rs:90:27
|
90 | old_entry.replace_key();
| ^^^^^^^^^^^ method not found in `OccupiedEntry<'_, T, ScheduledEntry>`
as a result of them reworking their Entry api: rust-lang/hashbrown#535
author there suggests the entry_ref api. looked at it for 1m and it didn't look immediately obvious so have left this issue here for now.
Need to update this usage here:
kube/kube-runtime/src/scheduler.rs
Lines 81 to 103 in 62f95cd
match self.scheduled.entry(request.message) { | |
// If new request is supposed to be earlier than the current entry's scheduled | |
// time (for eg: the new request is user triggered and the current entry is the | |
// reconciler's usual retry), then give priority to the new request. | |
Entry::Occupied(mut old_entry) if old_entry.get().run_at >= request.run_at => { | |
// Old entry will run after the new request, so replace it.. | |
let entry = old_entry.get_mut(); | |
self.queue.reset_at(&entry.queue_key, next_time); | |
entry.run_at = next_time; | |
old_entry.replace_key(); | |
} | |
Entry::Occupied(_old_entry) => { | |
// Old entry will run before the new request, so ignore the new request.. | |
} | |
Entry::Vacant(entry) => { | |
// No old entry, we're free to go! | |
let message = entry.key().clone(); | |
entry.insert(ScheduledEntry { | |
run_at: next_time, | |
queue_key: self.queue.insert_at(message, next_time), | |
}); | |
} | |
} |
which makes us able to use the same hashbrown version everywhere (and we can kill this instruction with wrong comment)
Metadata
Metadata
Assignees
Labels
dependenciesupgrades to dependenciesupgrades to dependencieshelp wantedNot immediately prioritised, please help!Not immediately prioritised, please help!runtimecontroller runtime relatedcontroller runtime related