Repository navigation
Pass unset poller behavior to core so workers can auto-enroll in poller autoscaling - #647
Merged
Merged
Conversation
…er autoscaling When the user sets neither a poller behavior nor a max poll count, pass nil through the bridge instead of a SimpleMaximum(5) default. sdk-core then enrolls the poller into autoscaling when the namespace advertises the poller_autoscaling_auto_enroll capability, and falls back to SimpleMaximum(5) otherwise. Explicitly configured behaviors are passed through unchanged.
chris-olszewski
approved these changes
Nov 3, 2026
chris-olszewski
left a comment
Member
There was a problem hiding this comment.
Changes look good. Just make sure to fixup the documented defaults and add a changelog fragment since this is a user facing change.
Contributor
Author
|
@cla-assistant check |
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
max_concurrent_*_task_pollsoptions default tonil; an unset behavior is passed to core asNone.nil.Why?
When a namespace has poller autoscaling auto-enroll turned on, sdk-core switches any poller the user left unset to autoscaling. This SDK filled in its own default before calling core, so every poller looked explicitly configured and nothing was ever enrolled. Go, Java and Rust already pass "unset" through.
Auto-enroll was added to sdk-core in temporalio/sdk-rust#1425, but it never took effect in this SDK because of this double default (the SDK applied its own default, so core never saw the poller as unset).
Checklist
Manual testing
Local dev server with
frontend.pollerAutoscalingAutoEnroll=true(namespace advertises the capability); poller autoscaling read from the worker heartbeat viaListWorkers.main(48450e1)6746c18)max_concurrent_workflow_task_polls: 5workflow_task_poller_behavior: SimpleMaximum.new(5)Nexus pollers were already enrolled on
main(Ruby never set a Nexus poller behavior), so they're unchanged.