ManageIQ / ManageIQ/miq_bot

Undocumented detail in the setup of settings.yml

Open
#407 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted pinned
Dominant language
Ruby
Stars
16
Forks
39
Avg merge
1d 11h
Merged PRs (30d)
8

Description

`NoMethodError: undefined method 'each' for nil:NilClass`

at

https://github.com/ManageIQ/miq_bot/blob/ca62968398d181fa6155264cda053ec06c56159d/app/workers/commit_monitor_handlers/commit_range/path_based_labeler.rb#L21

```
2018-02-21T07:42:11.405Z 24598 TID-gnaf0hvnk WARN: NoMethodError: undefined method `each' for nil:NilClass
2018-02-21T07:42:11.405Z 24598 TID-gnaf0hvnk WARN: /root/miq_bot/app/workers/commit_monitor_handlers/commit_range/path_based_labeler.rb:21:in `process_branch'
/root/miq_bot/app/workers/commit_monitor_handlers/commit_range/path_based_labeler.rb:14:in `perform'
/root/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:152:in `execute_job'
...
```

due to uninitialized variable

https://github.com/ManageIQ/miq_bot/blob/ca62968398d181fa6155264cda053ec06c56159d/config/settings.yml#L28

Example how to solve:

```yaml
...

# Worker settings
diff_content_checker:
offenses: {}
merge_target_titler:
included_repos: []
path_based_labeler:
rules:
organization/repository: []
travis_build_killer:
included_repos: []
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with config/settings.yml around line 28 and the path_based_labeler process_branch error at app/workers/commit_monitor_handlers/commit_range/path_based_labeler.rb:21. Compare the worker settings with the example in the issue, then document the required path_based_labeler rules structure and related empty settings. Done means a fresh settings.yml no longer leaves the worker configuration nil.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.