operation.go ×4

Frontier kind: Code frontier

unlabeled · c_a18fe2af1f07

17 tests · 3896 LOC · 153 files · introduces 0 tests · 55 LOC · 5 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges55 lines · 5 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
838 ranges3896 lines · 153 files · Browse complete extent
All tests (intent)
17 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.

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

go.temporal.io/server/chasm/lib/nexusoperation/operation.go 35 introduced LOC · 4 ranges

Open complete file

287 ctx chasm.Context,
288 _ chasm.NoValue,
289 > ) (startArgs, error) { operation.go
290 > var (
291 > invocationData InvocationData
292 > err error
293 > )
294 > if store, ok := o.Store.TryGet(ctx); ok {
295 > invocationData, err = store.NexusOperationInvocationData(ctx, o)
296 > if err != nil {
297 return startArgs{}, err
298 }
304 }
305 }
306 > invocationData.NexusLinks = append(invocationData.NexusLinks, operation.go
307 > commonnexus.ConvertLinkNexusOperationToNexusLink(&commonpb.Link_NexusOperation{
308 > Namespace: ctx.NamespaceEntry().Name().String(),
309 > OperationId: ctx.ExecutionKey().BusinessID,
310 > RunId: ctx.ExecutionKey().RunID,
311 > }))
312 >
313 > serializedRef, err := ctx.Ref(o)
314 > if err != nil {
315 return startArgs{}, err
316 }
317
318 > return startArgs{ operation.go
319 > endpointName: o.GetEndpoint(),
320 > endpointID: o.GetEndpointId(),
321 > service: o.GetService(),
322 > operation: o.GetOperation(),
323 > requestID: o.GetRequestId(),
324 > currentTime: ctx.Now(o),
325 > scheduledTime: o.GetScheduledTime().AsTime(),
326 > scheduleToCloseTimeout: o.GetScheduleToCloseTimeout().AsDuration(),
327 > scheduleToStartTimeout: o.GetScheduleToStartTimeout().AsDuration(),
328 > startToCloseTimeout: o.GetStartToCloseTimeout().AsDuration(),
329 > payload: invocationData.Input,
330 > header: maps.Clone(invocationData.Header),
331 > nexusLinks: invocationData.NexusLinks,
332 > serializedRef: serializedRef,
333 > }, nil
334 }
335
344 ctx chasm.MutableContext,
345 input saveInvocationResultInput,
346 > ) (chasm.NoValue, error) { operation.go
347 > switch r := input.result.(type) {
348 case invocationResultOK:
349 links := commonnexus.ConvertNexusLinksToProtoLinks(r.response.Links, ctx.Logger())
go.temporal.io/server/chasm/lib/nexusoperation/operation_tasks.go 10 introduced LOC · 4 ranges

Open complete file

74 attrs chasm.TaskAttributes,
75 task *nexusoperationpb.InvocationTask,
76 > ) error { operation_tasks.go
77 > ns, err := h.namespaceRegistry.GetNamespaceByID(namespace.ID(opRef.NamespaceID))
78 > if err != nil {
79 return serviceerror.NewNotFoundf("failed to get namespace by ID: %v", err)
80 }
81
82 > args, err := chasm.ReadComponent(ctx, opRef, (*Operation).loadStartArgs, nil) operation_tasks.go
83 > if err != nil {
84 return err
85 }
86
87 > endpoint, err := h.resolveEndpoint(ctx, ns, args) operation_tasks.go
88 > if err != nil {
89 if _, ok := errors.AsType[*serviceerror.NotFound](err); ok {
90 h.logger.Error("endpoint not found while processing invocation task", tag.Error(err))
225 ns *namespace.Namespace,
226 args startArgs,
227 > ) (*persistencespb.NexusEndpointEntry, error) { operation_tasks.go
228 > // Skip endpoint lookup for system-internal operations.
229 > if args.endpointName == commonnexus.SystemEndpoint {
230 return nil, nil
231 }
go.temporal.io/server/chasm/context_mock.go 4 introduced LOC · 1 range

Open complete file

90 }
91
92 > func (c *MockContext) Ref(cmp Component) ([]byte, error) { context_mock.go
93 > if c.HandleRef != nil {
94 > return c.HandleRef(cmp)
95 > }
96 return nil, nil
97 }
go.temporal.io/server/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go 4 introduced LOC · 1 range

Open complete file

354 }
355
356 > func (x *OperationState) GetScheduleToStartTimeout() *durationpb.Duration { operation.pb.go
357 > if x != nil {
358 > return x.ScheduleToStartTimeout
359 > }
360 return nil
361 }
go.temporal.io/server/chasm/lib/nexusoperation/task_handler_helpers.go 2 introduced LOC · 1 range

Open complete file

228 response *nexusrpc.ClientStartOperationResponse[*commonpb.Payload],
229 callErr error,
230 > ) (invocationResult, error) { task_handler_helpers.go
231 > if callErr == nil {
232 return invocationResultOK{response: response}, nil
233 }