Skip to content

fix(playwright): align ontology library specs with the install job - #37510

Merged
anuj-kumary merged 4 commits into
mainfrom
anuj-kumary/ontology-failures-fix-pr
Nov 11, 2026
Merged

anuj-kumary merged 4 commits into
mainfrom
anuj-kumary/ontology-failures-fix-pr

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Describe your changes

Nightly AUT run 42924598595 fails 7 ontology tests on both MySQL and PostgreSQL. All 7 are deterministic failures on the first attempt. There are two causes.

1. Collate server, already being fixed in openmetadata-collate#8405. Collate forks backgroundJob.json and its copy lacks ONTOLOGY_PACK_INSTALL. In the Collate server log, every POST /ontologies/{id}/library/{pack}/install throws java.lang.NoSuchFieldError, so no library install ever completes. That breaks every "… Installed" assertion. This PR doesn't touch it.

2. Spec drift from #37489, fixed here. #37489 moved library installs to a background job and moved pack reviews to /library/{pack}/summary. Playwright was skipped on that PR, so the edited specs never ran. These tests fail against a plain OM server too, and would keep failing after #8405 merges:

Spec Problem Fix
OntologyNativeLibrary After the fhir→sosa-ssn rename, the industry filter check asserts that ontology-pack-sosa-ssn is visible and also has count 0 Assert that ontology-pack-fhir (healthcare) is filtered out; expect the badge text Aligned to SOSA/SSN
OntologyNativeImportReview › installs a pack… Waits for /ontologyChangeSets/*/apply, which installs no longer call; expects Publish (+62) Wait for the install job to settle as COMPLETED; expect +48
OntologyNativeImportReview › lists its items as New… Expects 62× New, but DCAT reviews 48 New and 14 Skipped. The skipped ones are properties whose ranges sit outside the pack (dcterms:Location, rdfs:Resource, foaf:Document…), as seen in the failure snapshot. NativeOntologyImportReviewIT already accepts NEW or SKIPPED Assert 62 rows: 48 New and 14 Skipped, with no warnings
OntologyNativeImportReview › a failed pack review… Mocks /library/*/review, but the UI now calls /summary Route /summary
OntologyNativeOperations › installs sosa-ssn ×2 Intercepts POST /ontologyChangeSets drafts and waits for a /library/{pack}/preview replay; the UI calls neither anymore Count /install starts. The source-ontology variant drops the first start and checks that the UI's Retry finishes the install. A reinstall into the installed target must settle as an empty job (total: 0)

New helper: waitForPackInstallJob(page, ontologyId) in playwright/utils/ontologyStudio.ts. It returns the settled job, whether that comes from the start response or from a poll.

Test titles are unchanged, so the timing baseline still applies.

Test evidence

  • Ran locally against an OM server built from this branch (MySQL + ES, no RDF, matching the chromium lane), with retries off. 36 passed, including setup and teardown. That covers OntologyNativeLibrary, OntologyNativeImportReview, OntologyNativeOperations and OntologyFirstRun, so all 7 tests that failed in the nightly now pass.
  • The first local run turned up one more stale assertion. The Library detail badge renders the pack abbreviation (Aligned to SOSA/SSN), not the full standard name. Fixed in b1bc823.
  • tsc --noEmit -p playwright/tsconfig.json: passes. ESLint on playwright/**: 0 errors. organize-imports and prettier leave the files unchanged.

🤖 Generated with Claude Code

#37489 moved library installs to the ONTOLOGY_PACK_INSTALL background job and
pack reviews to /library/{pack}/summary, but the specs it touched never ran
(Playwright was skipped on that PR), so the nightly AUT failed 7 ontology tests.

- OntologyNativeLibrary: the industry filter asserted sosa-ssn both visible and
  absent; assert the healthcare pack fhir is filtered out instead.
- OntologyNativeImportReview: wait for the install job, not a change-set apply;
  DCAT reviews 48 New and 14 Skipped (properties whose ranges sit outside the
  pack), so Publish grows by 48; route the failed review to /summary.
- OntologyNativeOperations: drop the change-set draft interception and the
  /preview replay the UI no longer calls; retry a lost install start and
  assert a reinstall settles as an empty (total 0) job.
- utils/ontologyStudio: waitForPackInstallJob returns the settled job.
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 11, 2026 03:28
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@anuj-kumary anuj-kumary added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Nov 11, 2026
…d-to badge

The detail badge renders the pack abbreviation (Aligned to SOSA/SSN), not the
standard's full name.
@anuj-kumary
anuj-kumary enabled auto-merge (squash) November 11, 2026 05:32
@gitar-bot

gitar-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

Changes are confined to Playwright ontology specs, a test helper, and generated impact metadata; they adjust test expectations without changing application behavior.

Realigns the ontology Playwright specs with the background install job from #37489, covering the sosa-ssn industry filter, the install wait and expected counts, the review summary route, and the install-start assertions. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary
anuj-kumary merged commit 1e55df4 into main Nov 11, 2026
61 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/ontology-failures-fix-pr branch November 11, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants