What needs to change
The post-build nginx smoke test in .github/workflows/test.yaml (the 🧪 Checking Nginx responses... block) asserts content types with single-shot curls and no retry — assert_header and assert_final_content_type. A single transient response fails the whole Docs build job.
Add a bounded retry with backoff (e.g. 3 attempts ~2s apart) inside those two helpers, so a one-off blip is absorbed while a genuinely broken route still fails every attempt (coverage unchanged).
Why
The check intermittently red-Xes unrelated PRs. On #2827 it failed on:
assert_header ".../sdk/python/docs/changelog.md" "Content-Type" "text/markdown"
❌ got text/html
It's demonstrably nondeterministic: two consecutive builds on that branch — the baseline commit passed this assertion, a README-only commit failed it, and a plain re-run (no code change) went green. Master is not persistently affected. Each occurrence costs a manual re-run and erodes trust in the required checks.
Scope note: retry is the pragmatic fix. The deeper root cause — why a child-repo .md variant occasionally serves text/html before the markdown variant is ready — may deserve separate investigation into the nginx content-negotiation / try_files for child repos.
Source
What needs to change
The post-build nginx smoke test in
.github/workflows/test.yaml(the🧪 Checking Nginx responses...block) asserts content types with single-shotcurls and no retry —assert_headerandassert_final_content_type. A single transient response fails the whole Docs build job.Add a bounded retry with backoff (e.g. 3 attempts ~2s apart) inside those two helpers, so a one-off blip is absorbed while a genuinely broken route still fails every attempt (coverage unchanged).
Why
The check intermittently red-Xes unrelated PRs. On #2827 it failed on:
It's demonstrably nondeterministic: two consecutive builds on that branch — the baseline commit passed this assertion, a README-only commit failed it, and a plain re-run (no code change) went green. Master is not persistently affected. Each occurrence costs a manual re-run and erodes trust in the required checks.
Scope note: retry is the pragmatic fix. The deeper root cause — why a child-repo
.mdvariant occasionally servestext/htmlbefore the markdown variant is ready — may deserve separate investigation into the nginx content-negotiation /try_filesfor child repos.Source
.github/workflows/test.yaml.Acceptheader for child repositories #2032.