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
Remove the deprecated Fabric8 method createOrReplace from the project #8310
Conversation
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Wuldn't it be begtter to actually know what you are doing and use either create or update? I'm quite sure that not all of these cases have actually a real reason to not use one or another.
I think there are two options for this:
WDYT? |
Well, I think first of all, if you have methods like this:
But I think in most cases you should really know whether you want to create something or update something. Only in cases when you really have good reasons why you don't know whether you are creating or updating something you should use what I did in the UO or use the server apply. I thought I had it in my case in UO. But I'm not sure that is the case here => I guess there might be legit cases for it, but somehow this PR did not convince me that it was really considered. TBH, if I just wanted to replace the deprecated calls without any further consideration, I would have done it myself and not opened any issues for it. You should probably also think if server-side apply really does what you want here as it is not the same as replace. |
…SideApply Signed-off-by: Lukas Kral <lukywill16@gmail.com>
108e7ac
to
7f05105
Compare
@scholzj based on your comments, I went through the code and used the I guess this is now correct solution? |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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 looks better code wise, yes. Thanks.
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
@scholzj @Frawless @see-quick this is ready for review now. |
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
@strimzi-ci run tests test_only profile=all groups=olm |
|
✅ Build SUCCESS - check Jenkins for more info. ✅ |
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
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, assuming that test will pass
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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 assuming the tests pass.
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
Type of change
Description
This PR removes the deprecated Fabric8 method
createOrReplace
.Instead, we should use the
create()
orupdate()
methods depending on the use case.As part of this PR, I'm also adding few methods for creating and updating various resources and changing it in the tests.
Also, some of the resources like ClusterRoles, CRDs, etc., need to have
createOrUpdate
method for updating the resource when it already exists (because of leftovers from different tests etc.).Fixes #8270
Checklist