Bug #22189

Showing task details while the task is in planning can lead to misleading messages

Added by Ivan Necas 15 days ago.

Status:New
Priority:Normal
Assigned To:-
Category:-
Target version:-
Difficulty: Bugzilla link:1532211
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1532211

Description of problem:
When kicking off Capsule sync and clicking to the Actions::Katello::CapsuleContent::Sync task details still during Planning phase, Params show confusing error:

Params: undefined method `[]' for nil:NilClass (NoMethodError) /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.158/app/lib/actions/katello/capsule_content/sync.rb:18:in `humanized_input' ..

(very long backtrace follows, attached in next comment)

That error is confusing / red herring since it appears during any Caps sync, even if the task proceeds well.

Steps to Reproduce:
1. Have external Capsule
2. Ideally have many repos to be synced to the Caps (to make planning phase longer)
3. Trigger Caps sync
4. As soon as possible, refresh task list and click to details of the CapsuleContent::Sync task

Actual results:
Params: undefined method `[]' for nil:NilClass (NoMethodError)

Expected results:
Params to be empty / at least without the error

Additional info:

We should probably not try to render the humanized_input/output during the planning phase,
when input is empty, as it's most porbably not available yet.

Also available in: Atom PDF