Skip to content

Add subscription for autoEnable and handle changes#9781

Merged
majiru merged 14 commits intotemporalio:mainfrom
majiru:auto-enable-disable-fix
Apr 10, 2026
Merged

Add subscription for autoEnable and handle changes#9781
majiru merged 14 commits intotemporalio:mainfrom
majiru:auto-enable-disable-fix

Conversation

@majiru
Copy link
Copy Markdown
Contributor

@majiru majiru commented Apr 2, 2026

What changed?

Move autoenable to a subscription, and check when it changes to see if we need to unload.

Why?

When we disable autoEnable as we approach GA we need to be able to go back to the old dynamic config being the source of truth.

How did you test it?

  • built
  • [] run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread common/dynamicconfig/constants.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
@majiru majiru marked this pull request as ready for review April 9, 2026 16:32
@majiru majiru requested a review from a team as a code owner April 9, 2026 16:32
Copy link
Copy Markdown
Contributor

@dnr dnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some style nits and suggestions, but approving now to reduce delay

Comment thread service/matching/matching_engine_test.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread service/matching/task_queue_partition_manager.go Outdated
Comment thread service/matching/task_queue_partition_manager.go
Comment thread service/matching/matching_engine_test.go Outdated
Comment thread service/matching/matching_engine_test.go Outdated
Comment thread service/matching/matching_engine_test.go Outdated
Comment thread service/matching/matching_engine_test.go Outdated
}

// TestAutoEnableV2ConfigChange tests that switching autoEnable triggers unload when effective config changes
func TestAutoEnableV2ConfigChange(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be a parameterized test func so we can test more combinations of: {newMatcher config, enableFairness config, fairness state} -> expected result when autoenable flipped {on, off} ?

majiru and others added 2 commits April 9, 2026 19:00
@majiru majiru merged commit 8e52285 into temporalio:main Apr 10, 2026
46 checks passed
stephanos pushed a commit that referenced this pull request Apr 13, 2026
## What changed?
Move autoenable to a subscription, and check when it changes to see if
we need to unload.

## Why?
When we disable autoEnable as we approach GA we need to be able to go
back to the old dynamic config being the source of truth.

---------

Co-authored-by: David Reiss <dnr@dnr.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants