Project

General

Profile

Bug #16067

create job invocation hammer command fails with NoMethodError (undefined method `[]' for nil:NilClass):

Added by Ivan Necas about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

NoMethodError (undefined method `[]' for nil:NilClass):
    /home/inecas/Projects/ws/foreman-rex/hammer_cli_foreman_remote_execution/lib/hammer_cli_foreman_remote_execution/job_invocation.rb:112:in `task_progress'
    /home/inecas/Projects/ws/foreman-rex/hammer-cli-foreman-tasks/lib/hammer_cli_foreman_tasks/async_command.rb:14:in `execute'
    /home/inecas/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /home/inecas/Projects/ws/foreman-rex/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /home/inecas/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/inecas/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'

It seems the API changed the key for task details from `dynflow_task` to `task`, probably connected
to rabl version change, seems similar to https://github.com/nesquena/rabl/issues/505, although
I've seen different outputs in foreman 1.11 (with rabl 0.11.6) vs develop with rable 0.12.0)


Related issues

Related to foreman-tasks - Bug #15778: Can't use process_success Foreman method in API controllers on DynflowTaskClosed2016-07-22

Associated revisions

Revision 9542af89 (diff)
Added by Ivan Necas almost 6 years ago

Fixes #16067 - state the API key for dynflow_task explicitly

This fixes the regression introduce by
http://projects.theforeman.org/issues/15778, as the output
of the API for job-invocation show changed.

History

#1 Updated by Ivan Necas about 6 years ago

  • Related to Bug #15778: Can't use process_success Foreman method in API controllers on DynflowTask added

#2 Updated by Ivan Necas about 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Ivan Necas

After deeper investigation I've noticed the issue was introduced by #15778, where the model_name was overridden. Rabl
uses that method internally to determine the attribute key.

#3 Updated by The Foreman Bot about 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/198 added

#4 Updated by Ivan Necas almost 6 years ago

  • Target version changed from 1.7.0 to 1.6.1

#5 Updated by Ivan Necas almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF