Enable CHASM callbacks by default (#11113)

## What changed?

Changed the dynamic config default for "history.enableCHASMCallbacks" to
true.

## Why?

The feature has been stable for a while now and is the preferred
implementation.
This commit is contained in:
Roey Berman
2026-07-16 20:32:38 -07:00
committed by GitHub
parent ddce4c204f
commit 33e0633f48
3 changed files with 14 additions and 1 deletions

View File

@@ -3136,7 +3136,7 @@ existing workflows to attach callbacks.`,
EnableCHASMCallbacks = NewNamespaceBoolSetting(
"history.enableCHASMCallbacks",
false,
true,
`Controls whether new callbacks are created using the CHASM implementation
instead of the previous HSM backed implementation.`,
)

View File

@@ -283,10 +283,16 @@ func (s *WorkflowTestSuite) TestStartWorkflowExecution_UseExisting_OnConflictOpt
testcore.WithDynamicConfig(callback.AllowedAddresses, allowedAddresses),
}
if tc.MaxCallbacksPerWorkflow > 0 {
// Set both the legacy (HSM) and CHASM callback limits so the limit is
// enforced regardless of which callback implementation is active.
opts = append(opts, testcore.WithDynamicConfig(
dynamicconfig.MaxCallbacksPerWorkflow,
tc.MaxCallbacksPerWorkflow,
))
opts = append(opts, testcore.WithDynamicConfig(
callback.MaxPerExecution,
tc.MaxCallbacksPerWorkflow,
))
}
env := testcore.NewEnv(s.T(), opts...)

View File

@@ -82,6 +82,13 @@ func (s *NexusStateReplicationSuite) SetupSuite() {
Timeout: 1 * time.Second,
},
}
if !s.enableTransitionHistory {
// CHASM callbacks rely on transition history for replication (their outbound
// task fails with "state has empty transition history" otherwise), so when
// transition history is disabled fall back to the legacy HSM callback
// implementation, which works with event-based replication.
s.dynamicConfigOverrides[dynamicconfig.EnableCHASMCallbacks.Key()] = false
}
s.setupSuite()
}