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

The apt_key module did not properly handle GnuPG errors for certain actions #74478

Merged
merged 2 commits into from Apr 30, 2021

Conversation

maximmasiutin
Copy link
Contributor

@maximmasiutin maximmasiutin commented Apr 28, 2021

SUMMARY

Not all GnuPG return codes are analyzed (rc != 0) by the 'ansible.builtin.apt_key' module.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible.builtin.apt_key

ADDITIONAL INFORMATION

Fixes: #74477

@Akasurde - please review

I expected all calls of the 'gpg' binary have accompanying checks of the rc code. And if (rc != 0), then all relevant results are returned, including stdout and stderr, and also the command line with which the 'gpg' was called.

The command line with which 'gpg' was called is not always returned as information, and the return code of 'gpg' is not always checked, and the stdout/stderr is not always returned as information.

@ansibot ansibot added affects_2.12 module This issue/PR relates to a module. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 28, 2021
@maximmasiutin
Copy link
Contributor Author

ready_for_review

@ansibot ansibot added has_issue core_review In order to be merged, this PR must follow the core review workflow. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 28, 2021
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Apr 29, 2021
@ansibot ansibot removed the new_contributor This PR is the first contribution by a new community member. label Apr 29, 2021
Copy link
Contributor

@samdoran samdoran left a comment

Choose a reason for hiding this comment

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

Please add integration tests for this change.

changelogs/fragments/74478-apt_key-gpg-error-check.yaml Outdated Show resolved Hide resolved
lib/ansible/modules/apt_key.py Outdated Show resolved Hide resolved
@samdoran samdoran requested a review from bcoca April 29, 2021 19:20
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Apr 29, 2021
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. bug This issue/PR relates to a bug. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. labels Apr 30, 2021
…nt GnuPG error information was returned by the 'ansible.builtin.apt_key' module (ansible#74477)
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Apr 30, 2021
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Apr 30, 2021
Co-authored-by: Sam Doran <sdoran@redhat.com>
@ansibot ansibot added the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Apr 30, 2021
@samdoran samdoran changed the title The 'ansible.builtin.apt_key' module did not properly handle GnuPG errors for certain actions The apt_key module did not properly handle GnuPG errors for certain actions Apr 30, 2021
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 30, 2021
@bcoca bcoca merged commit daecb30 into ansible:devel Apr 30, 2021
@ansible ansible locked and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.12 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. has_issue module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The 'ansible.builtin.apt_key' module does not always check for 'gpg' return codes
4 participants