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
Check Config File Existence #4054
Conversation
4be233d
to
f013178
Compare
a1883bc
to
4366b9e
Compare
4fd9773
to
3c1252f
Compare
Thanks! |
* Check config file existence * Eager config file check * Parse expanded path to default sidekiq.yml config file in Rails app * Cleanup
* Check config file existence * Eager config file check * Parse expanded path to default sidekiq.yml config file in Rails app * Cleanup
* Check Config File Existence (#4054) * Check config file existence * Eager config file check * Parse expanded path to default sidekiq.yml config file in Rails app * Cleanup * Add minitest-around * Extract context from formatter * Add JSON logger formatter * Adjust job logger to handle elapsed time within context * Add tid test * Rename processor logger * Enforce global state reset in logging tests * Add warning about upcoming refactoring to Sidekiq::Logging * Replace around hook with explicit stub inside test It's implemented with fibers, which means Thread.current returns different values in JRuby. * Fix typo * Concise JSON formatter keys * Add logger_formatter option * Shift context from array of strings to hash Allows more flexibly format context in the different formatters. * Adjust warning message regarding context type change * Add "Formatter" suffix to classes * Fix CLI specs * Replace Sidekiq::Logging with Sidekiq::Logger * Namespace logger formatters * Remove rails 4 appraisal
This is a bit of breaking change, the previous behavior is to check the default config directories on startup now a config flag is required. Might want to make a note of this in the change log. @mperham |
@navied Could you be more specific? Sidekiq should always pick up the default config file if none is specified. If it does not, that's a bug. |
Prior to 5.2.4, in a non-rails sidekiq setup the default config folder of config/sidekiq.yml was picked up. But the default config file is still picked up with a rails w/ sidekiq setup. |
Thanks, @Tensho do you have time to look into this? |
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.
No problem, I pointed out the part of the code I think might be the issue.
|
||
%w[config/sidekiq.yml config/sidekiq.yml.erb].each do |filename| |
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.
Missing code that is potentially the issue.
I wonder
Sorry for that oversight 🙇 I'll make an appropriate change. |
Adjusted in #4077 |
Ispired by #4047, Fixes #3735.
Parse
sidekiq.yml[.erb]
only in case::config_file
is not present as CLI argument:require
is a directory (Rails application)config/sidekiq.yml[.erb]
against:require
existsExample when default config file is considered: