Skip to content

Fix flaky UC explorer e2e test (lazy-load race)#1945

Open
rugpanov wants to merge 1 commit into
mainfrom
fix/uc-explorer-e2e-virtual-scroll
Open

Fix flaky UC explorer e2e test (lazy-load race)#1945
rugpanov wants to merge 1 commit into
mainfrom
fix/uc-explorer-e2e-virtual-scroll

Conversation

@rugpanov

@rugpanov rugpanov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Why

The unity_catalog.ucws.e2e.ts e2e suite flakes on the Windows shard with:

AssertionError [ERR_ASSERTION]: Schema 'access' not found. Got: __internal_data_quality_monitoring
    at unity_catalog.ucws.e2e.ts:33:9

This cascades into 5 failing specs (every system.access-dependent test), e.g. run 28534564512.

Root cause — lazy-load race

UC tree nodes lazy-load their children over the network and stream them into the tree incrementally. openUCPath accepted the child list on the first poll where getChildren().length > 0, so it captured only the first schema that had arrived. __internal_data_quality_monitoring sorts before access (_ < a), so it streamed in first and the assertion ran before access had loaded.

What

  • Extract the expand-and-read logic from openUCPath into a new getStableChildren helper that requires the child count to be non-zero AND unchanged across 3 consecutive polls before returning — so the whole lazy-loaded batch has landed rather than just the first child.
  • openUCPath now delegates to getStableChildren for every path segment. Descent logic and the below-the-fold re-scroll behaviour are unchanged.

Test-helper only — no product/user-facing change.

Verification

  • npx tsc --noEmit — no new errors in the changed file.
  • npx eslint src/test/e2e/utils/unityCatalogUtils.ts — clean (exit 0).
  • Full e2e suite runs in databricks-eng/eng-dev-ecosystem; will validate on the isolated PR run.

This pull request and its description were written by Isaac.

*Why*
The `unity_catalog.ucws.e2e.ts` e2e suite flakes on the Windows shard with
`AssertionError: Schema 'access' not found. Got: __internal_data_quality_monitoring`,
cascading into 5 failing specs (all the `system.access` assertions). UC tree
nodes lazy-load their children over the network and stream them in
incrementally. `openUCPath` accepted the child list on the *first* poll where
`getChildren().length > 0`, so it captured only the first schema that arrived.
`__internal_data_quality_monitoring` sorts before `access` (`_` < `a`), so it
streamed in first and the assertion ran before `access` had loaded.

*What*
- Extract the expand-and-read logic from `openUCPath` into a `getStableChildren`
  helper that requires the child count to be non-zero AND unchanged across 3
  consecutive polls before returning, so the whole lazy-loaded batch has landed
  rather than just the first child.
- `openUCPath` now delegates to `getStableChildren` for every path segment;
  descent and below-the-fold re-scroll behaviour are unchanged.

*Verification*
- `npx tsc --noEmit` — no new errors in the changed file.
- `npx eslint src/test/e2e/utils/unityCatalogUtils.ts` — clean (exit 0).
- e2e runs in databricks-eng/eng-dev-ecosystem; will validate on the isolated PR run.

Co-authored-by: Isaac
@rugpanov rugpanov temporarily deployed to test-trigger-is July 1, 2026 18:33 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 1, 2026

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: 1945
  • Commit SHA: e4da51573e2a61724f62af7a0fd2ad7d6edb6a26

Checks will be approved automatically on success.

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