Repository navigation
Backport #31958 to 1.13: fix(glue): stop a custom databaseName dropping every schema - #32400
Conversation
* fix(glue): stop a custom databaseName dropping every schema
databaseName labels the OpenMetadata database, it does not name a Glue
catalog. Schema discovery compared it against the Glue Catalog ID, so a
custom name matched nothing and every schema was skipped while the run
still reported Success.
Skip that comparison when databaseName is set, since one name means one
database and every visible Glue database is one of its schemas. Warn when
that merges schemas from more than one catalog, so same-named schemas
colliding is visible rather than silent.
Also correct the connection schema description, which claimed the default
database name is "default" while the code uses the Glue Catalog ID.
* Update generated TypeScript types
* fix(glue): read a schema's tables from its own catalog
_get_glue_tables called get_tables with DatabaseName only, so it read from
the caller's default catalog. Now that a schema from another catalog can be
yielded, its tables would come back empty or belong to a same-named database
in the wrong catalog.
Stash each schema's Catalog ID as it is yielded and pass it to get_tables.
The default path is unaffected, since the database there already is the
caller's Catalog ID.
* fix(glue): ignore a missing Catalog ID when counting catalogs
GlueSchema.CatalogId is Optional, and adding it unguarded put None in the
set used for the merge warning. Sorting that set then raised TypeError
outside the per-schema try/except, so one database without a Catalog ID
aborted schema discovery for the whole service.
Track only non-empty Catalog IDs, reusing the guard the catalog map
already applies.
* test(glue): assert on the warning reason, not the dict repr
Status.warnings holds {key: reason} dicts, so asserting against str() of
the entry depended on dict formatting and never checked which database the
warning was about. Index by the database name instead, so a warning keyed
to the wrong entity fails.
* fix(glue): read Iceberg column detail from the schema's own catalog
get_columns fetched Iceberg table detail with DatabaseName only, so for a
schema discovered in another catalog the lookup resolved in the caller's
catalog and raised. The fallback below it then served the unfiltered
storage-descriptor columns, bringing dropped Iceberg columns back as live
ones with only a logged warning.
Pass CatalogId the same way _get_glue_tables does.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
❌ 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 |
Code Review ✅ ApprovedBackport of fix to prevent custom OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
Both are test-only defects that main fixed and 1.13 never received. They are intermittent, so they did not appear in the #32400 baseline used to scope the previous commit, and only surfaced on the multi-node lane. - RdfGlossaryGraphIT.scopedResponseCarriesGlossaryNameAndIdPerNode awaited only node presence, then asserted `group` and `glossaryId` outside the Awaitility block. The node and its projection land in RDF separately, so on a slower run the node is already present while `group` is still null. Move the whole assertion inside untilAsserted. - WorkflowDefinitionResourceIT.test_WorkflowWithTeamCandidates and test_WorkflowWithReviewersOwnersCandidates created the table before the workflow could consume its creation event, yielding a second approval task ("expected: <1> but was: <2>") or no task at all within the 2 minute wait. Create the table only after the workflow is deployed. Taken from PR #32340 byte for byte, as with the previous commit. Verified locally on the mysql-elasticsearch profile: WorkflowDefinitionResourceIT 49 tests, 0 failures, 0 errors, 5 skipped. Note for anyone reproducing RdfGlossaryGraphIT locally: do not pass -DenableRdf=true. The class starts its own Fuseki container and calls RdfUpdater.initialize in @BeforeAll, so enabling RDF in TestSuiteBootstrap as well fails with "RdfRepository already initialized". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The openmetadata-service unit lane is red on every 1.13 PR, not just this one: 8 failures on #32400, #32371 and #32373. This branch already showed 6 — a strict subset, the other 2 (AuthenticationCodeFlowHandlerTest) having been fixed by #32408 landing on the base. Nothing here was caused by this branch; these are the remaining 6. Three assert against entities and fields that only exist on main/2.0, having been backported wholesale: - IndexMappingNestedFieldConsistencyTest asserted mappings for auditReport, aiApplication, llmModel and aiGovernance. None of those entities exist on 1.13. - SearchIndexFactoryTest asserted page reindex fields include "parent"; page hierarchy is main-only. - SearchRepositoryBehaviorTest expected the column child index to be aliased cluster_column_search_index; on 1.13 it is cluster_tableColumn. EntityCsvTest covers domain/data-product validation on bulk edit. SearchRepositoryBehaviorTest also gains a test for an EXTERNAL_HANDLER-only change emitting no child-update call, which needs the accompanying SearchRepository fix: appendUpdate/appendDelete/appendCreate appended a separator unconditionally, so a propagation whose switch branch deliberately emits nothing (certification, driven by propagateCertificationTags) produced a whitespace-only script that still fired updateChildren against every child index. The three guards only append the separator when the branch actually wrote something. That makes two product changes on this branch: the TestCaseRepository null/EntityNotFound guard and these three separator guards. Everything else is test-only. Verified locally: EntityCsvTest 63, SearchIndexFactoryTest 200, SearchRepositoryBehaviorTest 115, IndexMappingNestedFieldConsistencyTest 4 — 382 tests, 0 failures, 0 errors. Spotless clean. Taken from PR #32340 byte for byte. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>



Backport of #31958 to 1.13.
Setting the Glue
databaseNameproduced a successful ingestion with zero schemas and zero tables.get_database_schema_namescompared that label against the Glue Catalog ID (the AWS account ID), so nothing ever matched, every schema was skipped, and the run still reported Success with no failures and no warnings.Cherry-picked from
311b17d0f2f. Original issue: open-metadata/openmetadata-collate#5942.Two adjustments were needed, neither changes behaviour:
serviceProgressEvent.tsdoes not exist on 1.13, so that generated file is not part of this backport.Markdown(schema.Description)wrapped across three lines from before the ruff migration. It is now on one line, matching main, so future Glue backports keep applying cleanly. No other line was reformatted, and 1.13's copy of this file was already not black-clean before this change (the Fixes #31975: deduplicate Glue columns so partition keys do not drop the whole table #31978 backport in Backport #31978 to 1.13: deduplicate Glue columns so partition keys do not drop the whole table #32106 landed main-formatted lines the same way).Resulting code in the changed region is byte-identical to main.