Skip to content

front-proxy: retry the first request to absorb the startup race - #1650

Closed
phlax wants to merge 1 commit into
envoyproxy:mainfrom
phlax:front-proxy-wait
Closed

phlax wants to merge 1 commit into
envoyproxy:mainfrom
phlax:front-proxy-wait

Conversation

@phlax

@phlax phlax commented Nov 20, 2026

Copy link
Copy Markdown
Member

front-proxy's front-envoy has no healthcheck, so docker compose up --wait can return before it is serving — and the first request in verify.sh races it. Seen flaking on unrelated PRs: ERROR: curl (… /service/1) while front-envoy is Up 1 second, all other services already (healthy).

Wrap the first request in wait_for (the idiom opentelemetry already uses for the same race) so it retries until Envoy is up. No compose/admin change.

A workaround, not the root fix — giving the proxy Envoys healthchecks is a separate change.

(bot assisted)

front-envoy has no healthcheck, so `docker compose up --wait` can return
before it is serving, and the first request in verify.sh races it (seen
flaking on unrelated PRs: curl fails while front-envoy is "Up 1 second").
Wrap the first request in `wait_for` so it retries until Envoy is up.

A workaround, not the real fix — giving the proxy Envoys healthchecks is a
separate change.

Signed-off-by: Ryan Northey <ryan@synca.io>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain with the change to retry the initial front-proxy request during startup.

No open issues 🎉

What changed in this PR

Reduces startup-related flakiness in the front-proxy verification script by retrying the first request while front-envoy becomes ready. This is a workaround; proxy healthchecks remain a separate change.

Changes:

  • Wraps the service-1 HTTP assertion in wait_for, allowing up to 10 attempts.
  • Adds a comment explaining why Compose startup completion does not guarantee proxy readiness.
File Description
front-proxy/​verify.sh Retries the first service request and documents the startup race.

Review effort: Balanced

@phlax

phlax commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Folded into #1651 (the wait_for PR now covers front-proxy, zipkin, tls and lrs together). (bot assisted)

@phlax phlax closed this Nov 20, 2026
@phlax
phlax deleted the front-proxy-wait branch November 20, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants