ManageIQ / ManageIQ/miq_bot

A renamed repo causes a stack trace in the GithubNotificationMonitor

Open
#440 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

```
I, [2019-04-23T11:36:31.643500 #1449] INFO -- : Executed GET https://api.github.com/repos/ManageIQ/topological_inventory-ui/notifications?all=false&per_page=100...api calls remaining 349
2019-04-23T15:36:31.650Z 1449 TID-1jxuvg GithubNotificationMonitorWorker JID-9b332b256318047276dd045c ERROR: undefined local variable or method `subject' for [:message, "Moved Permanently"]:GithubService::Notification
2019-04-23T15:36:31.650Z 1449 TID-1jxuvg GithubNotificationMonitorWorker JID-9b332b256318047276dd045c ERROR: /opt/rubies/ruby-2.3.3/lib/ruby/2.3.0/delegate.rb:87:in `method_missing'
/opt/miq_bot/lib/github_service/notification.rb:10:in `issue_number'
/opt/miq_bot/lib/github_notification_monitor.rb:35:in `process_notification'
/opt/miq_bot/lib/github_notification_monitor.rb:24:in `block in process_notifications'
/opt/miq_bot/lib/github_notification_monitor.rb:23:in `each'
/opt/miq_bot/lib/github_notification_monitor.rb:23:in `process_notifications'
/opt/miq_bot/app/workers/github_notification_monitor_worker.rb:23:in `process_repo'
/opt/miq_bot/app/workers/github_notification_monitor_worker.rb:19:in `block in process_repos'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:46:in `each'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/delegation.rb:46:in `each'
/opt/miq_bot/app/workers/github_notification_monitor_worker.rb:19:in `process_repos'
/opt/miq_bot/app/workers/github_notification_monitor_worker.rb:14:in `perform'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:152:in `execute_job'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:134:in `block (2 levels) in process'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidetiq-0.7.2/lib/sidetiq/middleware/history.rb:18:in `call_with_sidetiq_history'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidetiq-0.7.2/lib/sidetiq/middleware/history.rb:6:in `call'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/logging.rb:32:in `with_context'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:129:in `block in process'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:168:in `stats'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:128:in `process'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:80:in `process_one'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/processor.rb:68:in `run'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/util.rb:17:in `watchdog'
/opt/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/sidekiq-4.1.4/lib/sidekiq/util.rb:25:in `block in safe_thread'
I, [2019-04-23T11:36:31.892500 #1449] INFO -- : Executed GET https://api.github.com/repos/ManageIQ/topological_inventory-persister/notifications?all=false&per_page=1
```

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 lib/github_service/notification.rb at issue_number and follow its use in lib/github_notification_monitor.rb, using the reported GithubNotificationMonitor stack trace as the entry point. Reproduce or inspect the notification response for the renamed repository, then verify that processing it no longer raises the undefined method or local variable error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.