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

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 18:59:29 +00:00
committed by emo
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent e6be27f75f
commit b2dd2229f1
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: