-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Make VersionMatch
follow upstream + configure list semantics in watcher::Config
#1171
Conversation
Effectively makes the `VersionMatch` an exact duplicate of the upstream, and adds some builders here and there to compensate for the missing `Any`. Have changed the watcher interface and made a new enum that maps onto `VersionMatch` instead, because it does not make sense to run a watcher against a pinned resource version; it will always use 0. (at least unless/until we build pagination into it). We could keep the enum that wraps resource version, but this is awkward; it would be the only one that bundles resourceVersion that way; - watch api calls get it as a str (outside watchparams) - get api calls (in a follow-up pr) will also not use the enum so altogether we are just making it awkward for ourselves by trying to make it nice :( Signed-off-by: clux <[email protected]>
VersionMatch
follow upstream + decouple enum from watcher
VersionMatch
follow upstream + new semantic interface watcher::Config
I'd argue that slow is a vastly better default than incorrect. If shit's slow then you can always profile and fix that afterwards. If shit's broken then, well, it has probably been broken for a long time already by the time that you discover the problem. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1171 +/- ##
=======================================
Coverage ? 72.75%
=======================================
Files ? 67
Lines ? 5201
Branches ? 0
=======================================
Hits ? 3784
Misses ? 1417
Partials ? 0
|
It's not really about it being incorrect (as it will eventually be correct), but i guess that's how it will be perceived. Ok, will leave the Are you OK with the default |
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
VersionMatch
follow upstream + new semantic interface watcher::Config
VersionMatch
follow upstream + configure list semantics in watcher::Config
Ok. Have left default (strongly consistent) list semantics for the default Api, but made more opinionated defaults for Have cleaned up a bunch of builders, and shortened some tests as a result, but I am happy with this now. cc @nabokihms |
Co-authored-by: Natalie <[email protected]> Signed-off-by: Eirik A <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my perspective, everything seems great.
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Any other comments on this @nightkr ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Effectively makes the
VersionMatch
an exact duplicate of the upstream, and adds some builders here and there to compensate for the missingAny
.Have changed the watcher interface and made a new enum that maps onto
VersionMatch
instead, because it does not make sense to run a watcher against a pinned resource version; it will always use 0.(at least unless/until we build pagination into it).
We could keep the enum that wraps resource version, but this is awkward; it would be the only one that bundles resourceVersion that way;
so altogether we are just making it awkward for ourselves by trying to make it nice :(
Follow-up to #1162 before releasing.
Questions
Q: should we make
NotOlderThan("0")
a new default forListParams
? we want people to use the new-faster/less-taxing variant, although it is also slightly less consistent. I feel the people who want strong consistency guarantees should opt-in rather than people who don't want strong consistency to opt-out.A:
ListParams
should follow the api. Opt-in is up to the user. This avoids breaking changes.Q: should
watcher
default to a less consistent listsemantic for relists? it's much less of an issue because a few extra events will eventually get cleaned up anyway due to the nature of it being an infinite watch stream. Given the reports that people are passing on upstream complaining about our default watch semantics, it might better to provide a stronger opinion here so that we are not seen as a "taxing runtime to use"A: Not changing defaults. While it makes sense for
Controller
use where things are eventually consistent and meant to deal with a few redundant reconciles anyway, it's a little more iffy forwatcher
. We emphasise this in the docs, in particular forSemantic
. People like opting into performance a lot more than they have to debug less consistency (if that happens).