Project

General

Profile

Actions

Bug #16067

closed

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

Added by Ivan Necas over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
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 1 (0 open1 closed)

Related to foreman-tasks - Bug #15778: Can't use process_success Foreman method in API controllers on DynflowTaskClosedMarek Hulán07/22/2016Actions
Actions #1

Updated by Ivan Necas over 7 years ago

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

Updated by Ivan Necas over 7 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.

Actions #3

Updated by The Foreman Bot over 7 years ago

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

Updated by Ivan Necas over 7 years ago

  • Target version changed from 1.7.0 to 1.6.1
Actions #5

Updated by Ivan Necas over 7 years ago

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

Also available in: Atom PDF