Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Optional subworkflow task #2974

Merged
merged 6 commits into from
May 17, 2022
Merged

Optional subworkflow task #2974

merged 6 commits into from
May 17, 2022

Conversation

jxu-nflx
Copy link
Contributor

@jxu-nflx jxu-nflx commented May 6, 2022

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
  • WHOSUSING.md
  • Other (please describe):

Changes in this PR

  • Mark JOIN task which depends on an optional task that has COMPLETED_WITH_ERRORS with the same status (i.e. COMPLETED_WITH_ERRORS)
  • If subworkflow task is defined as optional in the parent workflow, the parent workflow status will not be updated when the subworkflow is retried/rerun/restarted

Describe the new behavior from this PR, and why it's needed
Issue #

Alternatives considered

Describe alternative implementation you have considered

…ITH_ERRORS with the same status (i.e. COMPLETED_WITH_ERRORS)
…e parent workflow status will not update even if the subworkflow is retried/rerun/restarted
@apanicker-nflx apanicker-nflx added the type: bug bugs/ bug fixes label May 16, 2022

### Optional Sub Workflow Task
If the Sub Workflow task is defined as optional in the parent workflow task definition, the parent workflow task will not be retried if sub-workflow is terminated or failed.
In additional, even if the sub-workflow is retried/rerun/restarted after reaching to a terminal status, the parent workflow task status will remain as it is.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo In addition

@@ -653,6 +653,13 @@ private void updateAndPushParents(WorkflowModel workflow, String operation) {
// update parent's sub workflow task
TaskModel subWorkflowTask =
executionDAOFacade.getTaskModel(workflow.getParentWorkflowTaskId());
if (subWorkflowTask.getWorkflowTask() != null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The null check is redundant, In a TaskModel instance, WorkflowTask should always be present.

@jxu-nflx jxu-nflx merged commit 028a082 into main May 17, 2022
@jxu-nflx jxu-nflx deleted the bugfix/optional_subworkflow_task branch May 17, 2022 04:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug bugs/ bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants