Repository navigation
Fixes 36348: Glue test connection probes only what ingestion reads - #36347
Conversation
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.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
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! |
…be 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.
|
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! |
…he 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.
…ules 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.
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.
…eline WorkflowSource.serviceName is optional, which basedpyright flags at the GlueSource call site.
…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.
…at 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.
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.
Code Review ✅ Approved 5 closed / 5 findings🟡 Medium risk · The Glue startup probe now follows pipeline filters and bounded paging; stopping at one readable table could let ingestion start despite later unreadable databases. Glue test-connection probe now applies the pipeline's database, schema, and table filters while paging, so it only reads what ingestion reads and skips denied databases. Scan budgets are bounded and caveats are worded accurately. Resolved the filter-source mismatch, budget-exhaustion messaging, lazy GetDatabases error attribution, and missing ADR coverage. No open issues found. ✅ 5 closed✅ Bug: Probe filters by the connection pattern, but ingestion filters by sourceConfig's
✅ Edge Case: Running out of the scan budget is reported as 'ingestion would collect nothing'
✅ Quality: New table-scan cap and pipeline-scoped probe rule are not recorded
✅ Edge Case: Database-budget caveat says every database was excluded when some were kept
✅ Edge Case: Lazy GetDatabases paging blames a later page failure on GetTables
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 |
|
…36347) (#36575) * 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)
…36347) (#36574) * 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)



Describe your changes:
Fixes #36348
The Glue
GetTablestest-connection step ignored the connection's filter patterns and probed the first databasesGetDatabasesreturned. A database the identity can't read — e.g. a cross-account resource link that sorts first — failed the step withAccessDeniedException, and the metadata agent with it, sinceGlueSourceruns the check before its own schema filter applies.The probe now applies the same filters ingestion does, while paging:
databaseFilterPatternon the catalog ID (skipped whendatabaseNameis set, as in ingestion)schemaFilterPatternon the Glue database nametableFilterPatternon table names (first 128 characters, as ingestion stores them) — a database whose tables are all filtered out doesn't count, so the probe moves onWhich patterns: during an ingestion run,
GlueSourcescopes the check to the pipeline's filters (sourceConfig), matching fully qualified names whenuseFqnForFilteringis set — exactly what ingestion reads. The connection's default patterns are the fallback for a standalone Test Connection.Excluded databases are never probed, and a targeted one past the 10-database cap is still reached. The scan is capped at 1000 databases and 1000 tables in total, so a selective filter can't outrun the step timeout; spending either cap without a kept table returns a non-blocking "Table probe stopped early" caveat. It also passes each database's
CatalogIdtoGetTables, as ingestion does.Decision record:
ADR:2026-10-27-glue-test-connection-probes-what-ingestion-reads(pipeline-scoped filters, scan budgets).Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
GlueSourceuseFqnForFiltering→ schema and table patterns match fully qualified namesGetDatabasespage fails after an empty probe → the failure namesglue:GetDatabases, not the previous database'sGetTablesUnit tests
ingestion/tests/unit/source/database/glue/test_connection.py(49 passed)Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
metadata ingestagainst a real AWS Glue catalog viaassumeRoleArn, with the role explicitly deniedglue:GetTableson the first-listed database andschemaFilterPatternincluding only the target:GetTables: Failed – AccessDeniedException, workflow aborts.Then, on real Glue with all three filters set (database: the account's catalog ID, schema:
^e2e_, which excludes the denied database, table: excludes^tmp_):GetTablescall and returned the non-blocking "No tables visible" caveat.The same scenarios also pass against a local Glue emulator, plus a run with the schema filter set only on the pipeline: before,
GetTablesfailed withAccessDeniedException; after, it passed and only the target was ingested.UI screen recording:
Not applicable — ingestion-only fix.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #36348above.docs/decisions/2026-10-27-glue-test-connection-probes-what-ingestion-reads.md.

Confidence Score: 5/5
The PR appears safe to merge; no new actionable issue remains.Summary
The Glue table check now uses the filters ingestion uses instead of probing excluded databases.
All seven supplied previous threads are unnumbered. Their requested fixes are present in the current code and tests.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Glue connection check] --> B{Pipeline run?} B -->|Yes| C[Use pipeline filters] B -->|No| D[Use connection filters] C --> E[Read database pages lazily] D --> E E --> F[Skip excluded databases] F --> G[Read and filter tables] G --> H{Kept table found?} H -->|Yes| I[Pass with table count] H -->|No, budget remains| E H -->|No, scan budget spent| J[Pass with stopped-early caveat]Reviews (11) · Last reviewed commit: "Merge branch 'main' into fix/glue-test-c..." · Reviewed by Greptile