-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Entry API #811
Entry API #811
Conversation
Fixes kube-rs#810 Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
9b1c932
to
d31615c
Compare
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.
very clean in general, left one minor nit, but also a more future oriented problem with using replace
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
Codecov Report
@@ Coverage Diff @@
## master #811 +/- ##
==========================================
- Coverage 70.08% 69.96% -0.12%
==========================================
Files 58 59 +1
Lines 3984 4145 +161
==========================================
+ Hits 2792 2900 +108
- Misses 1192 1245 +53
Continue to review full report at Codecov.
|
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
0769a81
to
e2ae52c
Compare
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
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.
This is looking very professional, had a good go over now and could only find a few nits on documentation. The integration tests are very good (i see the coverage has bounced back from the earlier pr state 👍), and presumably these are pretty fast since it's just configmap mutations.
some unknowns on the potential error cases where people manually set metadata.{name,namespace,generate_name} but there's already a thread for it
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
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.
had a quick look at the generated docs, looks great!
ah, actually, we still have some error cases to decide on
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
bf882e6
to
d542556
Compare
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
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.
looks very clean now, no other comments on this.
merge away at your leisure, and please open up any follow-up enhancement issue ideas (like the filthyref idea)
Motivation
Fixes #810
Solution
Introduces a new method
Api::entry
, analogous to std'sHashMap::entry
, allowing for a (hopefully) ergonomic API for get-and-create and get-and-modify use cases.The API should be similar to
HashMap::entry
, but adds an explicitEntry::sync()
method for writing back any changes to K8s, allowing the user to control how and when batching happens.