api.go ×8

Frontier kind: Code frontier

unlabeled · c_54ff9055c7b7

9 tests · 2695 LOC · 137 files · introduces 0 tests · 21 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges21 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
410 ranges2695 lines · 137 files · Browse complete extent
All tests (intent)
9 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: 21 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/recordchildworkflowcompleted/api.go 13 introduced LOC · 8 ranges

Open complete file

54 }
55 }
56 > if err != nil { api.go
57 return nil, err
58 }
106 }
107
108 > onCurrentBranch, err := api.IsHistoryEventOnCurrentBranch(mutableState, parentInitiatedID, parentInitiatedVersion) api.go
109 > if err != nil || !onCurrentBranch {
110 return nil, consts.ErrChildExecutionNotFound
111 }
112
113 // Check mutable state to make sure child execution is in pending child executions
114 > ci, isRunning := mutableState.GetChildExecutionInfo(parentInitiatedID) api.go
115 > if !isRunning {
116 return nil, consts.ErrChildExecutionNotFound
117 }
120 // and reloaded mutable state, so if startedEventID is still missing, we need to
121 // record a started event before recording completion event.
122 > if err := recordStartedEventIfMissing(ctx, mutableState, request, ci); err != nil { api.go
123 return nil, err
124 }
125
126 > childExecution := request.GetChildExecution() api.go
127 > if ci.GetStartedWorkflowId() != childExecution.GetWorkflowId() {
128 // this can only happen when we don't have the initiated version
129 return nil, consts.ErrChildExecutionNotFound
130 }
131
132 > if request.GetChildFirstExecutionRunId() != "" && ci.GetStartedRunId() != request.GetChildFirstExecutionRunId() { api.go
133 // this can happen when parent starts another child run in different branch
134 return nil, consts.ErrChildExecutionNotFound
172 request *historyservice.RecordChildExecutionCompletedRequest,
173 ci *persistencespb.ChildExecutionInfo,
174 > ) error { api.go
175 > parentInitiatedID := request.ParentInitiatedId
176 > if ci.StartedEventId == common.EmptyEventID {
177 initiatedEvent, err := mutableState.GetChildExecutionInitiatedEvent(ctx, parentInitiatedID)
178 if err != nil {
200 }
201 }
202 > return nil api.go
203 }
go.temporal.io/server/api/historyservice/v1/request_response.pb.go 8 introduced LOC · 2 ranges

Open complete file

3881 }
3882
3883 > func (x *RecordChildExecutionCompletedRequest) GetChildExecution() *v14.WorkflowExecution { request_response.pb.go
3884 > if x != nil {
3885 > return x.ChildExecution
3886 > }
3887 return nil
3888 }
3909 }
3910
3911 > func (x *RecordChildExecutionCompletedRequest) GetChildFirstExecutionRunId() string { request_response.pb.go
3912 > if x != nil {
3913 > return x.ChildFirstExecutionRunId
3914 > }
3915 return ""
3916 }