feat(local-cre): runtime CRE-settings override helper for e2e tests - #23335
Open
prashantkumar1982 wants to merge 1 commit into
Open
feat(local-cre): runtime CRE-settings override helper for e2e tests#23335prashantkumar1982 wants to merge 1 commit into
prashantkumar1982 wants to merge 1 commit into
Conversation
Contributor
|
✅ No conflicts with other open PRs targeting |
|
prashantkumar1982
force-pushed
the
cre/cresettings-runtime-override
branch
3 times, most recently
from
August 5, 2026 07:13
7f873a5 to
164879d
Compare
Add ApplyCRESettings, a test helper that overrides CRE settings on a DON at
runtime — without restarting the topology — by proposing a `cresettings` job
to every node of the DON (applied live via loop.AtomicSettings.Store) and
restoring the pre-test baseline on cleanup. Delivery reuses the existing
deployment changeset (ProposeJobSpec{Template: CRESettings}) + node approval;
overrides are merged onto each DON's boot CL_CRE_SETTINGS baseline and rendered
as a scoped TOML document.
Includes scope-varied smoke tests (global, org, workflow, multi-scope) that
demonstrate apply and explicit/auto cleanup.
See core/scripts/cre/environment/docs/cresettings-runtime-override-proposal.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
prashantkumar1982
force-pushed
the
cre/cresettings-runtime-override
branch
from
August 5, 2026 07:29
164879d to
2a3caba
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
Adds a test helper —
helpers.ApplyCRESettings(t, env, overrides)— that overrides CRE settings on a DON at runtime, without restarting the topology, and restores the pre-test baseline on cleanup. Plus scope-varied smoke tests (global / org / workflow / multi-scope) demonstrating apply and cleanup.Why
Today, exercising a settings/flag change in a Local CRE e2e test means tearing down the topology and starting a new one with the flag baked into
CL_CRE_SETTINGS. This lets a test flip settings inline, scoped to that test, and revert automatically — the same delivery path prod uses (thecre-settingsdurable-pipeline job proposed to all nodes).How it works
cresettingsjob: the delegate callsloop.AtomicSettings.Store, which hot-swaps the in-memory settings getter (no restart). Seecore/services/cresettings/delegate.go.ProposeJobSpec{Template: CRESettings}) to propose that job to every node of the target DON, then approves it on each node.Approveonly returns once all nodes accepted — so a successful call means the whole DON converged (no split-brain).CL_CRE_SETTINGSbaseline (eachStorefully replaces the getter, so a bare diff would drop boot settings) and rendered as a scoped TOML doc ([global]/[org.<id>]/[owner.<id>]/[workflow.<id>], string values).t.Cleanupand/or an explicitHandle.Reset(t).Files
system-tests/tests/test-helpers/cresettings_override.go— the helper (ApplyCRESettings,CRESettingsOverrides,Handle{Reset,AppliedTOML,BaselineTOML}).system-tests/tests/smoke/cre/cresettings_override_test.go—Test_CRE_CRESettings_Override_{Global,Org,Workflow,MultiScope}.core/scripts/cre/environment/docs/cresettings-runtime-override-proposal.md— design write-up (mechanism, live-vs-restart classification, gotchas).Testing
develop(go test -c ./system-tests/tests/smoke/cre),go vetclean,go mod tidyapplied.Notes for review
workflow(default topology). Not parallelized — they mutate shared-DON settings, so they run serially and revert promptly.🤖 Generated with Claude Code