Enable Linux Electron sandbox override for desktop perf runs
- Set `ELECTRON_DISABLE_SANDBOX=1` in CI desktop perf trace jobs - Auto-enable the same override in Linux `dev-electron` runs when unset - Add sandbox-failure log hint in perf trace diagnostics - Include `ELECTRON_DISABLE_SANDBOX` in Turbo passthrough env
This commit is contained in:
1 parent
0bca5a4215
commit
6721804b64
4 files changed
+12
No files matched your search
@@ -77,6 +77,7 @@ jobs:
|
||||
- name: Desktop perf trace test
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
ELECTRON_DISABLE_SANDBOX: "1"
|
||||
T3CODE_PERF_TIMEOUT_MS: "420000"
|
||||
T3CODE_PERF_MAX_LONG_DISPATCH_COUNT: "5"
|
||||
T3CODE_ELECTRON_STARTUP_TIMEOUT_MS: "180000"
|
||||
@@ -85,6 +86,7 @@ jobs:
|
||||
- name: Desktop perf trace test (fork PR)
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
||||
env:
|
||||
ELECTRON_DISABLE_SANDBOX: "1"
|
||||
T3CODE_PERF_TIMEOUT_MS: "420000"
|
||||
T3CODE_PERF_MAX_LONG_DISPATCH_COUNT: "5"
|
||||
T3CODE_ELECTRON_STARTUP_TIMEOUT_MS: "180000"
|
||||
@@ -94,6 +96,7 @@ jobs:
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ELECTRON_DISABLE_SANDBOX: "1"
|
||||
T3CODE_PERF_TIMEOUT_MS: "420000"
|
||||
T3CODE_PERF_MAX_LONG_DISPATCH_COUNT: "5"
|
||||
T3CODE_ELECTRON_STARTUP_TIMEOUT_MS: "180000"
|
||||
|
||||
@@ -107,6 +107,11 @@ const command = process.platform === "win32" ? "electronmon.cmd" : "electronmon"
|
||||
const childEnv = { ...process.env };
|
||||
delete childEnv.ELECTRON_RUN_AS_NODE;
|
||||
|
||||
if (process.platform === "linux" && !childEnv.ELECTRON_DISABLE_SANDBOX) {
|
||||
childEnv.ELECTRON_DISABLE_SANDBOX = "1";
|
||||
console.log("[dev-electron] enabling ELECTRON_DISABLE_SANDBOX=1 on Linux");
|
||||
}
|
||||
|
||||
const child = spawn(command, ["dist-electron/main.js"], {
|
||||
stdio: "inherit",
|
||||
env: {
|
||||
|
||||
@@ -351,6 +351,9 @@ function inferDesktopPerfTimeoutHint(logChunks) {
|
||||
if (lowered.includes("error while loading shared libraries")) {
|
||||
return "Electron failed to start due missing Linux shared libraries.";
|
||||
}
|
||||
if (lowered.includes("setuid_sandbox_host.cc") || lowered.includes("chrome-sandbox")) {
|
||||
return "Electron sandbox setup failed on Linux CI (setuid sandbox helper).";
|
||||
}
|
||||
if (lowered.includes("no usable sandbox")) {
|
||||
return "Electron sandbox failed to initialize in CI.";
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"VITE_WS_URL",
|
||||
"VITE_DEV_SERVER_URL",
|
||||
"ELECTRON_RENDERER_PORT",
|
||||
"ELECTRON_DISABLE_SANDBOX",
|
||||
"T3CODE_LOG_WS_EVENTS",
|
||||
"T3CODE_MODE",
|
||||
"T3CODE_PORT",
|
||||
|
||||
Reference in new issue
Block a user