visibility_archiver.go ×7

Frontier kind: Code frontier

unlabeled · c_3ab766f103ec

5 tests · 2203 LOC · 92 files · introduces 0 tests · 39 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges39 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
366 ranges2203 lines · 92 files · Browse complete extent
All tests (intent)
5 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 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/archiver/s3store/util.go 27 introduced LOC · 5 ranges

Open complete file

34 }
35
36 > func decodeVisibilityRecord(data []byte) (*archiverspb.VisibilityRecord, error) { util.go
37 > record := &archiverspb.VisibilityRecord{}
38 > encoder := codec.NewJSONPBEncoder()
39 > err := encoder.Decode(data, record)
40 > if err != nil {
41 return nil, err
42 }
43 > return record, nil util.go
44 }
45
181 func ensureContextTimeout(ctx context.Context) (context.Context, context.CancelFunc) {
182 if _, ok := ctx.Deadline(); ok {
183 > return ctx, func() {} util.go
184 }
185 return context.WithTimeout(ctx, defaultBlobstoreTimeout)
250 }
251
252 > func convertToExecutionInfo(record *archiverspb.VisibilityRecord, saTypeMap searchattribute.NameTypeMap) (*workflowpb.WorkflowExecutionInfo, error) { util.go
253 > searchAttributes, err := searchattribute.Parse(record.SearchAttributes, &saTypeMap)
254 > if err != nil {
255 return nil, err
256 }
257
258 > return &workflowpb.WorkflowExecutionInfo{ util.go
259 > Execution: &commonpb.WorkflowExecution{
260 > WorkflowId: record.GetWorkflowId(),
261 > RunId: record.GetRunId(),
262 > },
263 > Type: &commonpb.WorkflowType{
264 > Name: record.WorkflowTypeName,
265 > },
266 > StartTime: record.StartTime,
267 > ExecutionTime: record.ExecutionTime,
268 > CloseTime: record.CloseTime,
269 > ExecutionDuration: record.ExecutionDuration,
270 > Status: record.Status,
271 > HistoryLength: record.HistoryLength,
272 > Memo: record.Memo,
273 > SearchAttributes: searchAttributes,
274 > }, nil
275 }
go.temporal.io/server/common/archiver/s3store/visibility_archiver.go 12 introduced LOC · 7 ranges

Open complete file

334 }
335
336 > response := &archiver.QueryVisibilityResponse{} visibility_archiver.go
337 > if *results.IsTruncated {
338 response.NextPageToken = serializeQueryVisibilityToken(*results.NextContinuationToken)
339 }
340 > for _, item := range results.Contents { visibility_archiver.go
341 > if keyFilter != nil && !keyFilter(*item.Key) {
342 continue
343 }
344
345 > encodedRecord, err := Download(ctx, v.s3cli, uri, *item.Key) visibility_archiver.go
346 > if err != nil {
347 return nil, serviceerror.NewUnavailable(err.Error())
348 }
349
350 > record, err := decodeVisibilityRecord(encodedRecord) visibility_archiver.go
351 > if err != nil {
352 return nil, serviceerror.NewInternal(err.Error())
353 }
354 > executionInfo, err := convertToExecutionInfo(record, saTypeMap) visibility_archiver.go
355 > if err != nil {
356 return nil, serviceerror.NewInternal(err.Error())
357 }
358 > response.Executions = append(response.Executions, executionInfo) visibility_archiver.go
359 }
360 > return response, nil visibility_archiver.go
361 }
362