Skip to content

Fixes #28993: refactor(ingestion): migrate mlmodel/metadata/messaging connectors to BaseConnection#28994

Merged
IceS2 merged 1 commit into
mainfrom
refactor/baseconnection-mlmodel-metadata-messaging
Jun 12, 2026
Merged

Fixes #28993: refactor(ingestion): migrate mlmodel/metadata/messaging connectors to BaseConnection#28994
IceS2 merged 1 commit into
mainfrom
refactor/baseconnection-mlmodel-metadata-messaging

Conversation

@IceS2

@IceS2 IceS2 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #28993

What

Migrates the mlmodel, metadata and messaging connectors onto the BaseConnection[Config, Client] pattern, continuing the connector-wide BaseConnection rollout.

Service Connector Client type get_connection
mlmodel mlflow MlflowClient moved into _get_client
mlmodel sagemaker boto3 (Any) moved into _get_client
metadata alationsink AlationSinkClient moved into _get_client
metadata amundsen Neo4jHelper moved into _get_client
metadata atlas AtlasClient moved into _get_client
messaging kafka KafkaClient kept module-level (redpanda imports it)
messaging kinesis boto3 (Any) moved into _get_client
messaging pubsub PubSubClient kept module-level (unit test imports it)
messaging redpanda KafkaClient delegates to kafka's get_kafka_connection

How

  • Each connector gains XConnection(BaseConnection[ConfigType, ClientType]) with _get_client and test_connection; connection_class is wired into each service_spec.py.
  • The mlmodel/messaging base sources and the metadata 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.
  • kafka/redpanda share code: redpanda imports kafka's get_connection/test_connection (aliased) and the KafkaClient dataclass, so kafka keeps those module-level and its class delegates to them; redpanda's class delegates to the aliased kafka functions.
  • Boto3-backed sagemaker/kinesis type the client as Any, matching the merged glue/dynamodb connectors.

Tests

  • Added colocated tests/unit/source/<type>/<connector>/test_connection.py for all nine (BaseConnection subclass, client build, test_connection dispatch).
  • Existing mlmodel/messaging suites pass unchanged.
  • basedpyright baseline check clean; ruff clean.

No behavior change — pure structural migration.

… BaseConnection

Migrate mlflow, sagemaker (mlmodel); alationsink, amundsen, atlas (metadata);
and kafka, kinesis, pubsub, redpanda (messaging) onto the
BaseConnection[Config, Client] pattern, wiring connection_class into each
service spec. The mlmodel/messaging base sources and the metadata sources all
acquire their client and run test_connection through the generic resolver
(source.connections), so the new classes are exercised end-to-end.

kafka keeps its module-level get_connection/test_connection because redpanda
imports them (get_kafka_connection/test_kafka_connection); both messaging
clients are the shared KafkaClient. pubsub keeps get_connection module-level
(a unit test imports it); the remaining six move the build into _get_client.
Boto3-backed sagemaker/kinesis type the client as Any (matching glue/dynamodb).
Add colocated connection unit tests for all nine.
@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
@gitar-bot

gitar-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Migrates mlmodel, metadata, and messaging connectors to the BaseConnection pattern to improve structural consistency. No issues found.

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 (12 flaky)

✅ 4302 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 300 0 1 4
✅ Shard 2 812 0 0 9
🟡 Shard 3 809 0 3 8
🟡 Shard 4 846 0 4 12
🟡 Shard 5 732 0 2 47
🟡 Shard 6 803 0 2 8
🟡 12 flaky test(s) (passed on retry)
  • Pages/Roles.spec.ts › Roles page should work properly (shard 1, 1 retry)
  • Features/KnowledgeCenterList.spec.ts › Knowledge Center List - Verify Recently Viewed widget (shard 3, 1 retry)
  • Features/QueryEntity.spec.ts › Query Entity (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Hyperlink (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Duration (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Time (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate DataProduct Rule Any_In (shard 4, 1 retry)
  • Pages/Entity.spec.ts › User should be denied access to edit description when deny policy rule is applied on an entity (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 2 retries)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Tier Add, Update and Remove (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 35fa96d into main Jun 12, 2026
51 of 52 checks passed
@IceS2 IceS2 deleted the refactor/baseconnection-mlmodel-metadata-messaging 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 mlmodel/metadata/messaging connectors to BaseConnection

2 participants