Skip to content
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

Starting Draupnir with --draupnir-config incorrectly warns that he config can't be found because of theConfig package behaviour #480

Closed
Gnuxie opened this issue Jul 21, 2024 · 3 comments · Fixed by #606
Labels
L3 Some Users Likelihood P3 Outrageous / Cannot continue to or start to use Priority level - includes missing documentation leading to same outrage etc T6 Crash Bug causes crash OR data loss

Comments

@Gnuxie
Copy link
Member

Gnuxie commented Jul 21, 2024

We always try to load Config even when the --draupnir-config argument is provided, and that causes this error message. Which is confusing to anyone debugging issues with the config file.

@Gnuxie Gnuxie added L3 Some Users Likelihood P3 Outrageous / Cannot continue to or start to use Priority level - includes missing documentation leading to same outrage etc T6 Crash Bug causes crash OR data loss labels Jul 21, 2024
@Gnuxie
Copy link
Member Author

Gnuxie commented Oct 9, 2024

yarn test:manual                                                            ✔ 
Debugger attached.
yarn run v1.22.22
$ ts-node test/integration/manualLaunchScript.ts --draupnir-config config/harness.yaml
Debugger attached.
Wed, 09 Oct 2024 11:00:07 GMT [INFO] [Draupnir config] Configuration meta: {
  "configPath": "config/harness.yaml",
  "isDraupnirConfigOptionUsed": true,
  "isAccessTokenPathOptionUsed": false,
  "isPasswordPathOptionUsed": false
}

Can't reproduce, but that might be because config/default.yaml exists? not sure

@Gnuxie
Copy link
Member Author

Gnuxie commented Oct 9, 2024

ok i got it

WARNING: No configurations found in configuration directory:/home/user/experiments/Draupnir/config
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.

@Gnuxie
Copy link
Member Author

Gnuxie commented Oct 9, 2024

Now to mangle this, sigh this is shit https://github.com/node-config/node-config/blob/8681019099f43eb4762d5cecf2f42ab9e99f3f5e/lib/config.js#L1520-L1522 . Hmm, so we'd have to mangle the environment variables before we import Config and then make our own version of the warning when draupnir config isn't present.... oh mare.

Gnuxie added a commit that referenced this issue Oct 9, 2024
Fixes #480.

It's confusing people and we don't really use this package properly
or rely on it for this anyways.
Gnuxie added a commit that referenced this issue Oct 9, 2024
Fixes #480.

It's confusing people and we don't really use this package properly
or rely on it for this anyways.
@Gnuxie Gnuxie moved this to Done in Draupnir planning Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L3 Some Users Likelihood P3 Outrageous / Cannot continue to or start to use Priority level - includes missing documentation leading to same outrage etc T6 Crash Bug causes crash OR data loss
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant