Skip to content

x/config/cli fields take priority over map entries on env vars - #2486

Merged
cedric-cordenier merged 1 commit into
mainfrom
rtinianov_fieldOverMapCliAndEnv
Oct 21, 2026
Merged

cedric-cordenier merged 1 commit into
mainfrom
rtinianov_fieldOverMapCliAndEnv

Conversation

@nolag

@nolag nolag commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Real use case is along the lines of the fields Headers and HeadersTTL

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 focused changes implement the intended precedence with regression coverage and no identified blocking issues.

No open issues 🎉

What changed in this PR

Updates x/config/cli so environment variables assigned to fields take precedence over matching map entries.

Changes:

  • Tracks field-owned environment variables and skips them during map-entry decoding.
  • Preserves collision checks between maps.
  • Documents precedence and adds regression coverage.
File Description
x/​config/​cli/​README.md Documents field precedence over map entries.
x/​config/​cli/​entries.go Skips field-owned variables when decoding map entries.
x/​config/​cli/​entries_test.go Tests field precedence and retained map collision checks.
x/​config/​cli/​binder.go Records field-owned variables and adjusts collision validation.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

@nolag
nolag marked this pull request as ready for review October 21, 2026 17:28
@nolag
nolag requested a review from a team as a code owner October 21, 2026 17:28
@cedric-cordenier
cedric-cordenier added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit f7a61fc Oct 21, 2026
37 checks passed
@cedric-cordenier
cedric-cordenier deleted the rtinianov_fieldOverMapCliAndEnv branch October 21, 2026 17:47
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