From eb47bd77c0c3218987858f87e0421ced4b881b03 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Fri, 31 Jul 2026 23:06:27 -0400 Subject: [PATCH 1/2] Drop reset_attempts and reset_heartbeat from UnpauseActivityExecution Unpause resumes an activity; it should not also mutate the attempt counter or discard the heartbeat checkpoint. An operator wanting either would look for it on Reset, which offers both. Ship the simple API first. Picks up temporalio/api-go simplify-activity-unpause, which removes the two fields from UnpauseActivityExecutionRequest. The deprecated UnpauseActivity keeps them, so TestActivityPauseApi_WithReset now runs only against that API. Removing the reset_attempts branch also fixes a defect it carried: unpauseDispatchTime skipped dispatchTimeForRetry when the flag was set, so an operator could defeat a retry backoff by pausing and unpausing. go build ./... && go vet -tags test_dep ./... && go test ./chasm/lib/activity/... Extend the unpause simplification to the workflow-activity API Drops reset_attempts and reset_heartbeat from the deprecated UnpauseActivity and from the unpause batch operation, so unpause means the same thing on every surface: it resumes an activity, and Reset is the operation that restarts it as if on its first attempt. workflow.UnpauseActivity loses both parameters with them. TestActivityPauseApi_WithReset goes too: no unpause API can restart attempts now, so the case it covered no longer exists. ActivityInfo.reset_heartbeats stays: it is written by the Reset path, which keeps its own reset_heartbeat flag. go build ./... && go vet -tags test_dep ./... && go test ./chasm/lib/activity/... ./service/history/api/unpauseactivity/... ./service/worker/batcher/... Revert "Extend the unpause simplification to the workflow-activity API" This reverts commit 829508230a8c177ff4e5a0bcd0fefedd1eb577c1. update api commit --- chasm/lib/activity/activity.go | 13 +- chasm/lib/activity/handler.go | 8 +- go.mod | 2 +- go.sum | 4 +- tests/activity_api_pause_test.go | 46 ++++--- tests/activity_standalone_test.go | 216 ------------------------------ 6 files changed, 37 insertions(+), 252 deletions(-) diff --git a/chasm/lib/activity/activity.go b/chasm/lib/activity/activity.go index 3221476f65d..ff277fdfc3a 100644 --- a/chasm/lib/activity/activity.go +++ b/chasm/lib/activity/activity.go @@ -1071,14 +1071,6 @@ func (a *Activity) unpause( dispatchTime := a.unpauseDispatchTime(ctx, event) attempt.DispatchTime = timestamppb.New(dispatchTime) - if event.req.GetResetAttempts() { - attempt.Count = 1 - attempt.CurrentRetryInterval = nil - attempt.CurrentRetryIntervalSource = activitypb.ACTIVITY_RETRY_INTERVAL_SOURCE_UNSPECIFIED - } - if event.req.GetResetHeartbeat() { - a.LastHeartbeat = chasm.NewDataField(ctx, &activitypb.ActivityHeartbeatState{}) - } attempt.Stamp++ if timeout := a.GetScheduleToStartTimeout().AsDuration(); timeout > 0 { ctx.AddTask( @@ -1099,10 +1091,7 @@ func (a *Activity) unpauseDispatchTime(ctx chasm.MutableContext, event unpauseEv unpauseTime = unpauseTime.Add(time.Duration(rand.Int63n(int64(jitter)))) //nolint:gosec } dispatchTime := a.dispatchTimeRespectingStartDelay(unpauseTime) - var retryDispatchTime *timestamppb.Timestamp - if !event.req.GetResetAttempts() { - retryDispatchTime = dispatchTimeForRetry(a.LastAttempt.Get(ctx)) - } + retryDispatchTime := dispatchTimeForRetry(a.LastAttempt.Get(ctx)) if retryDispatchTime != nil && retryDispatchTime.AsTime().After(dispatchTime) { return retryDispatchTime.AsTime() } diff --git a/chasm/lib/activity/handler.go b/chasm/lib/activity/handler.go index 5dae595ac33..6c1a78fe974 100644 --- a/chasm/lib/activity/handler.go +++ b/chasm/lib/activity/handler.go @@ -422,11 +422,9 @@ func (h *handler) UnpauseActivityExecution(ctx context.Context, req *activitypb. WorkflowId: frontendReq.GetWorkflowId(), RunId: frontendReq.GetRunId(), }, - Activity: &workflowservice.UnpauseActivityRequest_Id{Id: frontendReq.GetActivityId()}, - Jitter: frontendReq.GetJitter(), - ResetAttempts: frontendReq.GetResetAttempts(), - ResetHeartbeat: frontendReq.GetResetHeartbeat(), - Identity: frontendReq.GetIdentity(), + Activity: &workflowservice.UnpauseActivityRequest_Id{Id: frontendReq.GetActivityId()}, + Jitter: frontendReq.GetJitter(), + Identity: frontendReq.GetIdentity(), }, }) if err != nil { diff --git a/go.mod b/go.mod index 1a31431f3f3..f980cdd0da5 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( go.opentelemetry.io/otel/sdk v1.43.0 go.opentelemetry.io/otel/sdk/metric v1.43.0 go.opentelemetry.io/otel/trace v1.44.0 - go.temporal.io/api v1.63.5-0.20260731164320-beafdd4b0d8f + go.temporal.io/api v1.63.5-0.20260803183639-0e1e8c485f37 go.temporal.io/auto-scaled-workers v0.0.0-20260706201056-4320b34799ee go.temporal.io/sdk v1.44.0 go.uber.org/fx v1.24.0 diff --git a/go.sum b/go.sum index 1b669714b55..0eb35819c93 100644 --- a/go.sum +++ b/go.sum @@ -479,8 +479,8 @@ go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.3.0 h1:R go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.3.0/go.mod h1:I89cynRj8y+383o7tEQVg2SVA6SRgDVIouWPUVXjx0U= go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.3.0 h1:CQvJSldHRUN6Z8jsUeYv8J0lXRvygALXIzsmAeCcZE0= go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.3.0/go.mod h1:xSQ+mEfJe/GjK1LXEyVOoSI1N9JV9ZI923X5kup43W4= -go.temporal.io/api v1.63.5-0.20260731164320-beafdd4b0d8f h1:n/cM2e930fSKURv5NSlvx0LaXEpyQY06Uo5MizOKYhU= -go.temporal.io/api v1.63.5-0.20260731164320-beafdd4b0d8f/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ= +go.temporal.io/api v1.63.5-0.20260803183639-0e1e8c485f37 h1:ZDICI5Hxc97YsjpE6/WREWkUqQ7qq+ntTH+IbOuTxNw= +go.temporal.io/api v1.63.5-0.20260803183639-0e1e8c485f37/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ= go.temporal.io/auto-scaled-workers v0.0.0-20260706201056-4320b34799ee h1:y6A65Iml06cR3CpxW2Zn8FQLjniPDTnN4jtr69UZxXI= go.temporal.io/auto-scaled-workers v0.0.0-20260706201056-4320b34799ee/go.mod h1:hhHijO9XRPIkAflLJJHix61M9FzbRPqk8fSydkcLkqw= go.temporal.io/sdk v1.44.0 h1:suitPDukX74rW3/N1FqvEbZTZVJJsxMKhv0KMa/j7pU= diff --git a/tests/activity_api_pause_test.go b/tests/activity_api_pause_test.go index ec938c5f3ba..2e89dd8c6d7 100644 --- a/tests/activity_api_pause_test.go +++ b/tests/activity_api_pause_test.go @@ -37,7 +37,10 @@ import ( type activityPauseAPI struct { name string pause func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity, reason, requestID string) error - unpause func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string, resetAttempts bool) error + unpause func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string) error + // unpauseResettingAttempts is nil on an API with no reset_attempts flag. Only the deprecated + // UnpauseActivity has one; UnpauseActivityExecution deliberately does not. + unpauseResettingAttempts func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string) error } func pauseAPIs() []activityPauseAPI { @@ -55,13 +58,22 @@ func pauseAPIs() []activityPauseAPI { }) return err }, - unpause: func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string, resetAttempts bool) error { + unpause: func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string) error { + _, err := s.FrontendClient().UnpauseActivity(ctx, &workflowservice.UnpauseActivityRequest{ + Namespace: s.Namespace().String(), + Execution: &commonpb.WorkflowExecution{WorkflowId: wfID}, + Activity: &workflowservice.UnpauseActivityRequest_Id{Id: actID}, + Identity: identity, + }) + return err + }, + unpauseResettingAttempts: func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string) error { _, err := s.FrontendClient().UnpauseActivity(ctx, &workflowservice.UnpauseActivityRequest{ Namespace: s.Namespace().String(), Execution: &commonpb.WorkflowExecution{WorkflowId: wfID}, Activity: &workflowservice.UnpauseActivityRequest_Id{Id: actID}, Identity: identity, - ResetAttempts: resetAttempts, + ResetAttempts: true, }) return err }, @@ -79,13 +91,12 @@ func pauseAPIs() []activityPauseAPI { }) return err }, - unpause: func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string, resetAttempts bool) error { + unpause: func(ctx context.Context, s *testcore.TestEnv, wfID, actID, identity string) error { _, err := s.FrontendClient().UnpauseActivityExecution(ctx, &workflowservice.UnpauseActivityExecutionRequest{ - Namespace: s.Namespace().String(), - WorkflowId: wfID, - ActivityId: actID, - Identity: identity, - ResetAttempts: resetAttempts, + Namespace: s.Namespace().String(), + WorkflowId: wfID, + ActivityId: actID, + Identity: identity, }) return err }, @@ -211,7 +222,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { s.Equal(testReason, description.PendingActivities[0].PauseInfo.GetManual().Reason) // unpause the activity - require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "", false)) + require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "")) var out string err = workflowRun.Get(ctx, &out) @@ -329,7 +340,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { shouldSucceed.Store(true) // unpause the activity - require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "", false)) + require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "")) // wait for activity to complete await.Require(t.Context(), t, func(t *await.T) { @@ -425,7 +436,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { s.Equal(testReason, description.PendingActivities[0].PauseInfo.GetManual().Reason) // unpause the activity - require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "", false)) + require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "")) // wait for activity to complete await.Require(t.Context(), t, func(t *await.T) { @@ -505,7 +516,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { require.NoError(t, api.pause(ctx, s, workflowRun.GetID(), "activity-id", "", "", testRequestID)) // unpause the activity - require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "", false)) + require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "")) // wait for activity to complete. It should happen immediately since noWait is set await.Require(t.Context(), t, func(t *await.T) { @@ -520,6 +531,9 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { t.Run("TestActivityPauseApi_WithReset", func(t *testing.T) { // pause/unpause the activity with reset option and noWait flag + if api.unpauseResettingAttempts == nil { + t.Skip("this API has no reset_attempts flag on unpause; Reset is the operation that restarts attempts") + } s := testcore.NewEnv(t) initialRetryInterval := 1 * time.Second @@ -599,7 +613,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { activityWasReset = true // unpause the activity with reset - require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "", true)) + require.NoError(t, api.unpauseResettingAttempts(ctx, s, workflowRun.GetID(), "activity-id", "")) // wait for activity to be running await.Require(t.Context(), t, func(t *await.T) { @@ -739,7 +753,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { s.Equal(testReason, description.PendingActivities[0].PauseInfo.GetManual().Reason) // unpause the activity - require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "", false)) + require.NoError(t, api.unpause(ctx, s, workflowRun.GetID(), "activity-id", "")) var out string err = workflowRun.Get(ctx, &out) @@ -920,7 +934,7 @@ func TestActivityApiPauseClientTestSuite(t *testing.T) { // step 4: unpause activityWasReset.Store(true) - require.NoError(t, api.unpause(ctx, s, wfID, "activity-id", "", false)) + require.NoError(t, api.unpause(ctx, s, wfID, "activity-id", "")) await.Require(t.Context(), t, func(c *await.T) { desc, err := s.SdkClient().DescribeWorkflowExecution(ctx, workflowRun.GetID(), workflowRun.GetRunID()) diff --git a/tests/activity_standalone_test.go b/tests/activity_standalone_test.go index f2ab2737d0b..a3082609cca 100644 --- a/tests/activity_standalone_test.go +++ b/tests/activity_standalone_test.go @@ -12261,106 +12261,6 @@ func (s *standaloneActivityTestSuite) TestUnpauseActivityExecution() { require.Equal(t, enumspb.PENDING_ACTIVITY_STATE_PAUSED, descResp.GetInfo().GetRunState()) }) - t.Run("UnpauseWithResetAttempts", func(t *testing.T) { - ctx := testcore.NewContext() - - activityID := testcore.RandomizeStr(t.Name()) - taskQueue := testcore.RandomizeStr(t.Name()) - - startResp, err := env.FrontendClient().StartActivityExecution(ctx, &workflowservice.StartActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - ActivityType: env.Tv().ActivityType(), - Identity: env.Tv().WorkerIdentity(), - Input: defaultInput, - TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue}, - StartToCloseTimeout: durationpb.New(defaultStartToCloseTimeout), - RequestId: env.Tv().RequestID(), - RetryPolicy: &commonpb.RetryPolicy{ - MaximumAttempts: 10, - InitialInterval: durationpb.New(30 * time.Second), - BackoffCoefficient: 1.0, - }, - }) - require.NoError(t, err) - - // Poll and fail the first attempt to advance the attempt count. - pollResp, err := env.FrontendClient().PollActivityTaskQueue(ctx, &workflowservice.PollActivityTaskQueueRequest{ - Namespace: env.Namespace().String(), - TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, - Identity: env.Tv().WorkerIdentity(), - }) - require.NoError(t, err) - require.EqualValues(t, 1, pollResp.Attempt) - - _, err = env.FrontendClient().RespondActivityTaskFailed(ctx, &workflowservice.RespondActivityTaskFailedRequest{ - Namespace: env.Namespace().String(), - TaskToken: pollResp.TaskToken, - Failure: &failurepb.Failure{ - Message: "retryable failure", - FailureInfo: &failurepb.Failure_ApplicationFailureInfo{ - ApplicationFailureInfo: &failurepb.ApplicationFailureInfo{NonRetryable: false}, - }, - }, - Identity: env.Tv().WorkerIdentity(), - }) - require.NoError(t, err) - - // Wait for the activity to enter SCHEDULED state for retry. - await.Require(ctx, t, func(c *await.T) { - descResp, descErr := env.FrontendClient().DescribeActivityExecution(c.Context(), &workflowservice.DescribeActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - }) - require.NoError(c, descErr) - require.EqualValues(c, 2, descResp.GetInfo().GetAttempt()) - }, 15*time.Second, 200*time.Millisecond) - - // Pause while SCHEDULED (attempt=2). - _, err = env.FrontendClient().PauseActivityExecution(ctx, &workflowservice.PauseActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - Identity: "test-identity", - Reason: "test-pause", - }) - require.NoError(t, err) - - // Unpause with ResetAttempts=true. - _, err = env.FrontendClient().UnpauseActivityExecution(ctx, &workflowservice.UnpauseActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - Identity: "test-identity", - ResetAttempts: true, - }) - require.NoError(t, err) - - // Force dispatch reissue before polling. ResetAttempts must clear the old retry backoff, - // otherwise this update would re-delay the reset attempt. - _, err = env.FrontendClient().UpdateActivityExecutionOptions( - ctx, - &workflowservice.UpdateActivityExecutionOptionsRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - RunId: startResp.GetRunId(), - ActivityOptions: &activitypb.ActivityOptions{ - HeartbeatTimeout: durationpb.New(time.Second), - }, - UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"heartbeat_timeout"}}, - }) - require.NoError(t, err) - - // Poll: attempt count should be reset to 1 without waiting for the old 30s retry backoff. - pollCtx, pollCancel := context.WithTimeout(ctx, 5*time.Second) - defer pollCancel() - poll2Resp, err := env.FrontendClient().PollActivityTaskQueue(pollCtx, &workflowservice.PollActivityTaskQueueRequest{ - Namespace: env.Namespace().String(), - TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, - Identity: env.Tv().WorkerIdentity(), - }) - require.NoError(t, err) - require.EqualValues(t, 1, poll2Resp.Attempt, "expected attempt reset to 1 after UnpauseWithResetAttempts") - }) - t.Run("UnpauseWithJitter", func(t *testing.T) { ctx := testcore.NewContext() @@ -12440,122 +12340,6 @@ func (s *standaloneActivityTestSuite) TestUnpauseActivityExecution() { require.ErrorAs(t, err, &failedPreconditionErr) }) - // UnpauseWithResetHeartbeat: verify that unpause with reset_heartbeat=true clears heartbeat - // details recorded during a prior attempt. - t.Run("UnpauseWithResetHeartbeat", func(t *testing.T) { - ctx := testcore.NewContext() - activityID := testcore.RandomizeStr(t.Name()) - taskQueue := testcore.RandomizeStr(t.Name()) - - _, err := env.FrontendClient().StartActivityExecution(ctx, &workflowservice.StartActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - ActivityType: env.Tv().ActivityType(), - Identity: env.Tv().WorkerIdentity(), - Input: defaultInput, - TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue}, - StartToCloseTimeout: durationpb.New(defaultStartToCloseTimeout), - RequestId: env.Tv().RequestID(), - RetryPolicy: &commonpb.RetryPolicy{ - MaximumAttempts: 10, - InitialInterval: durationpb.New(30 * time.Second), - BackoffCoefficient: 1.0, - }, - }) - require.NoError(t, err) - - // Poll attempt 1. - pollResp, err := env.FrontendClient().PollActivityTaskQueue(ctx, &workflowservice.PollActivityTaskQueueRequest{ - Namespace: env.Namespace().String(), - TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, - Identity: env.Tv().WorkerIdentity(), - }) - require.NoError(t, err) - require.EqualValues(t, 1, pollResp.Attempt) - - // Record a heartbeat with details. - _, err = env.FrontendClient().RecordActivityTaskHeartbeat(ctx, &workflowservice.RecordActivityTaskHeartbeatRequest{ - Namespace: env.Namespace().String(), - TaskToken: pollResp.TaskToken, - Details: defaultHeartbeatDetails, - }) - require.NoError(t, err) - - // Fail attempt 1 — activity enters 30s retry backoff at attempt 2. - _, err = env.FrontendClient().RespondActivityTaskFailed(ctx, &workflowservice.RespondActivityTaskFailedRequest{ - Namespace: env.Namespace().String(), - TaskToken: pollResp.TaskToken, - Failure: &failurepb.Failure{ - Message: "retryable failure", - FailureInfo: &failurepb.Failure_ApplicationFailureInfo{ - ApplicationFailureInfo: &failurepb.ApplicationFailureInfo{NonRetryable: false}, - }, - }, - Identity: env.Tv().WorkerIdentity(), - }) - require.NoError(t, err) - - // Wait for attempt 2 (count increments immediately on reschedule, even during backoff). - await.Require(ctx, t, func(c *await.T) { - dr, dErr := env.FrontendClient().DescribeActivityExecution(c.Context(), &workflowservice.DescribeActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - }) - require.NoError(c, dErr) - require.EqualValues(c, 2, dr.GetInfo().GetAttempt()) - }, 10*time.Second, 200*time.Millisecond) - - // Heartbeat details should still be set before the unpause. - descResp, err := env.FrontendClient().DescribeActivityExecution(ctx, &workflowservice.DescribeActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - IncludeHeartbeatDetails: true, - }) - require.NoError(t, err) - require.NotNil(t, descResp.GetInfo().GetLastHeartbeatTime(), "expected heartbeat time before unpause") - require.NotNil(t, descResp.GetInfo().GetHeartbeatDetails(), "expected heartbeat details before unpause") - - // Pause while SCHEDULED (in 30s backoff). - _, err = env.FrontendClient().PauseActivityExecution(ctx, &workflowservice.PauseActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - Identity: "test-identity", - Reason: "test-pause", - }) - require.NoError(t, err) - - // Unpause with ResetHeartbeat=true — clears the recorded heartbeat state. - _, err = env.FrontendClient().UnpauseActivityExecution(ctx, &workflowservice.UnpauseActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - Identity: "test-identity", - ResetHeartbeat: true, - }) - require.NoError(t, err) - - // Heartbeat details must be cleared after unpause. - descResp, err = env.FrontendClient().DescribeActivityExecution(ctx, &workflowservice.DescribeActivityExecutionRequest{ - Namespace: env.Namespace().String(), - ActivityId: activityID, - IncludeHeartbeatDetails: true, - }) - require.NoError(t, err) - require.Nil(t, descResp.GetInfo().GetLastHeartbeatTime(), - "expected heartbeat time cleared after UnpauseWithResetHeartbeat") - require.Nil(t, descResp.GetInfo().GetHeartbeatDetails(), - "expected heartbeat details cleared after UnpauseWithResetHeartbeat") - - // Poll attempt 2 — heartbeat details must be nil in the poll response too. - poll2Resp, err := env.FrontendClient().PollActivityTaskQueue(ctx, &workflowservice.PollActivityTaskQueueRequest{ - Namespace: env.Namespace().String(), - TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, - Identity: env.Tv().WorkerIdentity(), - }) - require.NoError(t, err) - require.Equal(t, activityID, poll2Resp.GetActivityId()) - require.Nil(t, poll2Resp.GetHeartbeatDetails(), "expected nil heartbeat details in poll after reset") - }) - // Issuing Unpause on a CANCEL_REQUESTED activity is a no-op. t.Run("UnpauseWhileCancelRequested", func(t *testing.T) { ctx := testcore.NewContext() From 7a41d507ca3bc0bc34139c83ded309867d35dc48 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Mon, 3 Aug 2026 15:27:17 -0400 Subject: [PATCH 2/2] Sync tests/mixedbrain go.mod with root go.temporal.io/api bump --- tests/mixedbrain/go.mod | 2 +- tests/mixedbrain/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/mixedbrain/go.mod b/tests/mixedbrain/go.mod index 9081bd3bd90..5f76cd02f45 100644 --- a/tests/mixedbrain/go.mod +++ b/tests/mixedbrain/go.mod @@ -7,7 +7,7 @@ require ( github.com/siderolabs/grpc-proxy v0.5.2 github.com/stretchr/testify v1.11.1 github.com/temporalio/omes v0.0.0-20260529203146-c6ee1f56c726 - go.temporal.io/api v1.63.5-0.20260731164320-beafdd4b0d8f + go.temporal.io/api v1.63.5-0.20260803183639-0e1e8c485f37 go.temporal.io/server v0.0.0-00010101000000-000000000000 google.golang.org/grpc v1.80.0 google.golang.org/protobuf v1.36.11 diff --git a/tests/mixedbrain/go.sum b/tests/mixedbrain/go.sum index c40425aefcd..d9ba3b8014a 100644 --- a/tests/mixedbrain/go.sum +++ b/tests/mixedbrain/go.sum @@ -55,8 +55,8 @@ go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfC go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= -go.temporal.io/api v1.63.5-0.20260731164320-beafdd4b0d8f h1:n/cM2e930fSKURv5NSlvx0LaXEpyQY06Uo5MizOKYhU= -go.temporal.io/api v1.63.5-0.20260731164320-beafdd4b0d8f/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ= +go.temporal.io/api v1.63.5-0.20260803183639-0e1e8c485f37 h1:ZDICI5Hxc97YsjpE6/WREWkUqQ7qq+ntTH+IbOuTxNw= +go.temporal.io/api v1.63.5-0.20260803183639-0e1e8c485f37/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=