Skip to content

[2.1] Fixes 36348: Glue test connection probes only what ingestion reads - #36575

Merged
Khairajani merged 1 commit into
2.1from
backport/glue-test-connection-filters-2.1
Oct 30, 2026
Merged

Khairajani merged 1 commit into
2.1from
backport/glue-test-connection-filters-2.1

Conversation

@Khairajani

@Khairajani Khairajani commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #36347 to 2.1. 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 on 2.1.

🤖 Generated with Claude Code


Summary by Gitar

  • Test connection scoping:
    • GlueSource passes the pipeline's filter patterns to the startup test connection through scope_to
    • Fully qualified name matching applies when useFqnForFiltering is set
  • Scan limits:
    • Caps tables read at MAX_TABLES_TO_SCAN and databases read at MAX_DATABASES_TO_SCAN
    • Exhausting a budget returns a non-blocking "Table probe stopped early" caveat
  • Documentation:
    • Adds ADR 2026-10-27-glue-test-connection-probes-what-ingestion-reads

This will update automatically on new commits.

…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)
@Khairajani
Khairajani requested a review from a team as a code owner October 29, 2026 15:51
@Khairajani
Khairajani requested review from ulixius9 and removed request for a team October 29, 2026 15:51
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Applying pipeline filters and fixed scan budgets to Glue startup probes could miss unreadable kept databases, delaying failures until ingestion.

Glue test connection now probes only the databases and tables that the database, schema, and table filters keep, so an unreadable excluded database no longer fails Test Connection or the metadata agent. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

@Khairajani Khairajani added the safe to test Add this label to run secure Github workflows on PRs label Oct 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@Khairajani
Khairajani merged commit 0d18bb8 into 2.1 Oct 30, 2026
87 of 98 checks passed
@Khairajani
Khairajani deleted the backport/glue-test-connection-filters-2.1 branch October 30, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants