diff --git a/.github/workflows/deploy_tests_on_pull_request.yml b/.github/workflows/deploy_tests_on_pull_request.yml index 68819b0b5..ef9500f60 100644 --- a/.github/workflows/deploy_tests_on_pull_request.yml +++ b/.github/workflows/deploy_tests_on_pull_request.yml @@ -9,32 +9,9 @@ concurrency: jobs: - DevTests: - uses: ./.github/workflows/testing_dev.yml - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - LiveServices: - uses: ./.github/workflows/testing_dev_with_live_services.yml - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - + # NOTE: diagnostic branch only. Trimmed to just the flaky E2E job to iterate quickly. Do not merge. E2ELiveServices: uses: ./.github/workflows/testing_dev_e2e_with_live_services.yml secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} DANDI_SANDBOX_API_KEY: ${{ secrets.DANDI_SANDBOX_API_KEY }} - - BuildTests: - uses: ./.github/workflows/testing_flask_build_and_dist.yml - - ExampleDataCache: - uses: ./.github/workflows/example_data_cache.yml - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - S3_GIN_BUCKET: ${{ secrets.S3_GIN_BUCKET }} - - ExampleDataTests: - needs: ExampleDataCache - uses: ./.github/workflows/testing_pipelines.yml diff --git a/.github/workflows/testing_dev_e2e_with_live_services.yml b/.github/workflows/testing_dev_e2e_with_live_services.yml index f10853590..d190bf775 100644 --- a/.github/workflows/testing_dev_e2e_with_live_services.yml +++ b/.github/workflows/testing_dev_e2e_with_live_services.yml @@ -22,18 +22,10 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - label: environments/environment-Linux.yml - - - os: macos-latest # Mac arm64 runner - label: environments/environment-MAC-apple-silicon.yml - + # NOTE: diagnostic branch only. Reduced to the flaky x64 runner. Do not merge. - os: macos-15-intel # Mac x64 runner label: environments/environment-MAC-intel.yml - - os: windows-latest - label: environments/environment-Windows.yml - steps: - uses: actions/checkout@v6 diff --git a/src/electron/main/main.ts b/src/electron/main/main.ts index d50c4f16c..878de8cc6 100755 --- a/src/electron/main/main.ts +++ b/src/electron/main/main.ts @@ -36,6 +36,27 @@ if (runByTestSuite) { if (process.env.CI) app.commandLine.appendSwitch('disable-gpu') // Avoid GPU process crashes on CI runners (e.g. macOS Intel) } +// TODO(e2e-flake): temporary diagnostics to pin why Electron quits mid-test on the macOS Intel runner. Remove once identified. +if (runByTestSuite) { + // Log which signal (if any) arrives, then re-raise it so the default behavior is unchanged (no masking). + ;['SIGINT', 'SIGTERM', 'SIGHUP'].forEach((sig) => + process.once(sig as NodeJS.Signals, () => { + console.log(`[quit-diagnostic] process received ${sig}`) + process.kill(process.pid, sig as NodeJS.Signals) + }) + ) + process.on('exit', (code) => console.log(`[quit-diagnostic] main process exit, code ${code}`)) + app.on('render-process-gone', (_e, _wc, details) => + console.log(`[quit-diagnostic] app render-process-gone: ${JSON.stringify(details)}`) + ) + app.on('child-process-gone', (_e, details) => + console.log(`[quit-diagnostic] app child-process-gone: ${JSON.stringify(details)}`) + ) + app.on('will-quit', () => console.log('[quit-diagnostic] app will-quit')) + app.on('quit', () => console.log('[quit-diagnostic] app quit')) + app.on('window-all-closed', () => console.log('[quit-diagnostic] app window-all-closed')) +} + /************************************************************* * Python Process *************************************************************/ @@ -414,7 +435,18 @@ app.on('activate', () => { const root = runByTestSuite ? path.join(paths.root, '.test') : paths.root -if (runByTestSuite) onWindowReady(() => console.log('WINDOW READY FOR TESTING')) +if (runByTestSuite) onWindowReady((win) => { + console.log('WINDOW READY FOR TESTING') + // TODO(e2e-flake): temporary window/renderer lifecycle diagnostics. Remove once identified. + const wc = win.webContents + wc.on('render-process-gone', (_e, details) => console.log(`[quit-diagnostic] webContents render-process-gone: ${JSON.stringify(details)}`)) + wc.on('unresponsive', () => console.log('[quit-diagnostic] webContents unresponsive')) + wc.on('responsive', () => console.log('[quit-diagnostic] webContents responsive')) + wc.on('destroyed', () => console.log('[quit-diagnostic] webContents destroyed')) + wc.on('did-fail-load', (_e, code, desc) => console.log(`[quit-diagnostic] webContents did-fail-load: ${code} ${desc}`)) + win.on('close', () => console.log('[quit-diagnostic] window close')) + win.on('closed', () => console.log('[quit-diagnostic] window closed')) +}) const homeDirectory = app.getPath("home"); @@ -450,6 +482,8 @@ app.on("window-all-closed", () => { app.on("before-quit", async (ev: Event) => { + if (runByTestSuite) console.log(`[quit-diagnostic] before-quit fired\n${new Error().stack}`) // TODO(e2e-flake): remove once identified + ev.preventDefault() if (!runByTestSuite) { const { response } = await dialog