api.go ×10

Frontier kind: Code frontier

unlabeled · c_edb6df01b38f

6 tests · 2659 LOC · 135 files · introduces 0 tests · 39 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
13 ranges39 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
403 ranges2659 lines · 135 files · Browse complete extent
All tests (intent)
6 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: 39 introduced LOC across 13 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/getworkflowexecutionrawhistory/api.go 27 introduced LOC · 10 ranges

Open complete file

191 request *historyservice.GetWorkflowExecutionRawHistoryRequest,
192 versionHistories *historyspb.VersionHistories,
193 > ) (*historyspb.VersionHistory, error) { api.go
194 >
195 > req := request.Request
196 >
197 > targetBranch, err := versionhistory.GetCurrentVersionHistory(versionHistories)
198 > if err != nil {
199 return nil, err
200 }
201 > firstItem, err := versionhistory.GetFirstVersionHistoryItem(targetBranch) api.go
202 > if err != nil {
203 return nil, err
204 }
205 > lastItem, err := versionhistory.GetLastVersionHistoryItem(targetBranch) api.go
206 > if err != nil {
207 return nil, err
208 }
209
210 > setDefaultStartAndEndEvent(req, firstItem, lastItem) api.go
211 >
212 > if req.GetStartEventId() < 0 {
213 return nil, consts.ErrInvalidFirstNextEventCombination
214 }
215
216 // get branch based on the end event if end event is defined in the request
217 > if req.GetEndEventId() == lastItem.GetEventId() && api.go
218 > req.GetEndEventVersion() == lastItem.GetVersion() {
219 > // this is a special case, target branch remains the same
220 > } else {
221 endItem := versionhistory.NewVersionHistoryItem(req.GetEndEventId(), req.GetEndEventVersion())
222 idx, err := versionhistory.FindFirstVersionHistoryIndexByVersionHistoryItem(versionHistories, endItem)
231 }
232
233 > startItem := versionhistory.NewVersionHistoryItem(req.GetStartEventId(), req.GetStartEventVersion()) api.go
234 > // If the request start event is defined. The start event may be on a different branch as current branch.
235 > // We need to find the LCA of the start event and the current branch.
236 > if req.GetStartEventId() == common.FirstEventID &&
237 > req.GetStartEventVersion() == firstItem.GetVersion() {
238 // this is a special case, start event is on the same branch as target branch
239 > } else { api.go
240 if !versionhistory.ContainsVersionHistoryItem(targetBranch, startItem) {
241 idx, err := versionhistory.FindFirstVersionHistoryIndexByVersionHistoryItem(versionHistories, startItem)
256 }
257
258 > return targetBranch, nil api.go
259 }
260
263 firstItem *historyspb.VersionHistoryItem,
264 lastItem *historyspb.VersionHistoryItem,
265 > ) { api.go
266 > if req.GetStartEventId() == common.EmptyEventID || req.GetStartEventVersion() == common.EmptyVersion {
267 // If start event is not set, get the events from the first event
268 req.StartEventId = common.FirstEventID
269 req.StartEventVersion = firstItem.GetVersion()
270 }
271 > if req.GetEndEventId() == common.EmptyEventID || req.GetEndEventVersion() == common.EmptyVersion { api.go
272 // If end event is not set, get the events until the end event
273 req.EndEventId = lastItem.GetEventId()
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 12 introduced LOC · 3 ranges

Open complete file

1328 }
1329
1330 > func (x *GetWorkflowExecutionRawHistoryRequest) GetStartEventVersion() int64 { request_response.pb.go
1331 > if x != nil {
1332 > return x.StartEventVersion
1333 > }
1334 return 0
1335 }
1336
1337 > func (x *GetWorkflowExecutionRawHistoryRequest) GetEndEventId() int64 { request_response.pb.go
1338 > if x != nil {
1339 > return x.EndEventId
1340 > }
1341 return 0
1342 }
1343
1344 > func (x *GetWorkflowExecutionRawHistoryRequest) GetEndEventVersion() int64 { request_response.pb.go
1345 > if x != nil {
1346 > return x.EndEventVersion
1347 > }
1348 return 0
1349 }