server.go ×7

Frontier kind: Code frontier

unlabeled · c_ffb2022bbe36

16 tests · 120 LOC · 5 files · introduces 0 tests · 22 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges22 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
44 ranges120 lines · 5 files · Browse complete extent
All tests (intent)
16 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.

Introduced files, introduced tests, and structurally relevant concept specializationtransient_error · 0 introduced LOCtransient_errorfailure · 0 introduced LOCfailureexecutors.go ×1 · 2 introduced LOCexecutors.go ×1executors.go ×1 · 2 introduced LOCexecutors.go ×1executors.go ×1 · 2 introduced LOCexecutors.go ×1transient_error · 0 introduced LOCtransient_errorfailure · 0 introduced LOCfailuresuccess_with_headers · 0 introduced LOCsuccess_with_headerssuccess · 0 introduced LOCsuccesstask_handler_helpers.go ×2 · 3 introduced LOCtask_handler_helpers.go …executors.go ×4 · 12 introduced LOCexecutors.go ×4invocation_timeout_by_ScheduleToCloseTimeout · 0 introduced LOCinvocation_timeout_by_Sc…invocation_timeout_by_StartToCloseTimeout · 0 introduced LOCinvocation_timeout_by_St…success_with_headers · 0 introduced LOCsuccess_with_headerssuccess · 0 introduced LOCsuccessfailure_converter.go ×1 · 1 introduced LOCfailure_converter.go ×1handle.go ×1 · 5 introduced LOChandle.go ×1server.go ×1 · 3 introduced LOCserver.go ×1TestCancel_HandleFromStart · 0 introduced LOCTestCancel_HandleFromSta…TestCancel_RequestTimeoutHeaderOverridesContextDeadline · 0 introduced LOCTestCancel_RequestTimeou…TestCancel_HandleFromClient, TestCancel_ContextDeadlinePropagated · 0 introduced LOCTestCancel_HandleFromCli…TestCancel_TimeoutNotPropagated · 0 introduced LOCTestCancel_TimeoutNotPro…handle.go ×1 · 1 introduced LOChandle.go ×1handle.go ×2 · 3 introduced LOChandle.go ×2server.go ×1 · 1 introduced LOCserver.go ×1server.go ×8 · 25 introduced LOCserver.go ×8handle.go ×2 · 10 introduced LOChandle.go ×2client.go ×1 · 5 introduced LOCclient.go ×1api.go ×1 · 3 introduced LOCapi.go ×1client.go ×3 · 5 introduced LOCclient.go ×3client.go ×1 · 2 introduced LOCclient.go ×1client.go ×7 · 22 introduced LOCclient.go ×7server.go ×1 · 2 introduced LOCserver.go ×1server.go ×1 · 2 introduced LOCserver.go ×1server.go ×1 · 2 introduced LOCserver.go ×1server.go ×5 · 14 introduced LOCserver.go ×5api.go ×2 · 3 introduced LOCapi.go ×2failure_converter.go ×1 · 3 introduced LOCfailure_converter.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/chasm/lib/nexusoperation/task_handler_helpers.go · 380 LOCnexusoperation/task_hand…go.temporal.io/server/common/nexus/nexusrpc/api.go · 295 LOCnexusrpc/api.gogo.temporal.io/server/common/nexus/nexusrpc/client.go · 502 LOCnexusrpc/client.gogo.temporal.io/server/common/nexus/nexusrpc/failure_converter.go · 213 LOCnexusrpc/failure_convert…go.temporal.io/server/common/nexus/nexusrpc/handle.go · 49 LOCnexusrpc/handle.gogo.temporal.io/server/common/nexus/nexusrpc/server.go · 404 LOCnexusrpc/server.gogo.temporal.io/server/common/nexus/nexustest/server.go · 72 LOCnexustest/server.gogo.temporal.io/server/components/nexusoperations/executors.go · 1250 LOCnexusoperations/executor…failure · introduced test · go.temporal.io/server/chasm/lib/nexusoperation/TestCancellationInvocationTaskHandler_HTTP/failurefailureinvocation_timeout_by_ScheduleToCloseTimeout · introduced test · go.temporal.io/server/chasm/lib/nexusoperation/TestCancellationInvocationTaskHandler_HTTP/invocation_timeout_by_ScheduleToCloseTimeoutinvocation_timeout_by_Sc…invocation_timeout_by_StartToCloseTimeout · introduced test · go.temporal.io/server/chasm/lib/nexusoperation/TestCancellationInvocationTaskHandler_HTTP/invocation_timeout_by_StartToCloseTimeoutinvocation_timeout_by_St…success · introduced test · go.temporal.io/server/chasm/lib/nexusoperation/TestCancellationInvocationTaskHandler_HTTP/successsuccesssuccess_with_headers · introduced test · go.temporal.io/server/chasm/lib/nexusoperation/TestCancellationInvocationTaskHandler_HTTP/success_with_headerssuccess_with_headerstransient_error · introduced test · go.temporal.io/server/chasm/lib/nexusoperation/TestCancellationInvocationTaskHandler_HTTP/transient_errortransient_errorTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestCancel_ContextDeadlinePropagated · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestCancel_ContextDeadlinePropagatedTestCancel_ContextDeadli…TestCancel_HandleFromClient · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestCancel_HandleFromClientTestCancel_HandleFromCli…TestCancel_HandleFromStart · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestCancel_HandleFromStartTestCancel_HandleFromSta…TestCancel_RequestTimeoutHeaderOverridesContextDeadline · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestCancel_RequestTimeoutHeaderOverridesContextDeadlineTestCancel_RequestTimeou…TestCancel_TimeoutNotPropagated · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestCancel_TimeoutNotPropagatedTestCancel_TimeoutNotPro…failure · introduced test · go.temporal.io/server/components/nexusoperations/TestProcessCancelationTask/failurefailureinvocation_timeout · introduced test · go.temporal.io/server/components/nexusoperations/TestProcessCancelationTask/invocation_timeoutinvocation_timeoutsuccess · introduced test · go.temporal.io/server/components/nexusoperations/TestProcessCancelationTask/successsuccesssuccess_with_headers · introduced test · go.temporal.io/server/components/nexusoperations/TestProcessCancelationTask/success_with_headerssuccess_with_headerstransient_error · introduced test · go.temporal.io/server/components/nexusoperations/TestProcessCancelationTask/transient_errortransient_errorFocused concept · server.go ×7 · 22 introduced LOCserver.go ×7

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.

1 file ranked by introduced lines: 22 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/nexus/nexusrpc/server.go 22 introduced LOC · 7 ranges

Open complete file

245 }
246
247 > func (h *httpHandler) cancelOperation(service, operation, token string, writer http.ResponseWriter, request *http.Request) { server.go
248 > options := nexus.CancelOperationOptions{Header: httpHeaderToNexusHeader(request.Header)}
249 >
250 > ctx, cancel, ok := h.contextWithTimeoutFromHTTPRequest(writer, request)
251 > if !ok {
252 return
253 }
254 > defer cancel() server.go
255 >
256 > ctx = nexus.WithHandlerContext(ctx, nexus.HandlerInfo{
257 > Service: service,
258 > Operation: operation,
259 > Header: options.Header,
260 > })
261 > if err := h.options.Handler.CancelOperation(ctx, service, operation, token, options); err != nil {
262 h.WriteFailure(writer, request, err)
263 return
348 // Handle deprecated /{service}/{operation}/{operation_token}/cancel
349 // TODO(bergundy): remove in server release v1.31.0
350 > if len(parts) == 5 && parts[4] == "cancel" { server.go
351 token, err := url.PathUnescape(parts[3])
352 if err != nil {
359 }
360
361 > if len(parts) != 4 || parts[3] != "cancel" { server.go
362 h.WriteFailure(writer, request, nexus.NewHandlerErrorf(nexus.HandlerErrorTypeNotFound, "not found"))
363 return
364 }
365
366 > token := request.Header.Get(nexus.HeaderOperationToken) server.go
367 > if token == "" {
368 token = request.URL.Query().Get("token")
369 if token == "" {
371 return
372 }
373 > } else { server.go
374 > // Sanitize this header as it is explicitly passed in as an argument.
375 > request.Header.Del(nexus.HeaderOperationToken)
376 > }
377
378 > h.cancelOperation(service, operation, token, writer, request) server.go
379 }
380