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

re-throw TerminateWorkflowException if payload exceed max threshold s… #3272

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

jxu-nflx
Copy link
Contributor

@jxu-nflx jxu-nflx commented Oct 5, 2022

…o to fail workflow and task

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 if a task output exceed threshold, the workflow appears to be stuck in RUNNING state.

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

Alternatives considered

Describe alternative implementation you have considered

@apanicker-nflx apanicker-nflx added the type: bug bugs/ bug fixes label Oct 5, 2022
@@ -192,6 +192,8 @@ public <T> void verifyAndUpload(T entity, PayloadType payloadType) {
}
} catch (TransientException te) {
throw te;
} catch (TerminateWorkflowException twe) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I presume that this fails the workflow, but the task whose payload is large will not be marked as FAILED. Should we try to fail the respective task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will fail the task as well if the terminateworkflowexception is due to task exceed size limit:

task.setStatus(TaskModel.Status.FAILED_WITH_TERMINAL_ERROR);

There is a test case added verified that as well

@jxu-nflx jxu-nflx merged commit 03b2e60 into main Oct 12, 2022
@jxu-nflx jxu-nflx deleted the bugfix/payload_exceed_threshold_exception branch October 12, 2022 18:54
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