Skip to content
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

Workflow Update: abort updates with failure if update was accepted but workflow completes #6630

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Oct 9, 2024

What changed?

Abort updates with failure if update was accepted but workflow completes.

Why?

Accepted Updates are failed with special server failure because if a client knows that Update has been accepted, it expects any following requests to return an Update result (or failure) but not an error. There can be different types of Update failures coming from worker and a client must handle them anyway. It is easier and less error-prone for a client to handle only Update failures instead of both failures and not obvious NotFound errors in case if the Workflow completes before the Update completes.

How did you test it?

Modified existing tests.

Potential risks

It is some sort of breaking change for very narrow case though.

Documentation

TBD

Is hotfix candidate?

No.

@alexshtin alexshtin requested a review from a team as a code owner October 9, 2024 04:56
Comment on lines -274 to -279
abortErr := reason.Error()
if reason == AbortReasonWorkflowContinuing {
// Accepted Update can't be applied to the new run, and must be aborted
// same way as if Workflow is completed.
abortErr = AbortReasonWorkflowCompleted.Error()
}
Copy link
Member Author

Choose a reason for hiding this comment

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

I am happy to remove this hack.

@alexshtin alexshtin force-pushed the fix/fail-accepted-update-on-wf-complete branch from 33ab6a0 to fddf0d7 Compare October 12, 2024 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant