get_history_util.go ×5

Frontier kind: Code frontier

unlabeled · c_375e556c04e2

2 tests · 3467 LOC · 181 files · introduces 0 tests · 20 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges20 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
535 ranges3467 lines · 181 files · Browse complete extent
All tests (intent)
2 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.

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

go.temporal.io/server/service/history/api/get_history_util.go 20 introduced LOC · 5 ranges

Open complete file

580 }
581 if fakeEvent != nil {
582 > history.Events[len(history.Events)-1] = fakeEvent get_history_util.go
583 > }
584 }
585 return nil
595 return nil, nil
596 }
597 > case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: get_history_util.go
598 > if lastEvent.GetWorkflowExecutionFailedEventAttributes().GetNewExecutionRunId() == "" {
599 return nil, nil
600 }
611 // the client looks at in this case, but copy the last result or failure from the real completed
612 // event just so it's clear what the result was.
613 > newAttrs := &historypb.WorkflowExecutionContinuedAsNewEventAttributes{} get_history_util.go
614 > switch lastEvent.EventType { // nolint:exhaustive
615 case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED:
616 attrs := lastEvent.GetWorkflowExecutionCompletedEventAttributes()
617 newAttrs.NewExecutionRunId = attrs.NewExecutionRunId
618 newAttrs.LastCompletionResult = attrs.Result
619 > case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: get_history_util.go
620 > attrs := lastEvent.GetWorkflowExecutionFailedEventAttributes()
621 > newAttrs.NewExecutionRunId = attrs.NewExecutionRunId
622 > newAttrs.Failure = attrs.Failure
623 case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT:
624 attrs := lastEvent.GetWorkflowExecutionTimedOutEventAttributes()
627 }
628
629 > return &historypb.HistoryEvent{ get_history_util.go
630 > EventId: lastEvent.EventId,
631 > EventTime: lastEvent.EventTime,
632 > EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW,
633 > Version: lastEvent.Version,
634 > TaskId: lastEvent.TaskId,
635 > Attributes: &historypb.HistoryEvent_WorkflowExecutionContinuedAsNewEventAttributes{
636 > WorkflowExecutionContinuedAsNewEventAttributes: newAttrs,
637 > },
638 > }, nil
639 }