Skip to content

remove hard coded "/tmp" in ansible-test injector paths#84316

Open
simonLeary42 wants to merge 1 commit intoansible:develfrom
simonLeary42:patch-1
Open

remove hard coded "/tmp" in ansible-test injector paths#84316
simonLeary42 wants to merge 1 commit intoansible:develfrom
simonLeary42:patch-1

Conversation

@simonLeary42
Copy link
Contributor

fixes #82214

Not entirely clear on why this was hardcoded in the first place, so there might be some good reason not to do this.

@ansibot ansibot added needs_triage Needs a first human triage before being processed. has_issue labels Nov 14, 2024
@simonLeary42
Copy link
Contributor Author

@mattclay git balme says you wrote these lines, do you know why it was hardcoded this way?

@webknjaz
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mattclay
Copy link
Member

@mattclay git balme says you wrote these lines, do you know why it was hardcoded this way?

There are two issues that can occur when using the default temporary directory:

  1. The directory may not be accessible by other users. When that occurs, it breaks integration tests which switch users.
  2. The directory may have a long enough path that it causes script shebangs to exceed the 127 character limit on Linux.

@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 26, 2024
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Dec 3, 2024
@simonLeary42
Copy link
Contributor Author

simonLeary42 commented Feb 13, 2025

since all CI checks pass, I assume that both of the above problems are caused by linux users setting their temp dir to something non-standard. If it's between mac users as a whole and a small subset of linux users, I would assume that it makes more sense to choose mac users. If these linux users were clever enough to set the TMP environment variable equal to a very deeply nested subdirectory without o+w and the sticky bit set, then they are clever enough to let ansible-test run with TMP unset.

@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Nov 21, 2025
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has_issue 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. 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.

ansible-test uses hardcoded /tmp with tempfile.mkdtemp() instead of relying on env vars

5 participants