feat(ingest/fivetran,kafka-connect,azure-data-factory): probe support for pipeline sources

Merged
TR
1mo ago
+5378-178

Summary

Adds datahub recipe probe support to the Fivetran, Kafka Connect and Azure Data Factory sources, and declares the Probe capability on all three. With it, a person or an AI assistant can list what a pipeline system holds and check what a recipe would ingest before running it. probe filter gives the verdict ingestion gives.

All three systems store credentials alongside their pipeline definitions. So in every command:

  • output is built from fixed field allowlists;
  • none of the three has a raw API or SQL passthrough;
  • report entries from the reused ingestion steps are recorded but never logged.

Fivetran

  • Commands:
    • destinations
    • connectors(destination?)
    • connector_tables(connector, include_columns)
    • sync_history(connector)
  • Backend: the probe reads whichever backend the recipe's log_source picks (the warehouse log or the REST API), as ingestion does.
  • Reuse: the REST reader's lineage fallback (DB log, then the schemas endpoint) is called directly, and the listed-connection and log-row Connector mappings are shared helpers.
  • Verdicts: connector selection lives in fivetran_selection.py, which both log readers and probe filter call.
    • In REST mode a connector is kept if its id or its name is allowed.
    • destination_patterns is applied from each record's destination_id.
    • A NULL destination_id is judged as null_destination_id, where the DB reader stops the run.
  • PII: user emails, connecting-user ids and free-text run messages are never returned.

Kafka Connect

  • Commands:
    • connectors
    • connector (handler, whether ingestion emits it, config key names, allowlisted values)
    • connector_topics
    • connector_lineage (the exact DataJob URNs ingestion emits)
    • cluster_topics (Confluent Cloud)
  • Refactor: kafka_connect.py splits its per-connector steps so the probe can reuse them through kafka_connect_probe.source_for_probe. Ingestion behaviour and goldens are unchanged.
  • Credentials:
    • Connector config values leave the probe only through a key allowlist.
    • A failing reused step is reported by exception type only; a defect type exits 1.
    • A malformed connect_uri is refused before any request.
    • Confluent Cloud without Connect credentials is a recipe error (ConfluentCloudCredentialsRequired, exit 2).

Azure Data Factory

  • Commands:
    • factories
    • pipelines(factory)
    • activities(factory, pipeline)
    • linked_services(factory)
    • datasets(factory), which gives the lineage URN through ingestion's own resolver, or the reason it can't resolve
  • Secrets: records come from fixed field lists; connection details, headers, activity settings and parameter values never appear.
  • Verdicts: factory_pattern and pipeline_pattern match bare names. Activities nested in ForEach/If/Until/Switch, which ingestion never emits, are flagged.

Testing

  • Unit tests for each connector cover:
    • commands and exit codes;
    • planted-secret checks on output, error text and logs;
    • --report-to → --from-run round trips.
  • Parity against real ingestion:
    • Fivetran, DB and REST modes, on the shared harness;
    • ADF factories, pipelines, top-level activities and dataset URNs against get_workunits_internal();
    • Kafka Connect per-connector lineage.
  • Docker: the Kafka Connect probe tests (integration_batch_5) live in test_kafka_connect.py and share its stack. They check every command against the live cluster with no secret in the output, and that verdicts and the emitted flag match the DataFlows real ingestion emits.
  • Coverage elsewhere: tests/unit/agent/ contract and import-isolation tests cover all three sources. Fivetran, Kafka Connect and ADF goldens are unchanged, and ./gradlew :metadata-ingestion:lint is clean.

Follow-ups (not in this PR)

  • Shared masking gaps for a security PR: credentials embedded in a recipe URL field, and Kafka Connect provided_configs values.
  • Fivetran REST mode: a deny on the name alone does nothing, because the id still passes. The probe mirrors this, and fixing it needs its own PR.