Skip to content

cresettings: add ShardingFailoverEnabled gate - #2468

Merged
pavel-raykov merged 1 commit into
mainfrom
feat/cresettings-sharding-failover-enabled
Oct 14, 2026
Merged

pavel-raykov merged 1 commit into
mainfrom
feat/cresettings-sharding-failover-enabled

Conversation

@pavel-raykov

Copy link
Copy Markdown
Contributor

Summary

Adds ShardingFailoverEnabled (global, Bool(false)) to cresettings.Schema.

chainlink core currently builds this gate ad hoc in core/services/workflows/v2/config.go:

shardingFailoverSetting := settings.Bool(false)
shardingFailoverSetting.Key = "ShardingFailoverEnabled"
shardingFailoverSetting.Scope = settings.ScopeGlobal

Because the key isn't in the Schema, chainlink-deployments' settings verification rejects it as an unknown field, so it can't be enabled per environment (needed to turn it on in staging zone-b).

When enabled, a sharded workflow DON caches trigger events for workflows owned by another shard instead of denying them (ShardFailoverManager, DenyNotOwner path), so it can take over if the owning shard fails.

Changes

  • settings.go: new field + default false
  • defaults.toml / defaults.json: regenerated (go test . -update)
  • README.md: added to the syncer.tryEngineCreate flowchart subgraph

Key, scope and default match the existing core definition, so behavior is unchanged. A follow-up in chainlink core can switch to cresettings.Default.ShardingFailoverEnabled.

🤖 Generated with Claude Code

chainlink core builds this gate ad hoc (settings.Bool(false) with
Key "ShardingFailoverEnabled", global scope), so it cannot be overridden
via CRE settings files: chainlink-deployments rejects it as an unknown
field. Add it to the Schema so environments can enable it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pavel-raykov
pavel-raykov marked this pull request as ready for review October 14, 2026 20:18
@pavel-raykov
pavel-raykov requested a review from a team as a code owner October 14, 2026 20:18
Copilot AI balanced review requested due to automatic review settings October 14, 2026 20:18
@pavel-raykov
pavel-raykov requested a review from bolekk October 14, 2026 20:18

Copilot AI left a comment

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.

🟢 Approval recommended

The small, additive schema change has consistent defaults and documentation, with no blocking issues identified.

0 open findings

What changed in this PR

Registers ShardingFailoverEnabled in the CRE settings schema so environment settings validation recognizes the gate, while preserving its disabled default.

Changes:

  • Adds the boolean setting with default false.
  • Updates serialized defaults and the settings flowchart.
File Description
pkg/​settings/​cresettings/​settings.go Adds and documents the gate.
pkg/​settings/​cresettings/​README.md Includes the gate in the flowchart.
pkg/​settings/​cresettings/​defaults.toml Records the disabled default.
pkg/​settings/​cresettings/​defaults.json Records the disabled default.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-common

✅ Compatible Changes (1)

pkg/settings/cresettings.Schema (1)
  • ShardingFailoverEnabled — ➕ Added

📄 View full apidiff report

@pavel-raykov
pavel-raykov added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit d375ab8 Oct 14, 2026
36 of 37 checks passed
@pavel-raykov
pavel-raykov deleted the feat/cresettings-sharding-failover-enabled branch October 14, 2026 20:33
@pavel-raykov
pavel-raykov requested a review from mchain0 October 14, 2026 20:33
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.

4 participants