-
Notifications
You must be signed in to change notification settings - Fork 917
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
Add an archival task executor #3663
Conversation
1727ed9
to
2a28663
Compare
The title should be archival task executor? |
9bc7a96
to
0457a6d
Compare
124f601
to
9ee1de8
Compare
|
9ee1de8
to
84a8be9
Compare
if err != nil { | ||
return nil, err | ||
} | ||
if mutableState == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this happen if a workflow is deleted before the archival task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to drop the task and log a warning. Also added a test case for this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil error to drop the task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I return a const error here and then I convert it to nil further up the stack. If I return nil here, then execution will continue because this is a helper method.
869d8ed
to
604cc96
Compare
logger := log.With(e.logger, tag.Task(task)) | ||
request, err := e.getArchiveTaskRequest(ctx, logger, task) | ||
if err != nil { | ||
if err == ErrMutableStateIsNil || err == ErrWorkflowExecutionIsStillRunning { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: either handle at the top level in Execute(...) or from the return function loadAndVersionCheckMutableState
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, thanks!
604cc96
to
7e0a1b3
Compare
What changed?
Added a processor which executes tasks on the archival queue. A followup PR will actually enable the queue factory.
Why?
I made these changes to enable the archival queue.
How did you test it?
I tested this using unit tests because it's not actually hooked into prod yet.
Potential risks
No--it's not wired into main yet.
Is hotfix candidate?
No.