-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centralize configuration defintion #1399
Merged
Merged
Conversation
This file contains 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
bizob2828
force-pushed
the
config-refactor
branch
from
November 1, 2022 15:50
616d73d
to
c2cd5e1
Compare
… values, respective default, an env var formatter and env var override. refactored config system to derive env vars from leaf node structure.
bizob2828
force-pushed
the
config-refactor
branch
from
November 1, 2022 15:52
c2cd5e1
to
7b558de
Compare
Codecov Report
@@ Coverage Diff @@
## main #1399 +/- ##
==========================================
- Coverage 95.10% 91.64% -3.46%
==========================================
Files 193 173 -20
Lines 37640 35842 -1798
Branches 23 23
==========================================
- Hits 35796 32846 -2950
- Misses 1844 2996 +1152
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…ion env vars moved to lib/config/default and we lost coverage
mrickard
reviewed
Nov 1, 2022
jmartin4563
reviewed
Nov 4, 2022
jmartin4563
previously approved these changes
Nov 4, 2022
mrickard
previously approved these changes
Nov 4, 2022
jmartin4563
approved these changes
Nov 4, 2022
Merged
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.
Proposed Release Notes
NEW_RELIC_PATH_TO_CONFIG_KEY
.config.nested.object_path.enabled
the env var would beNEW_RELIC_NESTED_OBJECT_PATH.ENABLED
.Links
Closes NEWRELIC-4964
Details
For internal devs, I centralized configuration defintion to really 2 places now instead of the 4.
In
lib/config/default.js
you will define the object structure, assign a default value(s) and an env var formatter as all env vars are strings. There's also an env var override but I think this should only exist for legacy options as our configuration values follow a convention specified above. You will still have to add a case in_fromServer
if the new configuration is a server side option.