Skip to content

Harden flaky nginx content-type smoke test in Docs build (child-repo .md routes) #2829

Description

@marcel-rbro

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

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions