api.go ×8

Frontier kind: Joint frontier

unlabeled · c_6ec303fb4eab

1 test · 6862 LOC · 248 files · introduces 1 test · 45 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges45 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1317 ranges6862 lines · 248 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

3 files ranked by introduced lines: 45 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/verifychildworkflowcompletionrecorded/api.go 29 introduced LOC · 8 ranges

Open complete file

110 // Resend parent workflow from source cluster
111
112 > clusterMetadata := shardContext.GetClusterMetadata() api.go
113 > targetClusterInfo := clusterMetadata.GetAllClusterInfo()[clusterMetadata.GetCurrentClusterName()]
114 >
115 > namespaceEntry, err := shardContext.GetNamespaceRegistry().GetNamespaceByID(namespaceID)
116 > if err != nil {
117 return nil, err
118 }
119
120 > activeClusterName := namespaceEntry.ActiveClusterName(namespace.RoutingKey{ID: request.ParentExecution.WorkflowId}) api.go
121 > if activeClusterName == clusterMetadata.GetCurrentClusterName() {
122 return nil, errors.New("namespace becomes active when processing task as standby")
123 }
124
125 > remoteAdminClient, err := shardContext.GetRemoteAdminClient(activeClusterName) api.go
126 > if err != nil {
127 return nil, err
128 }
129
130 > resp, err := remoteAdminClient.SyncWorkflowState(ctx, &adminservice.SyncWorkflowStateRequest{ api.go
131 > NamespaceId: request.NamespaceId,
132 > Execution: &commonpb.WorkflowExecution{
133 > WorkflowId: request.ParentExecution.WorkflowId,
134 > RunId: request.ParentExecution.RunId,
135 > },
136 > ArchetypeId: chasm.WorkflowArchetypeID,
137 > VersionedTransition: versionedTransition,
138 > VersionHistories: versionHistories,
139 > TargetClusterId: int32(targetClusterInfo.InitialFailoverVersion),
140 > })
141 >
142 > if err != nil {
143 if common.IsNotFoundError(err) {
144 // parent workflow is not found on source cluster,
155 }
156
157 > engine, err := shardContext.GetEngine(ctx) api.go
158 > if err != nil {
159 return nil, err
160 }
161 > err = engine.ReplicateVersionedTransition(ctx, chasm.WorkflowArchetypeID, resp.VersionedTransitionArtifact, activeClusterName) api.go
162 > if err != nil {
163 if !errors.Is(err, consts.ErrDuplicate) {
164 return nil, err
167
168 // Verify child execution again after resending parent workflow
169 > _, _, err = verifyChildExecution(ctx, workflowConsistencyChecker, request) api.go
170 > if err != nil {
171 return nil, err
172 }
173 > return &historyservice.VerifyChildExecutionCompletionRecordedResponse{}, nil api.go
174 }
go.temporal.io/server/service/history/ndc/workflow_state_replicator_mock.go 13 introduced LOC · 3 ranges

Open complete file

40
41 // EXPECT returns an object that allows the caller to indicate expected use.
42 > func (m *MockWorkflowStateReplicator) EXPECT() *MockWorkflowStateReplicatorMockRecorder { workflow_state_replicator_mock.go
43 > return m.recorder
44 > }
45
46 // ReplicateVersionedTransition mocks base method.
47 > func (m *MockWorkflowStateReplicator) ReplicateVersionedTransition(ctx context.Context, archetypeID chasm.ArchetypeID, versionedTransition *repication.VersionedTransitionArtifact, sourceClusterName string) error { workflow_state_replicator_mock.go
48 > m.ctrl.T.Helper()
49 > ret := m.ctrl.Call(m, "ReplicateVersionedTransition", ctx, archetypeID, versionedTransition, sourceClusterName)
50 > ret0, _ := ret[0].(error)
51 > return ret0
52 > }
53
54 // ReplicateVersionedTransition indicates an expected call of ReplicateVersionedTransition.
55 > func (mr *MockWorkflowStateReplicatorMockRecorder) ReplicateVersionedTransition(ctx, archetypeID, versionedTransition, sourceClusterName any) *gomock.Call { workflow_state_replicator_mock.go
56 > mr.mock.ctrl.T.Helper()
57 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicateVersionedTransition", reflect.TypeOf((*MockWorkflowStateReplicator)(nil).ReplicateVersionedTransition), ctx, archetypeID, versionedTransition, sourceClusterName)
58 > }
59
60 // SyncWorkflowState mocks base method.
go.temporal.io/server/service/history/history_engine.go 3 introduced LOC · 1 range

Open complete file

803 artifact *replicationspb.VersionedTransitionArtifact,
804 sourceClusterName string,
805 > ) error { history_engine.go
806 > return e.nDCWorkflowStateReplicator.ReplicateVersionedTransition(ctx, archetypeID, artifact, sourceClusterName)
807 > }
808
809 func (e *historyEngineImpl) ImportWorkflowExecution(