Skip to content

Conversation

@gabeschine
Copy link

@gabeschine gabeschine commented Dec 3, 2025

Fixes #2395

Wraps the per-source and per-paths file config resolver in individual methods whose overall result is examined for success. On failure, a warn!() is emitted, but iteration continues.

To-do:

  • Add a test.

Copilot AI review requested due to automatic review settings December 3, 2025 19:48
@gabeschine
Copy link
Author

@CommanderStorm do you have a recommendation for how/where I should add a regression test?

Copilot finished reviewing on behalf of gabeschine December 3, 2025 19:51
Copy link
Contributor

Copilot AI left a 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_int for individual sources and resolve_one_path_int for 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

@gabeschine
Copy link
Author

I've added a simple unit test to catch any possible regressions for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement: make startup resilient to bad file paths

1 participant