Repository navigation
[2.0] Fixes 36348: Glue test connection probes only what ingestion reads - #36574
Conversation
…36347) * Glue: honor schemaFilterPattern in the GetTables test-connection probe The probe ran GetTables on the first databases GetDatabases returned, ignoring the connection's schemaFilterPattern. A database the identity cannot read - e.g. a cross-account resource link that sorts first - failed Test Connection, and the metadata agent with it, since the source runs the check before its own schema filter applies. Filter while paging so excluded databases are never probed and a targeted one past the probe cap is still reached, and pass each database's CatalogId as ingestion does. * Glue: apply the database and table filters in the test-connection probe too The GetTables probe now matches what ingestion reads: databaseFilterPattern against the catalog ID (skipped when databaseName is set, as ingestion does), schemaFilterPattern against the Glue database name, and tableFilterPattern against table names. A database whose tables are all filtered out no longer counts, so the probe moves on to the next one. * Glue: probe with the pipeline's filters during ingestion, and bound the table scan GlueSource now scopes its startup test connection to the ingestion pipeline's database, schema and table filters, matching fully qualified names when useFqnForFiltering is set, as ingestion does. A pipeline that sets a filter only on the agent no longer probes a database it excludes. The connection's default patterns remain the fallback for a test run outside a pipeline. The table probe reads at most MAX_TABLES_TO_SCAN tables in total, so a selective tableFilterPattern cannot scan a large catalog past the step timeout. Adds tests for later pages, the probe cap and the scan budget. * Glue: report a spent scan budget distinctly, and record the probe's rules Running out of the table scan budget no longer reuses the 'ingestion would collect nothing' caveat; it returns 'Table probe stopped early'. Adds ADR:2026-10-27-glue-test-connection-probes-what-ingestion-reads for the pipeline-scoped filters and the 1000-table budget. * Glue: flag a table count cut short by the scan budget Kept tables found before the probe's scan budget ran out are a floor, not the database's total, so the summary now says the scan stopped. * Glue: accept an optional service name when scoping the probe to a pipeline WorkflowSource.serviceName is optional, which basedpyright flags at the GlueSource call site. * Glue: bound the database scan and match truncated table names in the probe A selective database or schema filter could page through a whole catalog before finding a target; cap it at 1000 databases with the non-blocking stopped-early caveat. Match the table filter on the first 128 characters of the name, as ingestion does. * Glue: page databases lazily and word the database-budget caveat by what was found Collecting targeted databases up front requested later pages even after the first database could prove access. Reading one database past the budget also stops a catalog of exactly the budget from being flagged as cut short. * Glue: name GetDatabases when a later database page fails the probe After an empty probe, resuming the lazy database iterator can request the next GetDatabases page; its failure was reported as the previous database's GetTables. Also correct the decision record: a denied database the filters keep still fails the check. (cherry picked from commit 5e06161)
❌ 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved🟡 Medium risk · Scoping Glue probes to pipeline filters and stopping after one readable database could let later unreadable, included databases fail only during ingestion. Glue test connection now probes only the databases and tables kept by the database, schema and table filters, so an unreadable excluded database no longer fails Test Connection or the metadata agent. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Backport of #36347 to
2.0. Fixes #36348.The Glue test connection now probes only the databases and tables that the database, schema and table filters keep, so an unreadable database the filters exclude no longer fails Test Connection or the metadata agent.
Clean cherry-pick (
git cherry-pick -x 5e061618c89).ingestion/tests/unit/source/database/glue/test_connection.py: 49 passed on2.0.🤖 Generated with Claude Code
Summary by Gitar
MAX_TABLES_TO_SCANand database reads atMAX_DATABASES_TO_SCAN, returning a non-blocking caveat when exhaustedGlueSourcepasses pipeline patterns viascope_to, so startup probes match the run's own filtersuseFqnForFilteringnames and truncates table names toTABLE_NAME_MAX_LENGTHas ingestion doesThis will update automatically on new commits.