Skip to content

[RUN-4297] fix race condition, now each instance uses its own tmp directory#431

Merged
ronaveva merged 3 commits intomaint/4.xfrom
RUN-4297-inventory
Apr 29, 2026
Merged

[RUN-4297] fix race condition, now each instance uses its own tmp directory#431
ronaveva merged 3 commits intomaint/4.xfrom
RUN-4297-inventory

Conversation

@ronaveva
Copy link
Copy Markdown
Contributor

This pull request improves the handling and documentation of temporary working directories in the AnsibleRunnerContextBuilder class. The changes clarify that each builder instance now uses its own exclusive temporary directory, improving safety and isolation during parallel executions. The code and comments have been updated to reflect this change, and the directory creation logic has been made more robust.

Directory isolation and safety improvements:

  • Updated the implementation so each builder instance creates and uses its own exclusive temporary directory (named ansible-exec-<executionId>-builder-<rand>/), ensuring no files are shared between sibling builders and making recursive cleanup always safe. [1] [2] [3]

Documentation and logging enhancements:

  • Improved comments and logging throughout the class to clarify the exclusive ownership of the builder-specific directory, its naming convention, and the implications for cleanup and debugging. [1] [2] [3]

@ronaveva ronaveva added this to the 5.20.1 milestone Apr 29, 2026
@ronaveva ronaveva merged commit a928efe into maint/4.x Apr 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants