task_generator.go ×4

Frontier kind: Code frontier

unlabeled · c_f846af778859

4 tests · 4061 LOC · 188 files · introduces 0 tests · 28 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges28 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
597 ranges4061 lines · 188 files · Browse complete extent
All tests (intent)
4 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 28 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/task_generator.go 22 introduced LOC · 4 ranges

Open complete file

768 }
769
770 > func (r *TaskGeneratorImpl) GenerateMigrationTasks(targetClusters []string) ([]tasks.Task, int64, error) { task_generator.go
771 > executionInfo := r.mutableState.GetExecutionInfo()
772 > versionHistory, err := versionhistory.GetCurrentVersionHistory(executionInfo.GetVersionHistories())
773 > if err != nil {
774 return nil, 0, err
775 }
776
777 > archetypeID := r.mutableState.ChasmTree().ArchetypeID() task_generator.go
778 > isWorkflow := archetypeID == chasm.WorkflowArchetypeID
779 >
780 > lastItem := &historyspb.VersionHistoryItem{
781 > EventId: common.EmptyEventID,
782 > Version: common.EmptyVersion,
783 > }
784 > nextEventID := common.EmptyEventID
785 > if isWorkflow {
786 > // version history is empty for non-workflow
787 > lastItem, err = versionhistory.GetLastVersionHistoryItem(versionHistory)
788 > if err != nil {
789 return nil, 0, err
790 }
791 > nextEventID = lastItem.GetEventId() + 1 task_generator.go
792 }
793
794 > now := time.Now().UTC() task_generator.go
795 > workflowKey := r.mutableState.GetWorkflowKey()
796 > var taskEquivalents []tasks.Task
797 >
798 > if r.mutableState.GetExecutionState().State == enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED {
799 if isWorkflow {
800 taskEquivalents = []tasks.Task{&tasks.SyncWorkflowStateTask{
go.temporal.io/server/service/history/interfaces/mutable_state_mock.go 6 introduced LOC · 1 range

Open complete file

3265
3266 // IsTransitionHistoryEnabled mocks base method.
3267 > func (m *MockMutableState) IsTransitionHistoryEnabled() bool { mutable_state_mock.go
3268 > m.ctrl.T.Helper()
3269 > ret := m.ctrl.Call(m, "IsTransitionHistoryEnabled")
3270 > ret0, _ := ret[0].(bool)
3271 > return ret0
3272 > }
3273
3274 // IsTransitionHistoryEnabled indicates an expected call of IsTransitionHistoryEnabled.