-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update deprecated method in OpenShiftClient #1208
Conversation
72a5fbe
to
cf5775c
Compare
run tests |
1 similar comment
run tests |
@mjurc do you think the fail in OCP native is related to the change? |
@rsvoboda I saw this failiure few times in past. That test is flaky/need more time don't know. But I tested it with testsuite and saw few failiures, but didn't have time to investegate them. But this PR is still on my radar and will finish it when I'll have some spare hours. |
Hey, I just used this PR to check that the credentials in the workflow worked proper - sorry about that |
43aaf89
to
36f2900
Compare
36f2900
to
53845d9
Compare
run tests |
1 similar comment
run tests |
The Linux JVM is not caused by this, same as daily |
run tests |
// call createOrReplace | ||
client.resource(groupModel).createOrReplace(); | ||
// call createOr and if it exists the update will be done | ||
client.resource(groupModel).unlock().createOr(NonDeletingOperation::update); |
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.
Gee, I am surprised there's actually an elegant solution like this. Thank you!
Let's try it :) |
Summary
Removing deprecated methods
createOrReplace()
andyamlMapper()
from OpenShiftClientTested this version with testsuite weekly stable ocp and test was passing except know issues.
The
createOrReplace
was replaced bycreateOr
and update is now provided byNonDeletingOperation::update
orNonDeletingOperation::patch
. This was recomnded by official FAQ.I decided to use the unlock even as it's optional as per explanation it's needed if the
resourceVersion
has value.The use of the unlock function is optional and is only needed if you are starting with a item that has the resourceVersion populated.
For
applyServicePropertiesToDeployment
method I using patch as I encounter few problem when testing it. Sometime it throw that resources are outdated when applying update. In this case patch is more safe. The problem was only inconfigMapEndToEnd
but it's used in multiple tests. If you want to use update insted of patch we probably need to implement some kind of retry mechanism for itThe
yamlMapper
was updated similar as they done it when removing they usage herePlease check the relevant options
run tests
phrase in comment)Checklist: