Skip to content
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

Ease the transition away from createOrReplace #5377

Closed
shawkins opened this issue Aug 7, 2023 · 2 comments
Closed

Ease the transition away from createOrReplace #5377

shawkins opened this issue Aug 7, 2023 · 2 comments
Milestone

Comments

@shawkins
Copy link
Contributor

shawkins commented Aug 7, 2023

We have two options:

  • simply changing the definitions of createOrReplace and replace to be inline with what could be expected - that is change replace to be update and strip the retry and non-locking behavior from createOrReplace. Yes this would be a breaking change and require additional documentation, but it would work most of the time with existing code.
  • or introduce a generalized createOr(Function<Resource, T> conflictAction) method - such that you could do createOr(Resource::update), createOr(Resource::patch). This could also be expressed in a more dsl-like way with resource.onConflict(Resource::update).create() or something that would be cross-cutting resource.createIfNotFound().update()

Originally posted by @shawkins in #5337 (comment)

shawkins added a commit to shawkins/kubernetes-client that referenced this issue Aug 7, 2023
also adds / clarifies serverSideApply docs

Closes fabric8io#5377 fabric8io#5363
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Aug 7, 2023
also adds / clarifies serverSideApply docs

Closes fabric8io#5377 fabric8io#5363
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Aug 7, 2023
also adds / clarifies serverSideApply docs

Closes fabric8io#5377 fabric8io#5363
@Bwvolleyball
Copy link

The code instructions for the deprecated createOrReplace() are frustratingly obtuse. Does not feel like this project was ready to deprecate that command.

@shawkins
Copy link
Contributor Author

shawkins commented Aug 9, 2023

@Bwvolleyball please see the FAQ link in the Javadocs and the updates from #5367

manusa pushed a commit to shawkins/kubernetes-client that referenced this issue Aug 30, 2023
also adds / clarifies serverSideApply docs

Closes fabric8io#5377 fabric8io#5363
@manusa manusa added this to the 6.9.0 milestone Aug 30, 2023
@manusa manusa closed this as completed in 9a72eb2 Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants