-
Notifications
You must be signed in to change notification settings - Fork 218
Missing workflowExecutionResult
during error handling with Managed Workflow
#2551
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
Comments
workflowExecutionResult
in Managed Workflow Error HandlingworkflowExecutionResult
During Error Handling with Managed Workflow
workflowExecutionResult
During Error Handling with Managed WorkflowworkflowExecutionResult
during error handling with Managed Workflow
Indeed, there's an issue there. Thank you for the report. Can this wait for version 5 so that we can address this in a proper fashion as this would be rather complex to address this for version 4 of the SDK while maintaining backwards compatibility? The easiest solution would be to change the default value to not throw exceptions automatically but this would break the existing behavior. |
While I had hoped this would be addressed in version 4, I understand that fixing it now would break backward compatibility. Addressing it in version 5 makes sense. Do you know when v5 is scheduled for release? |
I saw in your response to issue #2545 that you're waiting for the fabric8 client v7, which answers my question. Do you expect this issue to be resolved in the initial v5 release, or will it come in a later patch? |
I will see if I can work something out for v4. It will definitely be in the first v5 release. |
Super! Maybe making |
Fixes #2551 Signed-off-by: Chris Laprun <[email protected]>
See linked PR, let me know if this addresses the issue. |
Fixes #2551 Signed-off-by: Chris Laprun <[email protected]>
Fixes #2551 Signed-off-by: Chris Laprun <[email protected]>
Seems to work 🙂 |
…wn (#2552) Fixes #2551 Signed-off-by: Chris Laprun <[email protected]>
Bug Report
What did you do?
I attempted to handle errored dependents within managed workflow. I implemented
ErrorStatusHandler
in my reconciler and configuredupdateErrorStatus
to update the CRD status with a list of failed dependents (including error messages) and successful dependents.What did you expect to see?
The CRD status should display a list of failed dependents (with error messages) and successful dependents.
What did you see instead? Under which circumstances?
The CRD status was not updated because
getWorkflowReconcileResult()
returned null.Environment
AKS kubernetes version: 1.30.4
$ Mention java-operator-sdk version from pom.xml file
4.9.4
$ java -version
openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35-2513)
OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)
$ kubectl version
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.4
Possible Explenation
I seems both Controller.execute and DefaultWorkflow.reconcile are designed to handle workflow errors via
throwAggregateExceptionIfErrorsPresent
. TheDefaultWorkflow
handles errors only if throwExceptionAutomatically is set totrue
, which it is by default (THROW_EXCEPTION_AUTOMATICALLY_DEFAULT
istrue
).However, the issue is that
Controller.execute
is responsible for setting theworkflowExecutionResult
. SinceDefaultWorkflow.reconcile
throws an exception when handling errors withthrowAggregateExceptionIfErrorsPresent
, the error handling inController.execute
never hits, andworkflowExecutionResult
is never set.The text was updated successfully, but these errors were encountered: