api.go ×4

Frontier kind: Code frontier

unlabeled · c_f19fbdc2cdfb

5 tests · 9858 LOC · 262 files · introduces 0 tests · 32 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges32 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2147 ranges9858 lines · 262 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: 32 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/respondactivitytaskcanceled/api.go 30 introduced LOC · 4 ranges

Open complete file

84
85 // sanity check if activity is requested to be cancelled
86 > if !ai.CancelRequested { api.go
87 return nil, consts.ErrActivityTaskNotCancelRequested
88 }
89
90 > if _, err := mutableState.AddActivityTaskCanceledEvent( api.go
91 > scheduledEventID,
92 > ai.StartedEventId,
93 > ai.CancelRequestId,
94 > request.Details,
95 > request.Identity); err != nil {
96 // Unable to add ActivityTaskCanceled event to history
97 return nil, err
98 }
99
100 > attemptStartedTime = timestamp.TimeValue(ai.StartedTime) api.go
101 > firstScheduledTime = timestamp.TimeValue(ai.FirstScheduledTime)
102 > taskQueue = ai.TaskQueue
103 > versioningBehavior = mutableState.GetEffectiveVersioningBehavior()
104 > return &api.UpdateWorkflowAction{
105 > Noop: false,
106 > CreateWorkflowTask: true,
107 > }, nil
108 },
109 nil,
113
114 if err == nil {
115 > workflow.RecordActivityCompletionMetrics( api.go
116 > shard,
117 > namespaceName,
118 > taskQueue,
119 > workflow.ActivityCompletionMetrics{
120 > Status: workflow.ActivityStatusCanceled,
121 > AttemptStartedTime: attemptStartedTime,
122 > FirstScheduledTime: firstScheduledTime,
123 > Closed: true,
124 > },
125 > metrics.OperationTag(metrics.HistoryRespondActivityTaskCanceledScope),
126 > metrics.WorkflowTypeTag(workflowTypeName),
127 > metrics.ActivityTypeTag(token.ActivityType),
128 > metrics.VersioningBehaviorTag(versioningBehavior))
129 > }
130 return &historyservice.RespondActivityTaskCanceledResponse{}, err
131 }
go.temporal.io/server/service/history/workflow/metrics.go 2 introduced LOC · 1 range

Open complete file

222 metrics.ActivityFail.With(metricsHandler).Record(1)
223 }
224 > case ActivityStatusCanceled: metrics.go
225 > metrics.ActivityCancel.With(metricsHandler).Record(1)
226 case ActivityStatusSucceeded:
227 metrics.ActivitySuccess.With(metricsHandler).Record(1)