Skip to content

Fixes #35293: Serve glossary CSV documentation for glossary-term import - #35301

Merged
mohityadav766 merged 1 commit into
mainfrom
fix/csv-docs-glossary-term
Oct 13, 2026
Merged

mohityadav766 merged 1 commit into
mainfrom
fix/csv-docs-glossary-term

Conversation

@mohityadav766

@mohityadav766 mohityadav766 commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #35293

The bulk import page asks GET /v1/csv/documentation/{entityType} for the column documentation of the type it imports into. For a glossary term that type is glossaryTerm, which has no documentation file, so every request failed with a 500 and was logged twice at ERROR: EntityCsv logged FATAL - ... before throwing, and the exception mapper logged the same exception again.

  • Glossary-term import already goes through GlossaryCsv, whose documentation is the glossary's, so glossaryTerm now gets the glossary documentation.
  • A type with no documentation throws EntityNotFoundException, so it returns a 404 instead of a 500.
  • The LOG.error before each rethrow is gone, so a failure is logged once, by whoever handles it.

The other items in #35293 are already fixed on main or only affect 2.0. The 2.0 changes are in #35302.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Importing terms into a glossary term gets the glossary CSV documentation instead of a 500.
  • Asking for documentation of a type that has none returns a 404.
  • A documentation file that exists but cannot be read or parsed still fails as a server error.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files updated: EntityCsvTest. The new test_getCsvDocumentationServesGlossaryDocumentationForGlossaryTerms checks glossaryTerm gets the same documentation as glossary, through the real classpath lookup. test_getCsvDocumentationLoadsKnownResourcesAndHandlesMissingEntityType now expects a 404 EntityNotFoundException.
  • EntityCsvTest: 66 tests, 0 failures.
  • Coverage: all 6 changed executable lines in EntityCsv.java (100%), measured with jacoco over EntityCsvTest.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for new/changed API endpoints.
  • Files added: CsvDocumentationResourceIT. glossaryTerm returns 200 with the same body as glossary, and an unknown type returns 404.
  • Not run locally: the local Docker VM had no room for the IT stack. The merge queue runs it.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

None beyond the tests above. The unit test runs the real classpath lookup, and the IT covers the HTTP status codes.

UI screen recording:

Not applicable — backend-only fix.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas. The alias map says why glossary terms share the glossary's documentation.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. N/A — no schema changes.
  • For a UI feature or feature task: N/A — backend-only fix.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Decision check: N/A — the one rule this adds, that glossary terms share the glossary's documentation, is stated in the code where it applies.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

The bulk import page asks /v1/csv/documentation/{entityType} for the type it
imports into. For a glossary term that is glossaryTerm, which has no
documentation file, so every request returned a 500 and was logged twice at
ERROR. Glossary-term import already goes through GlossaryCsv, so glossaryTerm
now gets the glossary's documentation. A type with no documentation returns a
404, and the FATAL log before the rethrow is gone.
@mohityadav766
mohityadav766 requested a review from a team as a code owner October 13, 2026 06:32
@mohityadav766 mohityadav766 added safe to test Add this label to run secure Github workflows on PRs backend labels Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

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

@gitar-bot

gitar-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Mapping glossary-term documentation requests to glossary content could show mismatched CSV guidance if formats diverge; missing documentation now returns 404.

Glossary-term CSV import now reuses the glossary documentation, and unknown entity types return a 404 instead of a 500 with duplicate error logging. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

@mohityadav766 mohityadav766 self-assigned this Oct 13, 2026
@mohityadav766
mohityadav766 added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit b168335 Oct 13, 2026
114 of 121 checks passed
@mohityadav766
mohityadav766 deleted the fix/csv-docs-glossary-term branch October 13, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glossary CSV docs and approval bugs, and expected failures logged as errors

2 participants