Stop pinning the initial autoscaling poller count to the max in omes worker - #468
Open
veeral-patel wants to merge 4 commits into
Open
Stop pinning the initial autoscaling poller count to the max in omes worker#468veeral-patel wants to merge 4 commits into
veeral-patel wants to merge 4 commits into
Conversation
rkannan82
reviewed
Sep 5, 2026
rkannan82
reviewed
Sep 5, 2026
--activity-poller-autoscale-max and --workflow-poller-autoscale-max set InitialNumberOfPollers as well as MaximumNumberOfPollers, so the flag quietly fixes the starting poller count at the ceiling. Every other harness sets only the maximum - Python (worker.py:233), TypeScript (worker.ts:250), Java (WorkerHarness.java:149), .NET (Worker.cs:346) and Ruby (worker.rb:129) - so the same flag means different things depending on --language. Drop the two InitialNumberOfPollers assignments and let the SDK apply its own initial default, as the other five harnesses already do. Behavior change: --*-poller-autoscale-max=N no longer starts N pollers immediately. It starts at the SDK default and scales up to N, so a -max-only command line begins with fewer pollers than before. Adds TestBuildWorkerOptionsPollerBehavior, which had no coverage.
veeral-patel
force-pushed
the
poller-autoscale-min-initial-flags
branch
from
September 5, 2026 05:31
c61b327 to
9d9371b
Compare
rkannan82
approved these changes
Sep 5, 2026
@temporalio/common@1.23.0 requires protobufjs/ext/protojson which was added in 7.5.2. The pinned 7.5.1 caused "Cannot find module" errors in every kitchensink test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit 464d7af.
THardy98
approved these changes
Sep 8, 2026
rkannan82
force-pushed
the
poller-autoscale-min-initial-flags
branch
3 times, most recently
from
September 8, 2026 14:37
7c9217e to
bddd53f
Compare
rkannan82
enabled auto-merge (squash)
September 8, 2026 14:41
rkannan82
disabled auto-merge
September 8, 2026 14:41
Picks up temporalio/features#892 which bumps the protobufjs pnpm override from 7.5.1 to ^8.7.1, fixing TS kitchensink CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rkannan82
force-pushed
the
poller-autoscale-min-initial-flags
branch
from
September 8, 2026 17:08
bddd53f to
a690286
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
--worker-{activity,workflow}-poller-autoscale-max=NsetInitialNumberOfPollersas well asMaximumNumberOfPollers, so the flag quietly fixed the starting poller count at the ceiling. Dropping the two assignments lets the SDK apply its own initial default.options.ActivityTaskPollerBehavior = sdkworker.NewPollerBehaviorAutoscaling(sdkworker.PollerBehaviorAutoscalingOptions{ - InitialNumberOfPollers: args.ActivityPollerAutoscaleMax, MaximumNumberOfPollers: args.ActivityPollerAutoscaleMax, })and the same in the
workflow-poller-autoscale-maxblock.Previous code was a workaround to a SDK bug that's been since fixed.
Will this cause a inconsistency with the omes workers in other languages?
No - I checked the other workers: Go is the only one coupling initial to max.
PollerBehaviorAutoscaling(maximum=…)(worker.py:233){type: 'autoscaling', maximum: …}(worker.ts:250)new PollerBehaviorAutoscaling(null, max, null)(WorkerHarness.java:149)(min, max, initial)new PollerBehavior.Autoscaling(maximum: …)(Worker.cs:346)PollerBehavior::Autoscaling.new(maximum: …)(worker.rb:129){InitialNumberOfPollers: max, MaximumNumberOfPollers: max}Below
-max=5you getinitial=5, max=3: the SDK doesn't validateinitial <= maxand stores the initial target unclamped (internal_worker_base.go:956), so the worker transiently exceeds its own maximum. Verified not to error.Nothing in this repo passes these flags. External command lines might be affected, if they are relying on initial being set to max. However, this should be rare as this is unexpected and incorrect behavior.
How was this tested