Skip to content

test(e2e): quarantine the run_dbconnect magic-comments test (headless-harness stall)#2023

Closed
rugpanov wants to merge 1 commit into
mainfrom
fix/run-dbconnect-magic-ipynb
Closed

test(e2e): quarantine the run_dbconnect magic-comments test (headless-harness stall)#2023
rugpanov wants to merge 1 commit into
mainfrom
fix/run-dbconnect-magic-ipynb

Conversation

@rugpanov

@rugpanov rugpanov commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Quarantines (it.skip) the e2e test should run a databricks notebook with dbconnect and handle magic comments, which consistently fails in the headless CI harness. Closes the loop on the last still-failing run_dbconnect test after the merged de-flake work (#2019/#2020/#2021 + diagnostics #2013).

Tracking issue: #2026.

Why quarantine rather than fix

The failure is a headless webdriver/xvfb harness artifact, not a product bug — verified on a real machine that Run All runs every cell, and running the cells one-by-one through the kernel produces all outputs. In the harness, Run All runs the first DBConnect cell and doesn't advance; the %sql/%run cells stay <not run>.

I attempted real fixes before quarantining (details in #2026 and the code comment):

  • Driving the Interactive Window cells by index — not possible (IW is input-box-only).
  • Rewriting as a real .ipynb and driving cells via notebook.cell.execute — the first cell completes, but a subsequently-driven cell never reaches a terminal executionSummary in the harness, regardless of cell content (reproduced with plain spark.sql(...), ruling out the %sql display formatter). The failure is invisible from the test and can't be reproduced locally (no headless renderer). This needs someone who can debug the harness interactively.

What changed

Verification

  • tsc/eslint/prettier clean.
  • CI validation (databricks-eng e2e): with this test skipped, run_dbconnect no longer contributes the magic-test failure; remaining red shards in validation runs were unrelated pre-existing flakes (deploy_and_run_pipeline, bundle_init, unity_catalog).

/cc @anton-107 — final piece on the run_dbconnect stack; defer to you on whether to take this or the deeper harness fix in #2026.

This pull request and its description were written by Isaac.

@rugpanov

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests triggered for d0102cdd — ⏳ running.
View run

@rugpanov
rugpanov force-pushed the fix/run-dbconnect-magic-ipynb branch from d0102cd to a67a15b Compare July 17, 2026 09:25
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 09:25 — with GitHub Actions Inactive
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 09:25 — with GitHub Actions Inactive
@rugpanov

rugpanov commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 2 of 35 test jobs failed for a67a15bf (33 passed).
View run

@rugpanov
rugpanov force-pushed the fix/run-dbconnect-magic-ipynb branch from a67a15b to d36cc1a Compare July 17, 2026 11:05
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 11:05 — with GitHub Actions Inactive
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 11:06 — with GitHub Actions Inactive
@rugpanov

rugpanov commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 4 of 35 test jobs failed for d36cc1ab (31 passed).
View run

@rugpanov
rugpanov force-pushed the fix/run-dbconnect-magic-ipynb branch from d36cc1a to 4b842af Compare July 17, 2026 12:12
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 12:12 — with GitHub Actions Inactive
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 12:13 — with GitHub Actions Inactive
@rugpanov

rugpanov commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 2 of 35 test jobs failed for 4b842af1 (33 passed).
View run

…-harness stall)

*Why*
"should run a databricks notebook with dbconnect and handle magic comments"
consistently fails in the headless CI harness: "Jupyter: Run All Cells" runs
the first DBConnect cell and does not advance to the rest, so the `%sql`/`%run`
cells stay `<not run>` and their output files are never written.

This is a webdriver/xvfb-harness artifact, NOT a product bug — verified on a
real machine that Run All runs every cell, and running the cells one-by-one
through the kernel produces all outputs (magic-notebook-output.json /
databricks-run-notebook-output.json).

Attempts to make the test drive the cells explicitly did not resolve it:
- The `.py` "Databricks notebook source" file runs in an Interactive Window,
  which can only be driven through its input box (interactive.execute always
  appends+runs a new cell) — existing IW cells can't be executed by index.
- Rewriting as a real `.ipynb` and driving cells via `notebook.cell.execute`
  got the first cell (run by Run All) to complete, but a subsequently-driven
  cell never reached a terminal executionSummary in the harness, regardless of
  cell content (reproduced with a plain `spark.sql(...)` cell — so it is not the
  `%sql` display formatter). The failure is invisible from the test (no cell
  state, no output) and could not be reproduced locally (no headless renderer).

*What*
- Mark the test `it.skip` with a detailed comment explaining the harness-only
  root cause and the ruled-out approaches, pending a harness-side fix.
- The `%sql`/`%run` transform logic remains covered by the unit test
  databricks_magics_transformer_test.py.

*Verification*
- `tsc --noEmit -p src/test/e2e/tsconfig.json`: 0 errors; eslint + prettier: clean.
- Diff vs main is limited to skipping this one test; the other run_dbconnect
  tests are unchanged.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the fix/run-dbconnect-magic-ipynb branch from 4b842af to 4382121 Compare July 17, 2026 13:34
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 17, 2026 13:34 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 2023
  • Commit SHA: 438212129c7587904de803cf13c79f2d05090d24

Checks will be approved automatically on success.

@rugpanov rugpanov changed the title test(e2e): run the dbconnect magic test as an .ipynb and drive its cells test(e2e): quarantine the run_dbconnect magic-comments test (headless-harness stall) Jul 17, 2026
@rugpanov
rugpanov deployed to test-trigger-is July 17, 2026 13:35 — with GitHub Actions Active
@rugpanov

rugpanov commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 1 of 35 test jobs failed for 43821212 (34 passed).
View run

@rugpanov

Copy link
Copy Markdown
Contributor Author

Closing in favor of @anton-107's #2022, which covers the same run_dbconnect harness stall and is more complete (it skips both affected tests — the magic test AND should run a notebook with dbconnect — with a better fail-closed diagnostic gate). My investigation findings that weren't already in the tracking issue have been added as a comment on #2024 (notably: verified real-machine + one-by-one-kernel repro showing it's CI-renderer-only, and that both the Interactive Window and .ipynb+notebook.cell.execute driving approaches are dead ends). Deferring to #2022 for the quarantine.

@rugpanov rugpanov closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant