Skip to content

test(mesh): wait for the Docker servers to serve, and install Galaxy collections without the cache - #192

Merged
Mearman merged 2 commits into
mainfrom
fix/mesh-flakes
Nov 3, 2026
Merged

Mearman merged 2 commits into
mainfrom
fix/mesh-flakes

Conversation

@Mearman

@Mearman Mearman commented Nov 3, 2026

Copy link
Copy Markdown
Member

Two mesh flakes from run 41641946042.

Mesh (native_server) (job 125937402944): the role's first start of a Docker server returns once Compose has started the container, not once its API server serves. The scenario ran the native host's play straight after (servers' run ended 13:11:58, native refusal 13:12:08), and the version check reads the cluster through every server and refuses when none answers: node1 and node2 answered ServiceUnavailable, node3 had no kubeconfig yet. The refusal is right, so the fix is in the harness: native_server now waits until every Docker server's /readyz answers and every node is Ready before the native play, and logs whether the race was live on that run. The other scenarios already run assert_cluster (nodes Ready through node 1) before any second play, and the version check only needs one server to answer, so they don't have this race.

Mesh (regrade) (job 125937403105): not concurrency. The job runs a single ansible-galaxy on a fresh runner. _call_galaxy in ansible/galaxy/api.py writes an empty cache entry before it sends a request and only fills it on success. It is retried on 429, 502 and 520, so after one transient Galaxy error the retry finds the unexpired empty entry and raises Missing expected 'results' in ansible-galaxy cache. Every install that reaches a Galaxy server (mesh, litestream, arc-upgrade, helm-apply, bootstrap.sh) now passes --no-cache. tests/unit/test_galaxy_installs.py fails if any install drops the flag (checked by removing it from mesh-integration.yml), and reproduces the bug through ansible-core's own _call_galaxy: with the cache, one 502 then a failure with no second request; without it, two requests and success.

The failing main run at 4a6daa8 (2026-10-22, regrade) is a different cause: fleet-regrade listed nodes through node 3's kubeconfig before the recreated etcd-only container had written it. That was fixed by e052424 the same day, and main's mesh runs have passed since. #189 (host_network direct path via the runner's public endpoint) is a Tailscale endpoint choice, not a readiness race, so this doesn't fix it.

…st's run

The role's first start of a Docker server returns once Compose has started
the container, before its API server serves. native_server ran the native
host's play straight after, and its version check, which reads the cluster
through every server and refuses when none answers, found all three still
starting and refused. The scenario now waits until every server's /readyz
answers and every node is Ready, and logs whether the race was live.
ansible-core's _call_galaxy writes an empty cache entry before it sends a
request and fills it only on success. A request it retries (429, 502, 520)
therefore finds that unexpired entry on the retry and fails the install with
"Missing expected 'results' in ansible-galaxy cache", which a single
transient Galaxy error turned into a failed regrade job. Every install that
reaches a Galaxy server, in the workflows and bootstrap.sh, now passes
--no-cache, and a unit test checks each one and reproduces the cache
behaviour through ansible-core's own call.
@Mearman
Mearman marked this pull request as ready for review November 3, 2026 13:48
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-11-03T13:48:51.419596Z
We couldn’t complete this review. Comment @codex security review to try again.
0de58fd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit 2fe4121 into main Nov 3, 2026
33 checks passed
@Mearman
Mearman deleted the fix/mesh-flakes branch November 3, 2026 13:49
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.26.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant