From 1ff28d0fac3a6180572356fd8ceac0533c14a59e Mon Sep 17 00:00:00 2001 From: Stephan Behnke Date: Fri, 28 Aug 2026 08:35:16 -0700 Subject: [PATCH] Preserve legacy Nexus operation config settings --- docs/architecture/nexus.md | 6 +++--- service/frontend/service.go | 5 +++-- service/matching/config.go | 4 ++-- service/matching/matching_engine_test.go | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/architecture/nexus.md b/docs/architecture/nexus.md index 8944ceb0f0..5e322e573d 100644 --- a/docs/architecture/nexus.md +++ b/docs/architecture/nexus.md @@ -233,11 +233,11 @@ The circuit breaker is dynamically configurable via: ## Nexus Operations -The legacy HSM [`nexusoperations` package](../../service/history/hsm/nexusoperations) holds the logic for scheduling -Nexus Operations from a workflow and maintaining the Operations's lifecycle. +The [`nexusoperations` component](../../components/nexusoperations) holds all of the logic for scheduling Nexus +Operations from a workflow and maintaining the Operations's lifecycle. There are some other pieces of Nexus logic spread around other parts of the server (`common`, `frontend`, and -`matching`) but the legacy history service logic is almost completely contained in the package. +`matching`) but the history service logic is almost completely contained in the component. A Nexus Operation is modelled as a collection of state machines, tasks, and executors using the Hierarchical State Machine framework (docs TBD). diff --git a/service/frontend/service.go b/service/frontend/service.go index bc01160f16..2947b205e3 100644 --- a/service/frontend/service.go +++ b/service/frontend/service.go @@ -21,6 +21,7 @@ import ( "go.temporal.io/server/common/metrics" "go.temporal.io/server/common/persistence/visibility/manager" "go.temporal.io/server/common/retrypolicy" + "go.temporal.io/server/service/history/hsm/nexusoperations" "google.golang.org/grpc" "google.golang.org/grpc/health" healthpb "google.golang.org/grpc/health/grpc_health_v1" @@ -410,10 +411,10 @@ func NewConfig( CallbackURLMaxLength: dynamicconfig.FrontendCallbackURLMaxLength.Get(dc), CallbackHeaderMaxSize: dynamicconfig.FrontendCallbackHeaderMaxSize.Get(dc), MaxCallbacksPerWorkflow: dynamicconfig.MaxCallbacksPerWorkflow.Get(dc), - MaxNexusOperationTokenLength: chasmnexus.MaxOperationTokenLength.Get(dc), + MaxNexusOperationTokenLength: nexusoperations.MaxOperationTokenLength.Get(dc), NexusRequestHeadersBlacklist: dynamicconfig.FrontendNexusRequestHeadersBlacklist.Get(dc), NexusForwardRequestUseEndpoint: dynamicconfig.FrontendNexusForwardRequestUseEndpointDispatch.Get(dc), - NexusOperationsMetricTagConfig: chasmnexus.MetricTagConfiguration.Get(dc), + NexusOperationsMetricTagConfig: nexusoperations.MetricTagConfiguration.Get(dc), LinkMaxSize: dynamicconfig.FrontendLinkMaxSize.Get(dc), MaxLinksPerRequest: dynamicconfig.FrontendMaxLinksPerRequest.Get(dc), diff --git a/service/matching/config.go b/service/matching/config.go index 229a92e0b5..763bfb972f 100644 --- a/service/matching/config.go +++ b/service/matching/config.go @@ -6,11 +6,11 @@ package matching import ( "time" - "go.temporal.io/server/chasm/lib/nexusoperation" "go.temporal.io/server/common/backoff" "go.temporal.io/server/common/dynamicconfig" "go.temporal.io/server/common/namespace" "go.temporal.io/server/common/tqid" + "go.temporal.io/server/service/history/hsm/nexusoperations" "go.temporal.io/server/service/matching/counter" ) @@ -378,7 +378,7 @@ func NewConfig( ListNexusEndpointsLongPollTimeout: dynamicconfig.MatchingListNexusEndpointsLongPollTimeout.Get(dc), NexusEndpointsRefreshInterval: dynamicconfig.MatchingNexusEndpointsRefreshInterval.Get(dc), - MinDispatchTaskTimeout: nexusoperation.MinDispatchTaskTimeout.Get(dc), + MinDispatchTaskTimeout: nexusoperations.MinDispatchTaskTimeout.Get(dc), PollerScalingBacklogAgeScaleUp: dynamicconfig.MatchingPollerScalingBacklogAgeScaleUp.Get(dc), PollerScalingWaitTime: dynamicconfig.MatchingPollerScalingWaitTime.Get(dc), diff --git a/service/matching/matching_engine_test.go b/service/matching/matching_engine_test.go index 6ea6d223f7..93e82d09dc 100644 --- a/service/matching/matching_engine_test.go +++ b/service/matching/matching_engine_test.go @@ -40,7 +40,6 @@ import ( persistencespb "go.temporal.io/server/api/persistence/v1" taskqueuespb "go.temporal.io/server/api/taskqueue/v1" tokenspb "go.temporal.io/server/api/token/v1" - "go.temporal.io/server/chasm/lib/nexusoperation" "go.temporal.io/server/common" "go.temporal.io/server/common/cache" "go.temporal.io/server/common/clock" @@ -74,6 +73,7 @@ import ( "go.temporal.io/server/common/tqid" "go.temporal.io/server/common/worker_versioning" "go.temporal.io/server/service/history/consts" + "go.temporal.io/server/service/history/hsm/nexusoperations" "go.uber.org/mock/gomock" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/durationpb" @@ -4163,7 +4163,7 @@ func (s *matchingEngineSuite) TestPollWorkflowTaskQueueWithRateLimiterError() { func (s *matchingEngineSuite) TestDispatchNexusTask_ValidateTimeoutBuffer() { const ctxTimeout = 2 * time.Second - var defaultTimeoutBuffer = nexusoperation.MinDispatchTaskTimeout.Get(dynamicconfig.NewNoopCollection())("my-nsid") + var defaultTimeoutBuffer = nexusoperations.MinDispatchTaskTimeout.Get(dynamicconfig.NewNoopCollection())("my-nsid") type testCase struct { name string