api.go ×3

Frontier kind: Code frontier

unlabeled · c_6f503e22cc84

2 tests · 8478 LOC · 260 files · introduces 0 tests · 52 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges52 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1729 ranges8478 lines · 260 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.

2 files ranked by introduced lines: 52 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/startworkflow/api.go 38 introduced LOC · 3 ranges

Open complete file

805 }
806
807 > clock, err := shardCtx.NewVectorClock() api.go
808 > if err != nil {
809 return nil, err
810 }
811
812 > taskToken := tasktoken.NewWorkflowTaskToken( api.go
813 > s.namespace.ID().String(),
814 > workflowID,
815 > runID,
816 > workflowTaskInfo.ScheduledEventID,
817 > workflowTaskInfo.StartedEventID,
818 > timestamppb.New(workflowTaskInfo.StartedTime),
819 > workflowTaskInfo.Attempt,
820 > clock,
821 > workflowTaskInfo.Version,
822 > )
823 > serializedToken, err := tokenSerializer.Serialize(taskToken)
824 > if err != nil {
825 return nil, err
826 }
827 > return &historyservice.StartWorkflowExecutionResponse{ api.go
828 > RunId: runID,
829 > FirstExecutionRunId: firstExecutionRunID,
830 > Clock: clock,
831 > Started: true,
832 > Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
833 > Link: s.generateStartedEventRefLink(runID),
834 > EagerWorkflowTask: &workflowservice.PollWorkflowTaskQueueResponse{
835 > TaskToken: serializedToken,
836 > WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: workflowID, RunId: runID},
837 > WorkflowType: request.GetWorkflowType(),
838 > // TODO: consider getting the ID from mutable state, this was not done to avoid adding more complexity to
839 > // the code to plumb that value through.
840 > PreviousStartedEventId: 0,
841 > StartedEventId: workflowTaskInfo.StartedEventID,
842 > Attempt: workflowTaskInfo.Attempt,
843 > History: &historypb.History{Events: historyEvents},
844 > NextPageToken: nil,
845 > WorkflowExecutionTaskQueue: workflowTaskInfo.TaskQueue,
846 > ScheduledTime: timestamppb.New(workflowTaskInfo.ScheduledTime),
847 > StartedTime: timestamppb.New(workflowTaskInfo.StartedTime),
848 > },
849 > }, nil
850 }
851
go.temporal.io/server/service/history/api/create_workflow_util.go 14 introduced LOC · 1 range

Open complete file

104 // If first workflow task should back off (e.g. cron or workflow retry) a workflow task will not be scheduled.
105 if requestEagerExecution && newMutableState.HasPendingWorkflowTask() {
106 > // TODO: get build ID from Starter so eager workflows can be versioned create_workflow_util.go
107 > _, _, err = newMutableState.AddWorkflowTaskStartedEvent(
108 > scheduledEventID,
109 > startRequest.StartRequest.RequestId,
110 > startRequest.StartRequest.TaskQueue,
111 > startRequest.StartRequest.Identity,
112 > nil,
113 > nil,
114 > nil,
115 > false,
116 > nil,
117 > -1, // sentinel: eager-exec path didn't consult matching, has no routing revision
118 > )
119 > if err != nil {
120 // Unable to add WorkflowTaskStarted event to history
121 return nil, err