Repository navigation
fix(ui): keep OntologyNativeTreeShell spec inside the UI tree - #36741
Conversation
The spec read sparqlQuerySettings.json from openmetadata-service through a path eight levels above itself. Collate runs the OSS specs from a mirrored copy where that path does not exist, so Playwright test collection aborted with ENOENT and both full AUT lanes listed 0 tests. Read the seeds from a playwright/constant copy instead, as the no-restricted-imports rule asks.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Code Review ✅ Approved🟢 Low risk · The changes are confined to Playwright fixtures and collection, affecting test setup and assertions without changing application runtime behavior. Moves the seed query templates for VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #
The nightly AUT run 41178829782 (1.12.14 ➡ main) fails on both full lanes (MySQL and PostgreSQL) at Playwright test collection, before any test runs:
Cause.
OntologyNativeTreeShell.spec.ts(added in #36190) reads the backend seed filesparqlQuerySettings.jsonat module load through../../../../../../../../openmetadata-service/.... That path resolves in this repo. Collate runs the OSS specs from a mirrored copy of the UI tree, where the same eight levels end atcollate-ui/src/, which has noopenmetadata-service. A module-load error aborts collection for the whole project.Fix.
playwright/constant/ontology.ts, a copy of the three seed query templates typed with the generatedSavedSparqlQuery.OntologyNativeTreeShell.spec.tsreads the seeds from that constant and no longer usesfs/path.I first tried importing the app's
BUNDLED_GLOSSARY_QUERY_TEMPLATES, butno-restricted-importsforbids app code fromsrc/in Playwright and asks for a copy underplaywright/. Drift between the backend seeds and the app constant is still caught byOntologyStudioQueryConsole.test.tsx, which loads the real backend file. If the Playwright copy drifts, the spec's visibility assertions fail.Type of change:
Tests:
Use cases covered
OntologyNativeTreeShell.spec.tsfrom a copy of the UI tree that has noopenmetadata-servicebeside it.Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Features/OntologyNativeTreeShell.spec.ts,playwright/constant/ontology.tsThe new constant is byte-for-byte equal (
JSON.stringify) toqueryTemplatesinopenmetadata-service/.../sparqlQuerySettings.json.npx playwright test playwright/e2e/Features/OntologyNativeTreeShell.spec.ts --listlists the spec's tests. ESLint and Prettier pass on both files.Reproduced the AUT failure locally. I copied the Collate layout (OSS UI mirrored under
collate-ui/.../src/openmetadata-ui/, noopenmetadata-servicebesidecollate-ui/src/) and used the nightly'sautomate-upgrade-tests/scripts/k8s/playwright.config.ts. Then I ran the command fromlist-playwright-contract.sh:npx playwright test --project=chromium --grep-invert '@dataAssetRules|@askcollate|@ingestion' --workers=3 --reporter=list --listmain)ENOENT ... sparqlQuerySettings.jsonatOntologyNativeTreeShell.spec.ts:32,Total: 0 tests in 0 files(same as CI)Total: 5508 tests in 560 files, bothOntologyNativeTreeShelltests listedNot run against a live server; the assertions themselves are unchanged.