cancellation_tasks.go ×6

Frontier kind: Code frontier

unlabeled · c_a92caf185fc8

14 tests · 2830 LOC · 136 files · introduces 0 tests · 30 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges30 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
476 ranges2830 lines · 136 files · Browse complete extent
All tests (intent)
14 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.

3 files ranked by introduced lines: 30 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/lib/nexusoperation/cancellation_tasks.go 22 introduced LOC · 6 ranges

Open complete file

41 func (cancellationResultRetry) mustImplementCancellationResult() {}
42
43 > func newCancellationResult(callErr error) (cancellationResult, error) { cancellation_tasks.go
44 > if callErr == nil {
45 return cancellationResultOK{}, nil
46 }
101 attrs chasm.TaskAttributes,
102 task *nexusoperationpb.CancellationTask,
103 > ) error { cancellation_tasks.go
104 > ns, err := h.namespaceRegistry.GetNamespaceByID(namespace.ID(cancelRef.NamespaceID))
105 > if err != nil {
106 return serviceerror.NewNotFoundf("failed to get namespace by ID: %v", err)
107 }
108
109 > args, err := chasm.ReadComponent(ctx, cancelRef, (*Cancellation).loadArgs, nil) cancellation_tasks.go
110 > if err != nil {
111 return err
112 }
113
114 > endpoint, err := h.lookupEndpoint(ctx, ns.ID(), args.endpointID, args.endpointName) cancellation_tasks.go
115 > if err != nil {
116 if _, ok := errors.AsType[*serviceerror.NotFound](err); ok {
117 h.logger.Error("endpoint not found while processing cancellation invocation", tag.Error(err))
180 cancelRef chasm.ComponentRef,
181 callErr error,
182 > ) error { cancellation_tasks.go
183 > result, err := newCancellationResult(callErr)
184 > if err != nil {
185 return fmt.Errorf("failed to construct cancellation result: %w", err)
186 }
187 > _, _, err = chasm.UpdateComponent( cancellation_tasks.go
188 > ctx,
189 > cancelRef,
190 > (*Cancellation).saveResult,
191 > saveCancellationResultInput{
192 > result: result,
193 > retryPolicy: h.config.RetryPolicy,
194 > },
195 > )
196 > return err
197 }
198
go.temporal.io/server/chasm/lib/nexusoperation/cancellation.go 5 introduced LOC · 2 ranges

Open complete file

99 var invocationData InvocationData
100 if store, ok := op.Store.TryGet(ctx); ok {
101 > var err error cancellation.go
102 > invocationData, err = store.NexusOperationInvocationData(ctx, op)
103 > if err != nil {
104 return cancelArgs{}, err
105 }
139 ctx chasm.MutableContext,
140 input saveCancellationResultInput,
141 > ) (chasm.NoValue, error) { cancellation.go
142 > switch r := input.result.(type) {
143 case cancellationResultOK:
144 return nil, c.onCompleted(ctx)
go.temporal.io/server/chasm/lib/nexusoperation/task_handler_base.go 3 introduced LOC · 1 range

Open complete file

143 // In that case, the ID stored in the operation state becomes stale, but the name-based lookup still resolves correctly.
144 // Returns a nil entry if the endpoint name is the system nexus endpoint.
145 > func (b *nexusTaskHandlerBase) lookupEndpoint(ctx context.Context, namespaceID namespace.ID, endpointID, endpointName string) (*persistencespb.NexusEndpointEntry, error) { task_handler_base.go
146 > // Skip endpoint lookup for system-internal operations.
147 > if endpointName == commonnexus.SystemEndpoint {
148 return nil, nil
149 }