Skip to content

fix(core): ensured env vars take precedence over in-code config#2478

Merged
aryamohanan merged 3 commits intofix-config-precedencefrom
fix-config-order
Apr 10, 2026
Merged

fix(core): ensured env vars take precedence over in-code config#2478
aryamohanan merged 3 commits intofix-config-precedencefrom
fix-config-order

Conversation

@aryamohanan
Copy link
Copy Markdown
Contributor

@aryamohanan aryamohanan commented Apr 8, 2026

This is the first PR addressing configuration precedence.

The goal of this change is to ensure the correct order between environment variables and in-code configuration:

env > in-code

Currently, the precedence between these two sources is mixed. This PR corrects that behavior.

Added missing logging in the configuration file when a config is set.

Scope of This PR

This PR only fixes the precedence between:

  • Environment variables
  • In-code configuration

Agent configuration precedence will be addressed in separate follow-up PRs.

Coverage:

image

@aryamohanan
Copy link
Copy Markdown
Contributor Author

/review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

🤖 I've received your review request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Cost: $0.15

Comment thread packages/core/src/config/index.js Outdated
Comment thread packages/core/src/config/configNormalizers/disable.js
Comment thread packages/core/src/config/index.js Outdated
Comment thread packages/core/src/config/util.js
Comment thread packages/core/src/config/util.js Outdated
Comment thread packages/core/src/config/index.js
Comment thread packages/core/src/config/index.js
@aryamohanan aryamohanan marked this pull request as ready for review April 8, 2026 14:49
@aryamohanan aryamohanan requested a review from a team as a code owner April 8, 2026 14:49
@aryamohanan aryamohanan changed the base branch from fix-config-precedence to refactor-config-collector April 8, 2026 15:30
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 8, 2026

@aryamohanan aryamohanan changed the base branch from refactor-config-collector to fix-config-precedence April 10, 2026 08:17
@aryamohanan aryamohanan merged commit ab98b76 into fix-config-precedence Apr 10, 2026
aryamohanan added a commit that referenced this pull request Apr 10, 2026
BREAKING CHANGE: 
environment config now overrides in-code configuration.
Enforces consistent precedence:
env > in-code
Previously inconsistent behavior is now fixed. This may impact setups relying on the old precedence.
ref https://jsw.ibm.com/browse/INSTA-80965
aryamohanan added a commit that referenced this pull request Apr 13, 2026
BREAKING CHANGE: 
environment config now overrides in-code configuration.
Enforces consistent precedence:
env > in-code
Previously inconsistent behavior is now fixed. This may impact setups relying on the old precedence.
ref https://jsw.ibm.com/browse/INSTA-80965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants