fix(gateway): await startup sidecars by default

Co-authored-by: 忻役 <xinyi@mininglamp.com>
This commit is contained in:
Peter Steinberger
2026-04-24 18:25:45 +01:00
parent 129f548c44
commit cba92f893d
3 changed files with 5 additions and 2 deletions

View File

@@ -197,6 +197,7 @@ describe("startGatewayPostAttachRuntime", () => {
{
...createPostAttachParams(),
unavailableGatewayMethods,
awaitSidecars: false,
},
createPostAttachRuntimeDeps({ startGatewaySidecars }),
);

View File

@@ -520,7 +520,7 @@ export async function startGatewayPostAttachRuntime(
params.log.warn(`gateway sidecars failed to start: ${String(err)}`);
});
if (params.awaitSidecars === true) {
if (params.awaitSidecars !== false) {
const [stopGatewayUpdateCheck, tailscaleCleanup, sidecarsResult] = await Promise.all([
stopGatewayUpdateCheckPromise,
tailscaleCleanupPromise,

View File

@@ -230,7 +230,9 @@ export type GatewayServerOptions = {
prompter: import("../wizard/prompts.js").WizardPrompter,
) => Promise<void>;
/**
* Test-only: wait for post-listen sidecars such as plugin services before returning.
* Whether to wait for post-listen sidecars (channels, plugin services) to finish
* starting before marking the gateway as ready. Defaults to true; pass false to
* let sidecars start in the background.
*/
awaitStartupSidecars?: boolean;
/**