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

Fixes #35885 - Error printing report with multiple results (#583) #588

Merged
merged 2 commits into from Jan 26, 2023

Conversation

nofaralfasi
Copy link
Contributor

@nofaralfasi nofaralfasi commented Jan 26, 2023

(cherry picked from commit ed16127)

…n#583)

* Fixes #35885 - Error printing report with multiple results

If Ansible job reported more than one results per action
then the config report page will fail to render. For example,
a task uses the Ansible copy module to copy multiple files
in a loop.

* Refs #35885 - fix rubocop issue

RuboCop::Cop::Lint::ShadowingOuterLocalVariable

module_args was in the `ansible_module_message` method scop,
and also as a parameter in the `get_results` function's signature

decided to remove the first definition of it as it wasn't used.

* Refs #35885 -  `end` was ommited during rebase

* Refs #35885 - fix tests undefined method `[]' for nil:NilClass

in case that `result['invocation']` is nil:
foreman_ansible/app/helpers/foreman_ansible/ansible_reports_helper.rb:98:in `block in get_results'

Co-authored-by: Ron Lavi <1ronlavi@gmail.com>

(cherry picked from commit ed16127)
@nofaralfasi nofaralfasi reopened this Jan 26, 2023
Copy link
Member

@Ron-Lavi Ron-Lavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nofaralfasi !

@Ron-Lavi Ron-Lavi merged commit 25711c1 into theforeman:10.0-stable Jan 26, 2023
@nofaralfasi nofaralfasi deleted the bump_10-3-0 branch February 23, 2023 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants