}
if err != nil || code == rejectCodePaused {
return nil, code, err
}
// This happens when the workflow task was rescheduled.
errorMessage := fmt.Sprintf(
Frontier kind: Code frontier
unlabeled · c_336e9f7d4e7a
3 tests · 8940 LOC · 227 files · introduces 0 tests · 72 LOC · 3 files
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.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/future/TestFutureSuite/TestGetWhenContextCanceledgo.temporal.io/server/common/future/TestFutureSuite/TestSetGetReady_Sequentialgo.temporal.io/server/common/future/TestFutureSuite/TestSetReadyGet_Parallelgo.temporal.io/server/common/future/TestFutureSuite/TestSetReadyGet_SequentialEvery collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
3 files ranked by introduced lines: 72 introduced LOC across 15 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
}
if err != nil || code == rejectCodePaused {
return nil, code, err
}
// This happens when the workflow task was rescheduled.
errorMessage := fmt.Sprintf(
}
wfDeployment := mutableState.GetEffectiveDeployment()
//nolint:staticcheck // SA1019 deprecated WorkerVersionCapabilities will clean up later
pollerDeployment, err := worker_versioning.DeploymentFromCapabilities(request.PollRequest.WorkerVersionCapabilities, request.PollRequest.DeploymentOptions)
if err != nil {
return nil, rejectCodeUndefined, err
}
err = worker_versioning.ValidateTaskVersionDirective(request.GetVersionDirective(), wfBehavior, wfDeployment, request.ScheduledDeployment)
api.go
if err != nil {
return nil, rejectCodeUndefined, err
}
// Can't start activity during a redirect. We reject this request so Matching drops
// the task. The activity will be rescheduled when the redirect completes/fails.
}
// Independent activities of pinned workflows are redirected. They should not start a transition on wf.
wfBehavior != enumspb.VERSIONING_BEHAVIOR_PINNED {
// AT of an unpinned workflow is redirected, see if a transition on the workflow should start.
// The workflow transition happens only if the workflow task of the same execution would go
// commands). On retries of this RPC, we return the stored clock from the early return
// path above.
if err != nil {
return nil, rejectCodeUndefined, err
}
versioningStamp := worker_versioning.StampFromCapabilities(request.PollRequest.WorkerVersionCapabilities, request.PollRequest.DeploymentOptions) //nolint:staticcheck // SA1019: WorkerVersionCapabilities is deprecated but still used for old versioning [cleanup-old-wv]
api.go
if _, err := mutableState.AddActivityTaskStartedEvent(
ai, scheduledEventID, requestID, request.PollRequest.GetIdentity(),
versioningStamp, pollerDeployment, request.GetBuildIdRedirectInfo(),
request.PollRequest.GetWorkerControlTaskQueue(),
clock,
); err != nil {
return nil, rejectCodeUndefined, err
}
scheduleToStartLatency := ai.GetStartedTime().AsTime().Sub(ai.GetScheduledTime().AsTime())
api.go
metrics.TaskScheduleToStartLatency.With(
metrics.GetPerTaskQueuePartitionTypeScope(
taggedMetrics,
namespaceName,
// passing the root partition all the time as we don't care about partition ID in this metric
tqid.UnsafeTaskQueueFamily(namespaceEntry.ID().String(),
ai.GetTaskQueue()).TaskQueue(enumspb.TASK_QUEUE_TYPE_ACTIVITY).RootPartition(),
shardContext.GetConfig().BreakdownMetricsByTaskQueue(namespaceName,
ai.GetTaskQueue(),
enumspb.TASK_QUEUE_TYPE_ACTIVITY),
),
).Record(scheduleToStartLatency)
response.Clock = clock
response.StartedTime = ai.StartedTime
response.Attempt = ai.Attempt
response.HeartbeatDetails = ai.LastHeartbeatDetails
response.Version = ai.Version
response.StartVersion = ai.StartVersion
response.WorkflowType = mutableState.GetWorkflowType()
response.WorkflowNamespace = namespaceName
response.RetryPolicy = &commonpb.RetryPolicy{
InitialInterval: ai.RetryInitialInterval,
BackoffCoefficient: ai.RetryBackoffCoefficient,
MaximumInterval: ai.RetryMaximumInterval,
MaximumAttempts: ai.RetryMaximumAttempts,
NonRetryableErrorTypes: ai.RetryNonRetryableErrorTypes,
}
return response, rejectCodeAccepted, nil
}
ms historyi.MutableState,
ai *persistencespb.ActivityInfo,
if ai.Stamp == request.Stamp && ai.Paused {
// this shouldn't happen. For now log an error
shardContext.GetLogger().Error(
// if activity is already paused or Stamp is not the same as the one in the request we shouldn't process workflow rules
// this is a no-op
return rejectCodeUndefined, nil
}
// We only need to process the first invocation of an activity.
// Other invocations should be blocked by either RetryActivity or retryTask.
return rejectCodeUndefined, nil
}
ruleMatched := workflow.ActivityMatchWorkflowRules(ms, shardContext.GetTimeSource(), shardContext.GetLogger(), ai)
api.go
if !ruleMatched || !ai.Paused {
return rejectCodeUndefined, nil
}
// activity was paused, need to update activity
}
func (x *RecordActivityTaskStartedRequest) GetBuildIdRedirectInfo() *v113.BuildIdRedirectInfo {
request_response.pb.go
if x != nil {
return x.BuildIdRedirectInfo
}
return nil
}
}
if x != nil {
return x.TaskQueue
}
return ""
}