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

Undocumented detail in the setup of settings.yml #407

Open
europ opened this issue Feb 27, 2018 · 6 comments
Open

Undocumented detail in the setup of settings.yml #407

europ opened this issue Feb 27, 2018 · 6 comments

Comments

@europ
Copy link
Member

europ commented Feb 27, 2018

NoMethodError: undefined method 'each' for nil:NilClass

at

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

rules: {}

Example how to solve:

...

# Worker settings
diff_content_checker:
  offenses: {}
merge_target_titler:
  included_repos: []
path_based_labeler:
  rules:
    organization/repository: []
travis_build_killer:
  included_repos: []
@Fryguy
Copy link
Member

Fryguy commented Mar 21, 2018

strange...how is this working in production? We definitely don't have rules for every repo, and according to

Settings.path_based_labeler.rules[fq_repo_name]
a missing repo will return nil.

@Fryguy Fryguy added the bug label Mar 21, 2018
@juliancheal
Copy link
Member

a missing repo will return nil.

Yeah but returning nil, means https://github.com/ManageIQ/miq_bot/blob/master/app/workers/commit_monitor_handlers/commit_range/path_based_labeler.rb#L21 blows up.

@Fryguy
Copy link
Member

Fryguy commented Mar 22, 2019

Right, so I can't understand how's it's working in production presently. It should be blowing up constantly.

@europ
Copy link
Member Author

europ commented Mar 22, 2019

What are the rules in production?

path_based_labeler:
  rules:

I always faced this NoMethodError until I added some empty fake org/repo into rules to make them non-empty.

@Fryguy
Copy link
Member

Fryguy commented Mar 27, 2019

yeah, it turns out it's a coincidence that it's working in production...the settings are:

path_based_labeler:
  included_repos:
  - ManageIQ/manageiq
  - ManageIQ/manageiq-ui-classic
  rules:
    ManageIQ/manageiq:
    - ...
    ManageIQ/manageiq-ui-classic:
    - ...

So, we happen to set the included_repos as well as the rules which ensures only those valid repos are even called.

@miq-bot
Copy link
Member

miq-bot commented Jun 11, 2020

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.

@miq-bot miq-bot added the stale label Jun 11, 2020
@Fryguy Fryguy added pinned and removed stale labels Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants