Skip to content

Fixes #36326: Java ITs for API behaviour only Playwright tested - #36327

Merged
chirag-madlani merged 13 commits into
mainfrom
test/java-it-playwright-gaps
Nov 24, 2026
Merged

chirag-madlani merged 13 commits into
mainfrom
test/java-it-playwright-gaps

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #36326

This adds Java integration tests for server behaviour that today only Playwright E2E tests check, so those Playwright tests can be marked @migrated-java-it in #36198 and retired. It's test code only; the one non-test fix is in a test-support helper.

Area IT Playwright tests it covers
Search RBAC, regular users SearchRbacIT (11 asset types + Table column, Explore browse) Flow/SearchRBAC.spec.ts
Custom properties, all 16 types define / set / replace / clear / delete on 16 contract types + table + chart, and tableColumn via PUT /columns/name/{fqn} Pages/CustomPropertiesApiContract.spec.ts (17 "removed property value variants")
Async delete + restore BaseEntityIT: /async/{id} soft and hard (202, then the delete lands), 404, 403 for non-admin, soft-delete then restore; enabled on 18 data-asset ITs Delete tests in Pages/Entity.spec.ts / Pages/ServiceEntity.spec.ts
Tasks per entity type TaskEntityTypeResolutionIT: Description / Ownership / Tier / Domain tasks on 13 types Features/Tasks/TaskAllEntities.spec.ts + the Container / Pipeline / Topic task specs
Rename consolidation DataProductResourceIT#test_renameThen*, TagResourceIT, GlossaryTermResourceIT Features/DataProductRenameConsolidation.spec.ts, Features/EntityRenameConsolidation.spec.ts
Owner inheritance APICollectionResourceIT#test_ownerInheritedByEndpoints Flow/ApiCollection.spec.ts
Ingestion bot domain access DomainIsolationIT#test_ingestionBot_readsDomainAssetsAndServices Flow/IngestionBot.spec.ts
Glossary approval after move GlossaryTermMoveApprovalIT: the single open task follows the moved term, plus rejection Features/Glossary/GlossaryApprovalAfterMove.spec.ts

Bug fixed in test support: CustomPropertyTestSupport.removeProperty called a DELETE endpoint that doesn't exist and swallowed the 404. Its callers (users, teams, data contracts) therefore left custom properties behind on every run.

Notes for reviewers

  • SearchRbacIT differs from the Playwright test: Playwright's global setup removes the DataConsumer default role from the Organization team. With that role in place, every user can view everything. So the "table-only" user is modelled as a deny on dashboards rather than an allow on tables.
  • Entity types skipped by the custom-property test: the 15 entity ITs whose type has no custom-property type, or doesn't accept extension, skip it.
  • Task is excluded from restore: it returns 405.
  • Database soft-delete + restore was already covered by RestoreHierarchyIT#syncRestore_restoresFullHierarchy.

Type of change:

  • Improvement

High-level design:

Placement rule from the testing strategy: if an assertion is still meaningful without a browser, it belongs in a Java IT. The per-test mapping (Playwright test → IT, with evidence) is kept alongside the migration in #36198.

Tests:

Unit tests

  • Not applicable (integration tests only).

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/.

  • Run locally, MySQL + Elasticsearch, parallel lane:

    mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel "-Dit.test=SearchRbacIT,TaskEntityTypeResolutionIT,ColumnCustomPropertiesIT#test_tableColumn_allPropertyTypes*,*IT#put_addEntityCustomAttributes+delete_restore_entity_200+delete_async*,DataProductResourceIT#test_renameThen*,TagResourceIT#test_renameAndUpdateDescriptionConsolidation+test_multipleRenamesWithUpdatesConsolidation,GlossaryTermResourceIT#test_renameAndUpdateDescriptionConsolidation,APICollectionResourceIT#test_ownerInheritedByEndpoints,DomainIsolationIT#test_ingestionBot*,GlossaryTermMoveApprovalIT#test_*MovingParentTerm*"
    

    Result: Tests run: 404, Failures: 0, Errors: 0, BUILD SUCCESS.

  • Not run locally:

    • the planner's full selection, since BaseEntityIT changed and that makes it the whole IT suite;
    • the Postgres + OpenSearch engine.

    The merge queue runs both.

  • python3 .github/scripts/plan_local_java_tests.py --check-branch: the map is complete. mvn spotless:check: clean.

Ingestion integration tests

  • Not applicable.

Playwright (UI) tests

UI screen recording:

Not applicable: backend test code only.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

The HTTP client cleanup requirement should be satisfied before merging.

Findings

  1. P2 HTTP clients stay open ▶

Summary

Adds Java integration coverage for behavior previously checked mainly through Playwright.

  • Search tests now check what each user's rules let them see.
  • Custom-property tests now cover every supported value type and remove definitions through the type API.
  • Delete tests now follow async requests through removal and restore.
  • Task tests now check approved metadata changes across entity types.
  • Rename follow-up edits now have tests for names and linked assets.
  • API endpoint tests now check owners inherited from their collection.
  • Ingestion-bot tests now check reads of assets and services in a domain.
  • Glossary approval tests now follow a task after its term moves.

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

A user denied a resource no longer finds that asset type in search,
explore or the per-type counts, while a ViewBasic-allowed user does,
across 11 asset types and table columns.
Replace the put_addEntityCustomAttributes placeholder: define each
property type on the entity type, set, replace and clear a value via
JSON Patch on /extension, then delete the definition. The same matrix
runs on tableColumn through the columns API.

CustomPropertyTestSupport.removeProperty called a DELETE endpoint that
does not exist and swallowed the 404, so every caller leaked its
property; it now removes by JSON Patch on the type.
The async-delete tests were empty placeholders and
delete_restore_entity_200 never restored. Now: async soft and hard
delete return 202 with the job and the job lands (soft-deleted, then
restorable; hard-deleted, gone with include=all), a missing id is 404,
a non-admin is 403, and every soft-deletable type restores to a live
entity. Async delete is enabled for the data-asset ITs whose resource
exposes /async/{id}.
Description, Ownership, Tier and Domain update tasks were only
asserted end to end for tables. A parametrised IT now approves each
applicable task type on 13 entity types and checks the entity carries
the new value.
…terms

A rename followed by an in-session tag, owner or description edit
keeps the data product's assets on the renamed FQN; tags and glossary
terms keep the new name and resolve by the new FQN, across three
rename cycles for tags.
Users, then a team, then no owner on the collection: the endpoint's
owners follow each change and are marked inherited.
After the parent term moves, exactly the original approval task is
open at the new FQN, and none remains once it is approved or
rejected; rejection drives the moved term to Rejected.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 08:28
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Oct 27, 2026
Copilot AI balanced review requested due to automatic review settings October 28, 2026 06:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 07:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 07:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@pmbrull
pmbrull requested a review from sonika-shah November 3, 2026 15:14
@chirag-madlani
chirag-madlani marked this pull request as draft November 4, 2026 05:15
…ht-gaps

# Conflicts:
#	openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TaskResourceIT.java
@gitar-bot

gitar-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

Java integration tests add coverage across API behaviors, while the helper fix improves test cleanup without changing production runtime behavior.

Adds Java integration tests covering server behaviour currently checked only by Playwright, including search RBAC, custom properties across 16 types, async delete and restore, task resolution, renames, owner inheritance, ingestion bot domain access, and glossary approval after move. 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

@chirag-madlani
chirag-madlani marked this pull request as ready for review November 23, 2026 14:46
Copilot AI balanced review requested due to automatic review settings November 23, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chirag-madlani
chirag-madlani enabled auto-merge (squash) November 24, 2026 06:49
@chirag-madlani
chirag-madlani merged commit 79d8aea into main Nov 24, 2026
97 of 99 checks passed
@chirag-madlani
chirag-madlani deleted the test/java-it-playwright-gaps branch November 24, 2026 10:35
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Java ITs for API behaviour that only Playwright tests today

3 participants