diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-07-18 22:31:01 +0000 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-07-18 22:31:01 +0000 |
commit | 777a080892f710915c8f4d62864813ef388a1873 (patch) | |
tree | f001fe2a066c95f67235b4d3a2cdb2e0f4692d9a /app/models/user.rb | |
parent | aba558a4a8c7e9e3c691c0e689a0926d4604a26a (diff) | |
parent | aaba9ebbb196ae421178e962ccc1078fdcb98843 (diff) | |
download | gitlab-ce-777a080892f710915c8f4d62864813ef388a1873.tar.gz |
Merge branch 'bug/sidekiq-cron-better-error' into 'master'
Improve cron_jobs loading error messages
## What does this MR do?
Improves the error message from "Sidekiq Cron Jobs" plugin, when trying to load a incorrect definition from gitlab config files.
This is the output before the fix:
```
2016-06-08T16:43:19.277Z 2890 TID-gso49ojro INFO: Booting Sidekiq 4.1.2 with redis options {:url=>"unix:/var/run/redis/redis.sock", :namespace=>"resque:gitlab"}
undefined method `delete' for nil:NilClass
/home/git/gitlab/config/initializers/sidekiq.rb:16:in `block (2 levels) in <top (required)>'
/home/git/gitlab/config/initializers/sidekiq.rb:16:in `each'
/home/git/gitlab/config/initializers/sidekiq.rb:16:in `block in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/sidekiq-4.1.2/lib/sidekiq.rb:70:in `configure_server'
```
This is the output after the fix:
```
2016-07-18T10:53:22.414Z 66332 TID-oxal1bmik INFO: Booting Sidekiq 4.1.4 with redis options {:url=>"redis://localhost:6378", :namespace=>"resque:gitlab"}
Invalid cron_jobs config key: 'registry'. Check your gitlab config file.
/home/git/gitlab/config/initializers/sidekiq.rb:21:in `block (2 levels) in <top (required)>'
/home/git/gitlab/config/initializers/sidekiq.rb:17:in `each'
/home/git/gitlab/config/initializers/sidekiq.rb:17:in `block in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/ruby-2.1.8/gems/sidekiq-4.1.4/lib/sidekiq.rb:70:in `configure_server'
```
Fixes #18378
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
Original error doesn't give any hint on where the problem can be, so the user can't easily troubleshoot unless he knows implementation details.
## What are the relevant issue numbers?
#18378
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5318
Diffstat (limited to 'app/models/user.rb')
0 files changed, 0 insertions, 0 deletions