-
Notifications
You must be signed in to change notification settings - Fork 9
Document config-shaping env vars delivered via loadEnv .env files #564
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
base: main
Are you sure you want to change the base?
Changes from all commits
067593e
938746d
43f7c75
6918477
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,16 @@ loadEnv: | |
|
|
||
| Files are loaded in the order specified. | ||
|
|
||
| ## Config-Shaping Variables Are Not Honored | ||
|
|
||
| <VersionBadge type="changed" version="v5.2.0" /> | ||
|
|
||
| The three configuration env vars — `HARPER_DEFAULT_CONFIG`, `HARPER_CONFIG`, and `HARPER_SET_CONFIG` (see [Configuration](../configuration/overview.md)) — shape Harper's root configuration, which is composed once at startup, **before components load**. Delivering one of them through a `loadEnv` `.env` file therefore has **no effect**: configuration is strictly top-down (the instance's configuration controls components, never the reverse), so a component cannot shape instance-wide config. | ||
|
|
||
| As of 5.2.0 (and 5.1.x patch releases from 5.1.18) this is no longer silent: Harper logs a prominent warning at startup for each config-shaping variable found in a component `.env` file — naming the variable and the file — and again at component load time (which also covers components deployed after startup). Earlier versions ignored these variables without any message. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The v5.1 backport first shipped in |
||
|
|
||
| To configure the instance, use the supported channels instead: set the variable in the process environment (container env, service unit, shell), or put the equivalent keys in the instance's `harper-config.yaml`. | ||
|
|
||
| ## Related | ||
|
|
||
| - [Components Overview](../components/overview.md) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guidance is now already present on
origin/mainin theloadEnvwarning added by #579 (current main lines 49-57). A three-way merge keeps both insertions, so the page would explain the same rule and workaround twice. Could we rebase and fold only the uniquely useful warning-timing detail into the existing warning, or close this PR as superseded?