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

CLI does not fail if specified config file specified doesn't exist #3735

Closed
thbar opened this issue Jan 29, 2018 · 6 comments
Closed

CLI does not fail if specified config file specified doesn't exist #3735

thbar opened this issue Jan 29, 2018 · 6 comments

Comments

@thbar
Copy link
Contributor

thbar commented Jan 29, 2018

I've been surprised by the behaviour so I just wanted to ask if this is by design. Thanks!

Ruby version: 2.5.0
Sidekiq / Pro / Enterprise version(s): Sidekiq 5.0.0

While setting up a sidekiq install, I noticed that if one passes a config file like this:

bundle exec sidekiq -C config/foobar.yml -r ./setup/boot.rb

with foobar.yml an non-existent file, Sidekiq will start anyway & will default to the default configuration.

Note that creating the file then running with --verbose I can see the options (e.g. concurrency) taking effect.

@mperham
Copy link
Collaborator

mperham commented Jan 29, 2018

It is by design so things like capistrano-sidekiq can point to a file, even if it doesn't exist. You can make a case that there should be a warning.

@thbar
Copy link
Contributor Author

thbar commented Jan 29, 2018

I wondered about that - indeed it's convenient when a systemd config refers to it but it's not there yet, I was pretty sure that was the reasoning behind that.

Thanks for the clarification - just wanted to make sure I hadn't missed anything.

I'm going to go ahead and close this. Thanks!

@thbar thbar closed this as completed Jan 29, 2018
@alxgsv
Copy link

alxgsv commented Dec 5, 2018

I've just shot myself in a leg because of this. Created config file for separate queue with typo in it's name several days ago and launched sidekiq. Today I found out that sidekiq has been running with default config all these days :-(

@mperham
Copy link
Collaborator

mperham commented Dec 5, 2018 via email

@mperham
Copy link
Collaborator

mperham commented Dec 5, 2018

PRs welcome, this should be relatively easy to implement.

@alxgsv
Copy link

alxgsv commented Dec 6, 2018

@mperham thanks for your suggestion! Will try to make PR on the weekend.

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

No branches or pull requests

3 participants