Skip to content

Fixes #28992: refactor(ingestion): migrate storage/search/drive connectors to BaseConnection#28991

Merged
IceS2 merged 1 commit into
mainfrom
refactor/baseconnection-storage-search-drive
Jun 12, 2026
Merged

Fixes #28992: refactor(ingestion): migrate storage/search/drive connectors to BaseConnection#28991
IceS2 merged 1 commit into
mainfrom
refactor/baseconnection-storage-search-drive

Conversation

@IceS2

@IceS2 IceS2 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #28992

What

Migrates the storage, search and drive connectors onto the BaseConnection[Config, Client] pattern, continuing the connector-wide BaseConnection rollout (database vertical already complete).

Connectors in this batch:

Service Connector Client type get_connection
storage s3 S3ObjectStoreClient kept module-level (sampler importer)
storage gcs GcsObjectStoreClient kept module-level (sampler importer)
search elasticsearch Elasticsearch moved into _get_client (no importer)
search opensearch OpenSearch kept module-level (test importer)
drive sftp SftpClient kept module-level (metadata importer)
drive googledrive GoogleDriveClient kept module-level (metadata importer)

How

  • Each connector gains an XConnection(BaseConnection[ConfigType, ClientType]) with _get_client and test_connection.
  • connection_class is wired into each service_spec.py. The storage/search/drive base sources already build their client and run test_connection through the generic resolver (metadata.ingestion.source.connections), so the new classes are exercised end-to-end — no source-side changes needed.
  • Where a production module (samplers, metadata.py) imports get_connection directly, the function stays module-level and _get_client delegates to it; only elasticsearch (no external importer) moves the build inline.
  • Module-level dataclasses (S3ObjectStoreClient, GcsObjectStoreClient), the GCS Tester, and SSL helpers are left untouched.

Tests

  • Added colocated tests/unit/source/<type>/<connector>/test_connection.py for all six (BaseConnection subclass, client build, test_connection step dispatch).
  • Existing storage/search/drive topology suites pass unchanged (385 passed).
  • basedpyright baseline check clean; ruff clean.

No behavior change — pure structural migration.

…onnection

Migrate s3, gcs, elasticsearch, opensearch, sftp and googledrive onto the
BaseConnection[Config, Client] pattern and wire connection_class into each
service spec. The storage/search/drive base sources already obtain their
client and run test_connection through the generic resolver
(source.connections), so the new classes are exercised end-to-end.

get_connection stays module-level for s3/gcs (sampler importers), sftp and
googledrive (metadata importers) and opensearch (test importer); the class
_get_client delegates to it. elasticsearch has no external importer so its
build moves into _get_client. Add colocated connection unit tests for all six.
@IceS2 IceS2 requested a review from a team as a code owner June 12, 2026 07:28
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

✅ PR checks passed

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

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Jun 12, 2026
@IceS2 IceS2 changed the title refactor(ingestion): migrate storage/search/drive connectors to BaseConnection Fixes #28992: refactor(ingestion): migrate storage/search/drive connectors to BaseConnection Jun 12, 2026
@gitar-bot

gitar-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Migrates storage, search, and drive connectors to the BaseConnection pattern to unify ingestion architecture. No issues found, with all structural changes validated by new unit tests and existing topology suites.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (13 flaky)

✅ 4301 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 300 0 1 4
✅ Shard 2 812 0 0 9
🟡 Shard 3 808 0 4 8
🟡 Shard 4 847 0 3 12
🟡 Shard 5 733 0 1 47
🟡 Shard 6 801 0 4 8
🟡 13 flaky test(s) (passed on retry)
  • Pages/Roles.spec.ts › Roles page should work properly (shard 1, 2 retries)
  • Features/KnowledgeCenterList.spec.ts › Knowledge Center List - Verify Recently Viewed widget (shard 3, 1 retry)
  • Features/SettingsNavigationPage.spec.ts › should support drag and drop reordering of navigation items (shard 3, 1 retry)
  • Features/Tasks/TaskNavigation.spec.ts › navigating to /table/TASK-XXXXX should show 404 (invalid URL pattern) (shard 3, 1 retry)
  • Flow/AddRoleAndAssignToUser.spec.ts › Verify assigned role to new user (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Date Time (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Domain owner should able to edit description of domain (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 2 retries)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for searchIndex -> topic (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6, 1 retry)
  • Pages/LogsViewer.spec.ts › Logs page shows breadcrumb, summary, and log viewer or empty state after opening from bundle suite pipeline tab (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@IceS2 IceS2 enabled auto-merge (squash) June 12, 2026 11:16
@IceS2 IceS2 merged commit e19cb85 into main Jun 12, 2026
51 of 52 checks passed
@IceS2 IceS2 deleted the refactor/baseconnection-storage-search-drive branch June 12, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion 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.

Migrate storage/search/drive connectors to BaseConnection

2 participants