Fix flaky UC explorer e2e test (lazy-load race)#1945
Open
rugpanov wants to merge 1 commit into
Open
Conversation
*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
Contributor
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
unity_catalog.ucws.e2e.tse2e suite flakes on the Windows shard with: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.
openUCPathaccepted the child list on the first poll wheregetChildren().length > 0, so it captured only the first schema that had arrived.__internal_data_quality_monitoringsorts beforeaccess(_<a), so it streamed in first and the assertion ran beforeaccesshad loaded.What
openUCPathinto a newgetStableChildrenhelper 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.openUCPathnow delegates togetStableChildrenfor 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).databricks-eng/eng-dev-ecosystem; will validate on the isolated PR run.This pull request and its description were written by Isaac.