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

Fail workflow if input to dynamic fork join task is invalid #3273

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

jxu-nflx
Copy link
Contributor

@jxu-nflx jxu-nflx commented Oct 5, 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):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

Fix the issue that uncaught exception thrown when the task input of FORK_JOIN_DYNAMIC is invalid, and task seem to be stuck. Also startWorkflow will fail with 500 in this case if FORK_JOIN_DYNAMIC task is synchronous evaluated when workflow starts.

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

Alternatives considered

Describe alternative implementation you have considered

} catch (Exception e) {
String reason =
String.format(
"Dynamic tasks could not be created due to invalid task input: %s ",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Since, DYNAMIC is a task type already, this would probably read better as Tasks could not be dynamically forked due to invalid input: %s

@apanicker-nflx apanicker-nflx added the type: bug bugs/ bug fixes label Oct 5, 2022
@@ -61,4 +61,8 @@ abstract class AbstractSpecification extends Specification {

workflowExecutor.startWorkflow(input)
}

protected String startWorkflow(StartWorkflowInput startWorkflowInput) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: instead of this method in the base class, the sub-classes can directly call workflowExecutor.startWorkflow(). It adds a layer of indirection, which is not necessary.

@jxu-nflx jxu-nflx force-pushed the bugfix/invalid_input_dynamic_fork_join branch from 6472c25 to 3ef90f9 Compare October 6, 2022 17:41
@jxu-nflx jxu-nflx merged commit b5e3f1b into main Oct 6, 2022
@jxu-nflx jxu-nflx deleted the bugfix/invalid_input_dynamic_fork_join branch October 6, 2022 18:09
pmchung pushed a commit to routific/conductor that referenced this pull request Sep 6, 2023
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.

3 participants