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

powershell - Improve Add-Type tempdir handler #83080

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

jborean93
Copy link
Contributor

SUMMARY

Improves the Add-Type temporary directory handler to include a retry mechanism and not fail on an error. Deleting a temporary file used in compilation is not a critical error and should improve the reliability of Ansible on Windows hosts.

I need to figure out a good way to test this out. I cannot replicate the underlying error but I think I can create a test that runs as an underprivileged user with the tempdir not giving delete access.

Fixes: ansible-collections/ansible.windows#598

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

ansibot commented Apr 18, 2024

The test ansible-test sanity --test pslint [explain] failed with 1 error:

lib/ansible/module_utils/powershell/Ansible.ModuleUtils.AddType.psm1:393:21: PSPlaceCloseBrace: Close brace does not follow a new line.

click here for bot help

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 18, 2024
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Apr 18, 2024
@jborean93 jborean93 force-pushed the powershell-c#-temp branch 2 times, most recently from c9a0353 to 51970cf Compare April 21, 2024 23:35
Improves the Add-Type temporary directory handler to include a retry
mechanism and not fail on an error. Deleting a temporary file used in
compilation is not a critical error and should improve the reliability
of Ansible on Windows hosts.
@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 Apr 22, 2024
@jborean93 jborean93 marked this pull request as ready for review April 22, 2024 00:09
@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 May 6, 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 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.

intermittent "unable to delete temporary file" errors
4 participants