Skip to content

copy - fix recursively setting mode and directory_mode with remote_src=True #82658

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

Draft
wants to merge 5 commits into
base: devel
Choose a base branch
from

Conversation

s-hertel
Copy link
Contributor

@s-hertel s-hertel commented Feb 8, 2024

SUMMARY

Fixes #81126

Also simplified the chown_recursive function by walking the path once at most and using the module_utils functions to handle check mode, None values for owner/group/mode/directory_mode, and getting the cumulative changed value.

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. has_issue labels Feb 8, 2024
@s-hertel s-hertel force-pushed the copy-module-fix-recursive-mode branch 2 times, most recently from 89b8ac0 to 9f06c32 Compare February 8, 2024 02:36
@s-hertel s-hertel marked this pull request as draft February 8, 2024 02:37
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 8, 2024
@s-hertel s-hertel added the ci_verified Changes made in this PR are causing tests to fail. label Feb 8, 2024
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 8, 2024
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Feb 8, 2024
@s-hertel s-hertel added the ci_verified Changes made in this PR are causing tests to fail. label Feb 8, 2024
@s-hertel s-hertel force-pushed the copy-module-fix-recursive-mode branch 5 times, most recently from d6895d0 to b67aa9f Compare February 13, 2024 22:53
@s-hertel s-hertel marked this pull request as ready for review February 13, 2024 22:55
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 13, 2024
@s-hertel s-hertel added the ci_verified Changes made in this PR are causing tests to fail. label Feb 13, 2024
@s-hertel s-hertel marked this pull request as draft February 13, 2024 23:03
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 15, 2024
@s-hertel s-hertel added the ci_verified Changes made in this PR are causing tests to fail. label Feb 15, 2024
@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 Feb 16, 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 Mar 1, 2024
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Mar 19, 2024
@s-hertel s-hertel force-pushed the copy-module-fix-recursive-mode branch from d943040 to 756c695 Compare March 28, 2024 17:52
@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Mar 28, 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 Apr 11, 2024
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Oct 10, 2024
Update ``directory_mode`` so it applies to directories in the ``src`` as
well as directories created when ``dest`` ends with a trailing slash.

Simplify code already handled by module_utils

Add test and changelog

Fixes ansible#81126
…ait to return for check mode until we know if a change will be made
@s-hertel s-hertel force-pushed the copy-module-fix-recursive-mode branch from 756c695 to a8dc375 Compare November 14, 2024 15:27
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 14, 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 Dec 2, 2024
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. has_issue module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ansible.builtin.copy has unexpected behaviour when copying recursively with remote_src: true
3 participants