kube-rs / kube

Rust Kubernetes client and controller runtime
https://kube.rs
Apache License 2.0
3.05k stars 318 forks source link

Upgrade to hashbrown 0.15.0 #1597

Closed clux closed 1 month ago

clux commented 1 month ago

Failed CI in https://github.com/kube-rs/kube/pull/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: https://github.com/rust-lang/hashbrown/pull/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: https://github.com/kube-rs/kube/blob/62f95cd9a8506b639e01e10af417fecb7b45e292/kube-runtime/src/scheduler.rs#L81-L103 which makes us able to use the same hashbrown version everywhere (and we can kill this instruction with wrong comment)

clux commented 1 month ago

pushing this until next minor. if anyone wants to give it a go in the mean time, feel free;

cargo upgrade -p hashbrown -i
$EDITOR kube-runtime/src/scheduler.rs

afaikr the affected scheduled hashmap is of type ObjectRef -> ScheduleRequest