Skip to content

rpm_key: Added handler for ftp keys#83336

Closed
pvcasillasg wants to merge 12 commits intoansible:develfrom
pvcasillasg:patch-1
Closed

rpm_key: Added handler for ftp keys#83336
pvcasillasg wants to merge 12 commits intoansible:develfrom
pvcasillasg:patch-1

Conversation

@pvcasillasg
Copy link

Status code for fetch_url for ftp:// urls is None, this conditional change will allow to rpm_key for ftp urls usage

SUMMARY

Changed the conditional check when fetch a key, since fetch_url function sets a status == None for ftp urls.
fetch_keys uses the function fetch_url to retrieve the target file.
This conditional change will allow to check the url and when the url is ftp, will allow the return code none in order to retrieve the key, without disrupting the http/s retrieves

Fixes #83321

ISSUE TYPE
  • Bugfix Pull Request
ADDITIONAL INFORMATION

Issue refer to ansible 2.15, but still persisting in latest

Status code for fetch_url for ftp:// urls is None, this conditional change will allow to rpm_key for ftp urls usage
@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. module This issue/PR relates to a module. has_issue labels May 31, 2024
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 31, 2024
@Akasurde Akasurde changed the title Added handler for ftp keys rpm_key: Added handler for ftp keys May 31, 2024
@ansibot ansibot added the stale_review Updates were made after the last review and the last review is more than 7 days old. label May 31, 2024
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 31, 2024
@pvcasillasg pvcasillasg requested a review from Akasurde June 1, 2024 15:22
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
@pvcasillasg pvcasillasg requested a review from Akasurde June 1, 2024 20:25
@pvcasillasg
Copy link
Author

It's the docu ok now? @Akasurde

@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jun 4, 2024
Copy link
Member

@bcoca bcoca left a comment

Choose a reason for hiding this comment

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

Also there are no tests

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_review Updates were made after the last review and the last review is more than 7 days old. labels Jun 4, 2024
@ansibot ansibot added stale_review Updates were made after the last review and the last review is more than 7 days old. ci_verified Changes made in this PR are causing tests to fail. labels Jun 11, 2024
@ansibot
Copy link
Contributor

ansibot commented Jun 11, 2024

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/rpm_key.py:156:95: E202: whitespace before ')'

The test ansible-test sanity --test boilerplate [explain] failed with 3 errors:

lib/ansible/modules/rpm_key.py:0:0: invalid: __metaclass__ = type
lib/ansible/modules/rpm_key.py:0:0: invalid: from __future__ import absolute_import, division, print_function
lib/ansible/modules/rpm_key.py:0:0: missing: from __future__ import annotations

click here for bot help

@pvcasillasg
Copy link
Author

Attached test in screenshots:
Captura de pantalla 2024-06-11 a las 14 31 29
Captura de pantalla 2024-06-11 a las 14 31 22

@pvcasillasg pvcasillasg requested a review from bcoca June 11, 2024 12:34
@ansibot
Copy link
Contributor

ansibot commented Jun 11, 2024

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/rpm_key.py:12:1: E303: too many blank lines (3)

click here for bot help

@pvcasillasg
Copy link
Author

I made several commits, i paste my rpm_key.py file into GitHub, some sanity errors and missed to erase the file:/ check that I used for testing purposes.
Sorry for the commit mess

Please, review it and in the case something more is needed, please, ask for it and I will happy to help @Akasurde @bcoca
If you need the test in a format specific, please just explain to me how to do it, since is my first contribution.
Thanks!

@ansibot ansibot removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. ci_verified Changes made in this PR are causing tests to fail. labels Jun 11, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 25, 2024
@pvcasillasg pvcasillasg reopened this Jun 26, 2024
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 26, 2024
@pvcasillasg pvcasillasg reopened this Jun 26, 2024
@pvcasillasg
Copy link
Author

@Akasurde @bcoca is anything more needed to do?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 8, 2024
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_review Updates were made after the last review and the last review is more than 7 days old. labels Oct 1, 2024
@pvcasillasg
Copy link
Author

@bcoca can you review it? Can't merge since the status is still need_revisions

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Oct 25, 2024
@Akasurde
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 25, 2024
@pvcasillasg
Copy link
Author

How can I merge it?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 9, 2024
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jun 17, 2025
@pvcasillasg pvcasillasg closed this by deleting the head repository Jan 28, 2026
@ansible ansible locked and limited conversation to collaborators Feb 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue/PR relates to a bug. has_issue module This issue/PR relates to a module. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_pr This PR has not been pushed to for more than one year.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpm_key does not work with ftp:// URLs

4 participants