Catch broken desktop packages before release (#2114)
* test(desktop): exercise packaged app startup The previous smoke exited before IPC, window creation, and preload execution, so a broken packaged preload could still pass. Launch the normal app and observe its renderer bridge and managed daemon through CDP instead. * test(desktop): preserve Linux sandbox in smoke Configure the unpacked artifact's chrome-sandbox helper with the permissions Electron requires, while keeping sandboxing enabled so preload failures remain observable. Bound startup probes and include process logs in daemon timeout failures. * ci(desktop): keep packaged smoke on releases Remove the temporary pull-request artifact build after it validated the Linux launch path. Keep the real packaged smoke in the native desktop release matrix. * ci(desktop): gate packaged smoke by changes Run the Linux real-artifact smoke in pull-request CI when packages/desktop changes, while leaving the regular desktop unit-test matrix unconditional.
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
session,
|
||||
webContents,
|
||||
} from "electron";
|
||||
import { createDaemonCommandHandlers, registerDaemonManager } from "./daemon/daemon-manager.js";
|
||||
import { registerDaemonManager } from "./daemon/daemon-manager.js";
|
||||
import { parsePassthroughCliArgsFromArgv, runPassthroughCli } from "./daemon/cli/passthrough.js";
|
||||
import { closeAllTransportSessions } from "./daemon/local-transport.js";
|
||||
import {
|
||||
@@ -121,8 +121,6 @@ const FORWARDED_PASEO_SHORTCUT_KEYS = new Set([
|
||||
"arrowup",
|
||||
"arrowdown",
|
||||
]);
|
||||
const DESKTOP_SMOKE_ENV = "PASEO_DESKTOP_SMOKE";
|
||||
const DESKTOP_SMOKE_STOP_REQUEST = "paseo-smoke-stop";
|
||||
app.setName(APP_NAME);
|
||||
|
||||
interface AttachedBrowserInput {
|
||||
@@ -822,53 +820,6 @@ async function runCliPassthroughIfRequested(): Promise<boolean> {
|
||||
return true;
|
||||
}
|
||||
|
||||
async function runDesktopSmokeIfRequested(): Promise<boolean> {
|
||||
if (process.env[DESKTOP_SMOKE_ENV] !== "1") {
|
||||
return false;
|
||||
}
|
||||
|
||||
const handlers = createDaemonCommandHandlers();
|
||||
const startStatus = await handlers.start_desktop_daemon();
|
||||
process.stdout.write(
|
||||
`[paseo-smoke] ${JSON.stringify({
|
||||
type: "desktop-daemon-smoke-started",
|
||||
status: startStatus,
|
||||
})}\n`,
|
||||
);
|
||||
|
||||
await waitForDesktopSmokeStopRequest();
|
||||
|
||||
const stopStatus = await handlers.stop_desktop_daemon();
|
||||
process.stdout.write(
|
||||
`[paseo-smoke] ${JSON.stringify({
|
||||
type: "desktop-daemon-smoke-stopped",
|
||||
stopStatus,
|
||||
})}\n`,
|
||||
);
|
||||
|
||||
app.exit(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
function waitForDesktopSmokeStopRequest(): Promise<void> {
|
||||
return new Promise((resolve) => {
|
||||
let buffer = "";
|
||||
const stop = () => {
|
||||
process.stdin.off("data", onData);
|
||||
resolve();
|
||||
};
|
||||
const onData = (chunk: Buffer | string) => {
|
||||
buffer += chunk.toString();
|
||||
if (buffer.includes(DESKTOP_SMOKE_STOP_REQUEST)) {
|
||||
stop();
|
||||
}
|
||||
};
|
||||
|
||||
process.stdin.on("data", onData);
|
||||
process.stdin.resume();
|
||||
});
|
||||
}
|
||||
|
||||
async function bootstrap(): Promise<void> {
|
||||
if (!setupSingleInstanceLock()) {
|
||||
return;
|
||||
@@ -912,9 +863,6 @@ async function bootstrap(): Promise<void> {
|
||||
},
|
||||
});
|
||||
ensureNotificationCenterRegistration();
|
||||
if (await runDesktopSmokeIfRequested()) {
|
||||
return;
|
||||
}
|
||||
registerDaemonManager();
|
||||
registerWindowManager();
|
||||
registerDialogHandlers();
|
||||
|
||||
Reference in New Issue
Block a user