Fixes #28869: migrate greenplum and cockroach connectors to BaseConnection#28868
Merged
Conversation
…seConnection Both are basic-auth-only postgres-dialect connectors. Replace their module-level get_connection/test_connection with a BaseConnection subclass that builds the engine via the shared BasicAuthStrategy and keeps each connector's custom GetDatabases test query, and register the class via connection_class in their service specs. Adds colocated per-connector unit tests asserting URL parity.
Contributor
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
…kroach specs DefaultDatabaseSpec normalizes a class to its import path via a validator, so passing the connection_class (and metadata_source_class) class triggers a reportArgumentType the checker cannot see through. Suppress per argument, as basedpyright ignores are line-scoped.
|
ulixius9
approved these changes
Jun 9, 2026
Contributor
🟡 Playwright Results — all passed (12 flaky)✅ 4272 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 88 skipped
🟡 12 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedMigrates Greenplum and Cockroach connectors to the BaseConnection framework using BasicAuthStrategy, preserving original connection behavior. Verified via successful metadata ingestion and unit testing with no issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Migrates the greenplum and cockroach connectors from module-level
get_connection/test_connectionto aBaseConnectionsubclass — continuing the database-connector migration (follows #28854 and #28866).Both are basic-auth-only, Postgres-dialect connectors with a single client-build path, so each:
XConnection(BaseConnection[XConfig, Engine])whose_get_client()builds the engine via the sharedBasicAuthStrategy,test_connectioninto the class (calling the sametest_connection_db_commonhelper, preserving each connector's customGetDatabasesquery),connection_class=in itsservice_spec.py,No
matchonauthType: although these configs carry anauthTypefield, the previousget_connectionnever branched on it (it always built a plain engine), soBasicAuthStrategyreproduces the exact prior behavior.Tests
Colocated per-connector unit tests under
tests/unit/source/database/{greenplum,cockroach}/test_connection.pyasserting the engine URL built through the connector (postgresql+psycopg2://…/cockroachdb+psycopg2://…). ruff + basedpyright clean.Validation
Ran real metadata ingestion using this branch's connector code into a running OpenMetadata — both 100% success, 0 errors, tables + views ingested with correct columns:
postgresql+psycopg2dialect + standard introspection).start-single-node --insecure): test-connection passed (CheckAccess/GetDatabases/GetSchemas/GetTables/GetViews), tables + view ingested.Scope
greenplum + cockroach only. Next batch: doris + starrocks.
Fixes #28869