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

Correct usage for shutil.rmtree #31541

Merged
merged 6 commits into from
Oct 13, 2017
Merged

Correct usage for shutil.rmtree #31541

merged 6 commits into from
Oct 13, 2017

Conversation

Akasurde
Copy link
Member

SUMMARY

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/modules/source_control/git.py

ANSIBLE VERSION
2.5devel

@Akasurde
Copy link
Member Author

ready_for_review

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 10, 2017
@andronat
Copy link
Contributor

I think a unit test should be introduced that exercise those lines (like the example I gave in #31225).

@Akasurde Akasurde force-pushed the i31225 branch 2 times, most recently from 15933d8 to d243568 Compare October 11, 2017 05:07
@ansibot
Copy link
Contributor

ansibot commented Oct 11, 2017

The test ansible-test sanity --test yamllint [?] failed with the following error:

test/integration/targets/git/tasks/archive.yml:10:34: syntax error: expected <block end>, but found '<scalar>'

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. 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 Oct 11, 2017
Fix adds correct usage of shutil.rmtree in git module

Fixes: ansible#31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 11, 2017
@Akasurde
Copy link
Member Author

ready_for_review

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Oct 11, 2017
Copy link
Contributor

@mkrizek mkrizek left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Oct 11, 2017
- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed shipit This PR is ready to be merged by Core labels Oct 12, 2017
@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 Oct 12, 2017
The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.
@samdoran samdoran self-assigned this Oct 12, 2017
@mattclay
Copy link
Member

CI failure in integration test test/integration/targets/git/tasks/archive.yml:6:

'ansible_distribution_major_version' is undefined

This error occurs on FreeBSD and macOS.

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Oct 12, 2017
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 12, 2017
@samdoran samdoran merged commit a047fe0 into ansible:devel Oct 13, 2017
BondAnthony pushed a commit to BondAnthony/ansible that referenced this pull request Oct 14, 2017
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: ansible#31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing
mtb-xt pushed a commit to mtb-xt/ansible that referenced this pull request Oct 15, 2017
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: ansible#31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing
@abadger abadger moved this from TODO: Next release to TODO: Nice to have in 2.4.x Blocker List Oct 17, 2017
@abadger abadger moved this from TODO: Nice to have to To be cherrypicked (rc only) in 2.4.x Blocker List Oct 17, 2017
@abadger
Copy link
Contributor

abadger commented Oct 18, 2017

cherrypicked to stable-2.4 for 2.4.1rc2

@abadger abadger moved this from To be cherrypicked (rc only) to Done in 2.4.1 in 2.4.x Blocker List Oct 18, 2017
abadger pushed a commit that referenced this pull request Oct 18, 2017
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing

(cherry picked from commit a047fe0)
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
2.4.x Blocker List
Done in 2.4.1
Development

Successfully merging this pull request may close these issues.

ansible git fails when archive is used
7 participants