Skip to content

refactor(framework): Delay launch SuperExec in isolation subprocess#6963

Closed
jafermarq wants to merge 2 commits intomainfrom
wait-for-serverappio-to-be-ready-v2
Closed

refactor(framework): Delay launch SuperExec in isolation subprocess#6963
jafermarq wants to merge 2 commits intomainfrom
wait-for-serverappio-to-be-ready-v2

Conversation

@jafermarq
Copy link
Copy Markdown
Member

No description provided.

@jafermarq jafermarq requested a review from tanertopal as a code owner April 7, 2026 10:32
Copilot AI review requested due to automatic review settings April 7, 2026 10:32
@jafermarq jafermarq requested a review from danieljanes as a code owner April 7, 2026 10:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR delays launching the flower-superexec subprocess when running SuperLink in isolation subprocess mode, aiming to avoid a startup race where SuperExec starts before SuperLink is fully ready.

Changes:

  • Add a 1-second delay before starting SuperExec when --isolation=subprocess is used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 425 to 431
command = ["flower-superexec", "--insecure"]
command += ["--appio-api-address", appio_address]
command += ["--plugin-type", ExecPluginType.SERVER_APP]
command += ["--parent-pid", str(os.getpid())]
sleep(1) # Delay launch of SuperExec to ensure SuperLink is ready
# pylint: disable-next=consider-using-with
subprocess.Popen(command)
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Using a fixed sleep(1) to avoid a startup race is brittle and can still fail on slower machines/CI (or unnecessarily slow down startup on fast machines). Prefer a deterministic readiness check before launching SuperExec (e.g., poll until the ServerAppIo address accepts a TCP connection / gRPC channel is ready with a bounded timeout, or move retry/backoff logic into SuperExec when connecting).

Copilot uses AI. Check for mistakes.
@jafermarq jafermarq marked this pull request as draft April 7, 2026 10:36
@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Apr 7, 2026
@jafermarq jafermarq closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants