You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Label Selector helper wrappers is something I've kind of wanted for a while myself. Personally I am not sure about a mutably borrowable string here, because that feels equally error-prone.
imo it sounds reasonable to override the field completely in a builder pattern, since that would be the case for other non-collection fields as well. Maybe you want a .label(k, v)?
clux
linked a pull request
May 1, 2024
that will
close
this issue
Would you like to work on this feature?
yes
What problem are you trying to solve?
If I run:
I'd expect:
labels: Some("a=1, b=2")
but I'm getting:
labels: Some("b=2")
That's because
ListParams::labels
overrides previously set values, which IMO is unexpected behavior in a Builder Pattern.Describe the solution you'd like
Same would apply to
ListParams::fields
andWatchList::{lables,fields}
.This has a caveat of being a "silent" Breaking Change, as the behavior will change, but the API will stay the same.
Describe alternatives you've considered
Introducing a new method which allows chaining, under a different name.
More-or-less a pseudocode:
Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-core
The text was updated successfully, but these errors were encountered: