Add history task write test hook#10583
Draft
stephanos wants to merge 5 commits into
Draft
Conversation
stephanos
commented
Jun 6, 2026
Comment on lines
-486
to
-491
| fx.Decorate(func(base persistence.ExecutionManager, logger log.Logger) persistence.ExecutionManager { | ||
| // Wrap ExecutionManager with recorder to capture task writes | ||
| // This wraps the FINAL ExecutionManager after all FX processing (metrics, retries, etc.) | ||
| c.taskQueueRecorder = NewTaskQueueRecorder(base, logger) | ||
| return c.taskQueueRecorder | ||
| }), |
Contributor
Author
There was a problem hiding this comment.
Removing this is the goal of this PR
stephanos
commented
Jun 6, 2026
| } | ||
|
|
||
| // GetAllTasks returns all tasks grouped by category (unwrapped, without metadata) | ||
| func (r *TaskQueueRecorder) GetAllTasks() map[tasks.Category][]tasks.Task { |
Contributor
Author
There was a problem hiding this comment.
Bunch of unused methods here ...
stephanos
commented
Jun 6, 2026
| @@ -121,6 +125,13 @@ func (m *executionManagerImpl) CreateWorkflowExecution( | |||
| return nil, err | |||
Contributor
Author
There was a problem hiding this comment.
The following lines are the main change ...
stephanos
commented
Jun 6, 2026
| NumHistoryShards int32 | ||
| Logger log.Logger | ||
| SharedCluster bool | ||
| EnableTaskQueueRecorder bool |
Contributor
Author
There was a problem hiding this comment.
Making it opt-in to not have to pay the cost for every test
140bbd8 to
7ac0d31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a focused
HistoryTasksWrittentest hook in the execution manager after successful task-producing writesMake
TaskQueueRecorderopt-in.Why
This removes the
fx.Decoratereference. One step closer to the goal of deleting the separate onebox.go fx graph all-together and making use of the production fx graph from the temporal package instead.Net LOC diff is -280.