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

Write auto-created private data dirs to pytest dir instead of /tmp #916

Merged
merged 3 commits into from Dec 14, 2021

Conversation

AlanCoding
Copy link
Member

I briefly discussed this option with @samdoran in #901

After this patch, we create directories that look like:

/tmp/pytest-of-alancoding/pytest-0/popen-gw2/test_no_dst_all_dirs_src__dir_0/.ansible-runner-2fpvb4uo

This is as opposed to leaving around directories like /tmp/.ansible-runner-2fpvb4uo. There are a lot of these, like ~1,700 created with a single test run excluding the integration tests.

There are still a few directories created in /tmp after this, but it's a handful, not a flood.

@samdoran samdoran added needs_triage New item that needs to be triaged test Changes to test files and removed needs_triage New item that needs to be triaged labels Nov 8, 2021
ansible_runner/defaults.py Outdated Show resolved Hide resolved
test/conftest.py Outdated Show resolved Hide resolved
Co-authored-by: Sam Doran <sdoran@redhat.com>
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Dec 8, 2021
@AlanCoding AlanCoding marked this pull request as ready for review December 9, 2021 15:51
@AlanCoding AlanCoding requested a review from a team as a code owner December 9, 2021 15:51
@samdoran samdoran removed the needs_triage New item that needs to be triaged label Dec 14, 2021
@samdoran samdoran added the gate label Dec 14, 2021
Copy link
Contributor

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

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

LGTM!

@samdoran
Copy link
Contributor

recheck

@ansible-zuul ansible-zuul bot merged commit 7f9de03 into ansible:devel Dec 14, 2021
samdoran pushed a commit to samdoran/ansible-runner that referenced this pull request Dec 14, 2021
…ead of /tmp (ansible#916)

Write auto-created private data dirs to pytest dir instead of /tmp

I briefly discussed this option with @samdoran in ansible#901
After this patch, we create directories that look like:
/tmp/pytest-of-alancoding/pytest-0/popen-gw2/test_no_dst_all_dirs_src__dir_0/.ansible-runner-2fpvb4uo

This is as opposed to leaving around directories like /tmp/.ansible-runner-2fpvb4uo. There are a lot of these, like ~1,700 created with a single test run excluding the integration tests.
There are still a few directories created in /tmp after this, but it's a handful, not a flood.

Reviewed-by: Sam Doran <github@samdoran.com>
Reviewed-by: None <None>
(cherry picked from commit 7f9de03)

Co-authored-by: Alan Rominger <arominge@redhat.com>
samdoran pushed a commit to samdoran/ansible-runner that referenced this pull request Dec 14, 2021
…ead of /tmp (ansible#916)

Write auto-created private data dirs to pytest dir instead of /tmp

I briefly discussed this option with @samdoran in ansible#901
After this patch, we create directories that look like:
/tmp/pytest-of-alancoding/pytest-0/popen-gw2/test_no_dst_all_dirs_src__dir_0/.ansible-runner-2fpvb4uo

This is as opposed to leaving around directories like /tmp/.ansible-runner-2fpvb4uo. There are a lot of these, like ~1,700 created with a single test run excluding the integration tests.
There are still a few directories created in /tmp after this, but it's a handful, not a flood.

Reviewed-by: Sam Doran <github@samdoran.com>
Reviewed-by: None <None>.
(cherry picked from commit 7f9de03)

Co-authored-by: Alan Rominger <arominge@redhat.com>
ansible-zuul bot pushed a commit that referenced this pull request Dec 14, 2021
…ead of /tmp (#916) (#942)

[release_2.0] Write auto-created private data dirs to pytest dir instead of /tmp (#916)

Backport of #916 for Ansible Runner 2.0.

Reviewed-by: David Shrewsbury <None>
Reviewed-by: None <None>
ansible-zuul bot pushed a commit that referenced this pull request Dec 14, 2021
…ead of /tmp (#916) (#941)

[release_2.1] Write auto-created private data dirs to pytest dir instead of /tmp (#916)

Backport of #916 for Ansible Runner 2.1.

Reviewed-by: David Shrewsbury <None>
Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Changes to test files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants