-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl extends ServerSideApplicable #5073
Conversation
cc @shawkins, is the following migration right?
|
With the caveat that the user may choose not to use forcing if they want to know when there are conflicting changes. Also unlike createOrReplace if the resourceVersion is set on the resource and a replace is attempted, it will be optimistically locked.
I was mixed on how many of these composite operations to expose. The user also has access to resources(), so one can do whatever with resources().forEach(...) - including error handling, which is non-existent in performOperation. So here the alternative to adding these methods is to use
Tests are needed for this pr - you'll notice when this is executed that the fieldManager and forceConflicts are lost. This is because a new context is created for each resource and we're specifically propagating what is applicable to the write operations in Line 506 in 7104c6f
|
@shawkins thanks, but where can I find the definition of "what is applicable to the write operations"? |
In this case you are making forceConflicts and fieldManager applicable. They would need to be added to the context Line 511 in 7104c6f
|
I would say it's a little hard for me to figure out how to handle the deprecated method invocations of this library, many suggestions in deprecated's description link to a totally different class, w/o examples. Not like the following common case
So, I think implementing this interface makes user easy to migrate. |
Thanks for the tips, UT |
a8e51e7
to
50bc91b
Compare
50bc91b
to
6261b22
Compare
@shawkins could you please take another look? |
Was there a reason to copy the test logic, rather than calling the methods that were already on PatchTest? |
@shawkins moved test case into |
…extends ServerSideApplicable
317f3d1
to
da8b25b
Compare
Test failure seems irrelevant. |
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
Kudos, SonarCloud Quality Gate passed! |
### What changes were proposed in this pull request? The release notes are available at https://github.com/fabric8io/kubernetes-client/releases/tag/v6.6.0 ### Why are the changes needed? It's basically a routine work, to keep the third-party libs up-to-date. And fabric8io/kubernetes-client#5073 simplifies SPARK-43356 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. Closes #41034 from pan3793/SPARK-43355. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? The release notes are available at https://github.com/fabric8io/kubernetes-client/releases/tag/v6.6.0 ### Why are the changes needed? It's basically a routine work, to keep the third-party libs up-to-date. And fabric8io/kubernetes-client#5073 simplifies SPARK-43356 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. Closes apache#41034 from pan3793/SPARK-43355. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? The deprecation message of `createOrReplace` indicates that we should change `createOrReplace` to `serverSideApply` instead. ``` deprecated please use {link ServerSideApplicable#serverSideApply()} or attempt a create and edit/patch operation. ``` The change is not fully equivalent, but I believe it's reasonable. > With the caveat that the user may choose not to use forcing if they want to know when there are conflicting changes. > > Also unlike createOrReplace if the resourceVersion is set on the resource and a replace is attempted, it will be optimistically locked. See more details at fabric8io/kubernetes-client#5073 ### Why are the changes needed? Remove usage of deprecated API. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. Closes #41136 from pan3793/SPARK-43356. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? The deprecation message of `createOrReplace` indicates that we should change `createOrReplace` to `serverSideApply` instead. ``` deprecated please use {link ServerSideApplicable#serverSideApply()} or attempt a create and edit/patch operation. ``` The change is not fully equivalent, but I believe it's reasonable. > With the caveat that the user may choose not to use forcing if they want to know when there are conflicting changes. > > Also unlike createOrReplace if the resourceVersion is set on the resource and a replace is attempted, it will be optimistically locked. See more details at fabric8io/kubernetes-client#5073 ### Why are the changes needed? Remove usage of deprecated API. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. Closes apache#41136 from pan3793/SPARK-43356. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
Description
CreateOrReplaceable#createOrReplace
is deprecated, and the suggestion isThis change allows the following usage easy to migrate
Type of change
test, version modification, documentation, etc.)
Checklist