Skip to content

Conversation

@lxxxvi
Copy link

@lxxxvi lxxxvi commented Oct 22, 2025

Hi 👋

Here's my attempt to resolve #632

I suggest to display a WARNING in the terminal if the path to configuration file does not exist:

$ bin/jobs -c /path/to/nowhere.yml
[solid_queue] WARNING: Provided configuration file '/path/to/nowhere.yml' does not exist. Falling back to default configuration.

Let's discuss the approach and, of course, the message itself.

Looking forward to hearing your feedback.

test "warns if provided configuration file does not exist" do
assert_output "[solid_queue] WARNING: Provided configuration file '/path/to/nowhere.yml' does not exist. Falling back to default configuration.\n" do
configuration = SolidQueue::Configuration.new(config_file: Pathname.new("/path/to/nowhere.yml"))
assert_predicate configuration, :valid?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe

Suggested change
assert_predicate configuration, :valid?
assert configuration.valid?

so it matches other usages of this in this test?

Copy link
Member

@rosa rosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @lxxxvi! This looks good, just left a minor comment.

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.

Raise an error if config file path does not exist?

2 participants