-
-
Notifications
You must be signed in to change notification settings - Fork 306
feat(config): warn! on bad source paths instead of hard fail #2396
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?
feat(config): warn! on bad source paths instead of hard fail #2396
Conversation
|
@CommanderStorm do you have a recommendation for how/where I should add a regression test? |
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.
Pull request overview
This PR changes Martin's configuration file handling to gracefully handle invalid source paths by logging warnings instead of failing hard. This improves robustness when some configured sources are temporarily unavailable or misconfigured.
Key Changes:
- Extracted source resolution logic into two new helper functions:
resolve_one_source_intfor individual sources andresolve_one_path_intfor path-based sources - Wrapped source resolution calls in match statements that catch errors and log warnings instead of propagating failures
- Maintains all existing functionality while allowing the server to start even when some sources cannot be resolved
|
I've added a simple unit test to catch any possible regressions for this feature. |
Fixes #2395
Wraps the per-
sourceand per-pathsfile config resolver in individual methods whose overall result is examined for success. On failure, awarn!()is emitted, but iteration continues.To-do: