8000 simplify copy module by s-hertel · Pull Request #84313 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

simplify copy module #84313

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

Merged
merged 8 commits into from
Dec 10, 2024
Merged

simplify copy module #84313

merged 8 commits into from
Dec 10, 2024

Conversation

s-hertel
Copy link
Contributor
SUMMARY

The set_*_if_different methods handle check mode, null parameters, and looking up uid/gid, but the copy module reimplements a lot of that unnecessarily. This shouldn't change anything behavior-wise, only simplify the code.

ISSUE TYPE
  • Bugfix Pull Request

@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. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 14, 2024
@ansibot
Copy link
Contributor
ansibot commented Nov 14, 2024

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/modules/copy.py:289:0: unused-import: Unused import grp
lib/ansible/modules/copy.py:292:0: unused-import: Unused import pwd

click here for bot help

@s-hertel s-hertel added the ci_verified Changes made in this PR are causing tests to fail. label Nov 14, 2024
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Nov 14, 2024
…tes_if_different

set_context_if_different doesn't handle context=None as a no-op,
reconsider using set_fs_attributes_if_different later once path
recursion is consolidated
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Nov 14, 2024
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Nov 14, 2024
Copy link
Member
@sivel sivel left a comment

Choose a reason for hiding this comment

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

LGTM

@ansibot ansibot added the stale_review Updates were made after the last review and the last review is more than 7 days old. label Nov 20, 2024
@webknjaz

This comment was marked as resolved.

This comment was marked as resolved.

…irectory (or doesn't exist, so it can be created)
@s-hertel s-hertel force-pushed the simplify-copy-module branch from 573802d to 8537554 Compare November 20, 2024 16:03
@webknjaz

This comment was marked as resolved.

This comment was marked as resolved.

@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 Dec 2, 2024
@s-hertel

This comment was marked as resolved.

This comment was marked as resolved.

@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 Dec 5, 2024
@ansibot ansibot removed the stale_review Updates were made after the last review and the last review is more than 7 days old. label Dec 5, 2024
@s-hertel s-hertel merged commit f0f5d7f into ansible:devel Dec 10, 2024
74 checks passed
@s-hertel
Copy link
Contributor Author

Thanks for the reviews.

@ansible ansible locked and limited conversation to collaborators Jan 7, 2025
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. module This issue/PR relates to a module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0