fix: use --no-cache for ansible-galaxy to prevent concurrent cache corruption
CI / validate (pull_request) Successful in 2m15s
CI / auto-merge (pull_request) Successful in 39s

When 6 molecule runners install ansible-galaxy collections concurrently,
they share the same response cache, causing:
  Missing expected 'results' in ansible-galaxy cache
  This may indicate cache corruption (from concurrent ansible-galaxy runs)

Adding --no-cache bypasses the shared cache entirely, preventing the
race condition.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
emil
2026-08-05 20:55:47 +02:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 3ad362016c
commit 16f2167a56
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -108,6 +108,8 @@ class TestInstallAnsibleCollections:
mock_path.return_value.__str__ = lambda _: str(req)
_install_ansible_collections(".venv/bin")
mock_run.assert_called_once()
args = mock_run.call_args[0][0]
assert "--no-cache" in args, "ansible-galaxy must use --no-cache to avoid concurrent cache corruption"
@patch("devx.tools.setup._run")
def test_skips_when_no_requirements(self, mock_run: MagicMock) -> None: