Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
DRA API evolution #14
DRA API evolution #14
Changes from 3 commits
a67f632
1504622
7c2d569
e3b570c
0a77223
bec6652
ab87abd
c2a062c
84cc5f1
56c74fd
dea8ded
83b43b9
73af0cf
ee69061
8024e0c
6f8518e
d435a4a
8cbe299
c34e043
7a622ff
59de778
f4d03d5
22c7ae6
65d5c49
4e9e3f3
f4b4052
bb2a6d8
846e397
7b3aef2
bfa9359
88f447b
d3fb9c4
4cb8709
45d14ba
ac9871d
aa0d952
cd5ba42
bd8117a
3e5c69f
3b98607
324e2e4
e71290b
3ec5c7e
7703dfa
b4c48f6
74df07f
adb0b5d
c920b2b
210b376
6c887ba
aecf75c
819ac75
883167e
ed651b1
1dbb6d2
6eab574
9120701
b18ad3b
3b324ee
75d1d2e
ed56e13
9e74635
ebfa95f
7aeb3c4
82be70e
308b670
13eace9
3ed68fa
dfd9ec8
49e124c
72c1f7c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
s/occurr/occur/
non-blocking nit
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.
Fixed.
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.
It's not just about "I don't need patch".
I know API machinery does not enforce unique keys in all cases today but it DOES:
a) support unique-key enforcement in some paths (e.g. SSA)
b) plan to support declarative validation
Declaring this (and all such lists) as
+listType=map
and+listMapKey=name
should be sufficient to auto-generate validation (in time).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.
Adding
+listType=map
to get validation seems wrong to me. I still think the main criteria should be "who owns this" and "how is it being updated". Adding+listType=map
when it is not needed can significantly increase the managed fields annotations because then ownership of each entry gets tracked.If we ever add automatic validation, then I'd like to see it enabled for a new
+listType=atomicMap
with+listMapKey=name
.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 discussion this morning - ACK the potential problem with managedfields. Experiment and we can regroup.
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.
It's bad: 77% of the protobuf encoding is for managed fields. See https://kubernetes.slack.com/archives/C0EG7JC6T/p1717485534890529 in #sig-api-machinery.
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.
Candidate for list-of-one-of pattern because we might add more types
Suppose we add
FloatValue
.A forward-rev driver which tries to set a float will fail at the (back-rev) API because none of the known fields are set. Good.
A back-rev scheduler will know something is wrong because none of the known fields are set. Good.
So this seems OK?
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.
I agree. Embedded one-of vs. "struct with some shared fields (name here in this case) and some one-of fields (the value fields here)" have the same semantic, as long as clients are aware.
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.
need to set a max length on this too :)
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.
64?
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.
SGTM