-
Notifications
You must be signed in to change notification settings - Fork 218
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
Error deleting a custom resources #2679
Comments
Hi @jalonsomagnolia , thx for reporting, taking a look! |
@jalonsomagnolia could you pls provide a simple reproducer? this works correctly in integration tests like this That logic is actually right, since in this case it should be basically an empty no-op workflow there. |
Thanks for the response @csviri . I'll provide you the reproducer asap. But in the meantime, let me understand something:
We don't want to invoke this
Then, if you say that the ìf` condition is correct, then maybe the initialiser is incorrect:
In our case, Finally, notice that the code in version 4.9.7, which works fine, was like this:
The change is adding that new |
Hi right there is an issue, your right, it is a bit more complex than it first seems, pls take a look on attached PR if makes sense. Will add unit tests soon. |
Good morning @csviri . Here it is the reproducer project. As you can see it's a really simple operator, but if you create a CR and then tries to delete, you'll have this exception
|
Bug Report
After upgrading to the java-operator-sdk 5.0, we have the following error when we try to delete a custom resource:
Everything worked fine before moving to 5.0.
Our controller is configured with something like this:
The code fails before calling our
cleanup
.Checking the controller code, where the error is being thrown, I can see
Shouldn't be instead
if (managedWorkflow.hasCleaner() || explicitWorkflowInvocation) {
(so only when explicitWorkflowInvocation = true). By default@Workflow
hasexplicitWorkflowInvocation = false
, so I understand that unless you want to implement a workflow, this code shouldn't be called.The text was updated successfully, but these errors were encountered: