Support parent-scoped asset counts and assets listing for glossary terms#26801
Support parent-scoped asset counts and assets listing for glossary terms#26801sonika-shah merged 6 commits intomainfrom
Conversation
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java
Outdated
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Adds an optional parent scope filter to glossary-term asset count and asset listing APIs, enabling callers (e.g., UI) to request results limited to a specific glossary or glossary-term subtree.
Changes:
- Add
parentquery parameter to/v1/glossaryTerms/assets/counts,/v1/glossaryTerms/{id}/assets, and/v1/glossaryTerms/name/{fqn}/assets. - Extend
GlossaryTermRepositorymethods to acceptparentand apply parent-scope filtering. - Add integration tests covering the new
parentquery parameter on these endpoints.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| openmetadata-service/src/main/java/org/openmetadata/service/resources/glossary/GlossaryTermResource.java | Exposes the new parent query parameter on glossary term asset count/listing endpoints. |
| openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java | Implements parent-scope filtering for asset counts and asset listing queries. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/GlossaryTermResourceIT.java | Adds integration tests intended to validate parent-filtered asset counts and asset listing behavior. |
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java
Outdated
Show resolved
Hide resolved
...-service/src/main/java/org/openmetadata/service/resources/glossary/GlossaryTermResource.java
Outdated
Show resolved
Hide resolved
...-service/src/main/java/org/openmetadata/service/resources/glossary/GlossaryTermResource.java
Outdated
Show resolved
Hide resolved
...tadata-integration-tests/src/test/java/org/openmetadata/it/tests/GlossaryTermResourceIT.java
Show resolved
Hide resolved
...tadata-integration-tests/src/test/java/org/openmetadata/it/tests/GlossaryTermResourceIT.java
Outdated
Show resolved
Hide resolved
...tadata-integration-tests/src/test/java/org/openmetadata/it/tests/GlossaryTermResourceIT.java
Outdated
Show resolved
Hide resolved
OpenMetadata Service New-Code Coverage❌ FAIL. Required changed-line coverage:
Files below threshold:
Only changed executable lines under |
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java
Outdated
Show resolved
Hide resolved
🟡 Playwright Results — all passed (27 flaky)✅ 3434 passed · ❌ 0 failed · 🟡 27 flaky · ⏭️ 223 skipped
🟡 27 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…filter guard clause
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java
Outdated
Show resolved
Hide resolved
...tadata-service/src/main/java/org/openmetadata/service/search/InheritedFieldEntitySearch.java
Outdated
Show resolved
Hide resolved
…d clean up dead hierarchy code
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java
Show resolved
Hide resolved
...-service/src/main/java/org/openmetadata/service/resources/glossary/GlossaryTermResource.java
Show resolved
Hide resolved
…thout full deserialization
Code Review 👍 Approved with suggestions 3 resolved / 4 findingsAdds parent-scoped asset counts and assets listing for glossary terms with performance optimizations including Elasticsearch query pushdown and reduced deserialization. Consider consolidating the redundant getCertificationClassification() call to avoid duplicate processing per entity read. 💡 Performance: getCertificationClassification() called redundantly per entity readThe Suggested fix✅ 3 resolved✅ Performance: getAllGlossaryTermsWithAssetsCount loads all terms before filtering
✅ Bug: Parent filter silently ignored when term is not under parent
✅ Performance: Parent-scoped path deserializes full entity JSON unnecessarily
🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
@gitar-bot can you review the backend changes again #26801 (comment) |
Here's my review of the latest backend changes:
The refactor correctly addresses the previous concerns:
One remaining concern:
The change here is a minor cosmetic refactor (extract Note: the earlier finding about the missing parent-filter guard in
Clean —
The added assertion
Test coverage is solid overall. A few observations:
Summary: The changes are in good shape. The only actionable item is adding a |
|



Describe your changes:
Fixes #3241
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>