Repository navigation
Conversation
Adds the `ingestion` tool group, ported from DataHub Cloud's scoped-server
ingestion group, and its first three tools.
The group is opt-in. An absent or empty tool selection ("all tools") does not
include it: the settings policy serves its tools only when the selection names
the group or one of its tools, for tools/list and direct calls alike, and the
legacy and null-settings defaults leave it out. `ToolGroup.opt_in` carries the
rule in tool_groups, with `is_tool_selected` as the shared check;
`register_tools(groups=None)` registers every group except the opt-in ones, so
DataHub Cloud's default server does not pick these tools up. The service
registers every group and lets the policy decide; the stdio server takes its
groups from `DATAHUB_MCP_TOOL_GROUPS` (default: read and write metadata).
Groups stay disjoint, as in Cloud: an ingestion tool carries only the
`ingestion` tag and says whether it writes through readOnlyHint. So
TOOLS_IS_MUTATION_ENABLED=false also drops the group's writes, the catalog's
category and the usage events' read/write group come from readOnlyHint, and
`INGESTION_TOOLS_ENABLED=false` (Cloud's kill switch, default on) drops the
whole group. /catalog/tools lists the tools with `groups: ["ingestion"]`, which
the settings page already treats as opt-in.
Tools, the `datahub recipe` CLI as MCP tools:
- list_connector_types: the registered connector types and their aliases.
- get_recipe_schema: a connector's config fields (`datahub recipe describe`)
and, given partial config, a recipe template (`datahub recipe scaffold`).
- validate_recipe: YAML, connector type, literal-credential check and, when
the connector loads here, the connector's own config validation. Secret
references resolve to a placeholder, never to this server's environment.
Cloud's versions call the Ingestion Agent, which reads a per-version docs and
schema corpus; that is Cloud-only. These run against the acryl-datahub in the
server's process instead, which has few connectors' packages installed: a
connector it can't load gets an error linking its docs (get_recipe_schema) or
`schema_checked: false` (validate_recipe), never a false "invalid". The
literal-credential rule (`literal_secret_paths`) is Cloud's. The agent's
`category` filter and docs `version` were dropped (no taxonomy, no corpus).
No version gates: the tools use no GMS API. The recipe introspection needs
acryl-datahub 1.8.0+ in the server; older gets a clear error.
Tests: group selection rules, registration by group and kill switch, stdio
groups, recipe tools against the installed `file` connector (unknown,
unloadable, invalid and literal-credential recipes, JSON-string partial
config), and the service's policy (off by default, group or single-tool
selection, kill switch) and catalog.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds list_ingestion_sources, create_ingestion_source and
update_ingestion_source to the opt-in `ingestion` group, so an agent can find,
create and change the ingestion sources DataHub runs on its executor
(`datahub ingest deploy` / `list-source-runs`).
- list_ingestion_sources: sources with type, schedule and latest run, or one
source in full (recipe parsed, executor, schedule, CLI version, extra args).
- create_ingestion_source: a source from a YAML/JSON recipe whose credentials
are ${SECRET} references, with an optional cron schedule; never saves the
executor's `__run_options__` key. Does not run it.
- update_ingestion_source (destructive, idempotent): merges dotted
`config_updates` / `remove_fields` into the stored recipe and re-sends the
executor, CLI version, debug mode, extra args, provenance and schedule
timezone, since updateIngestionSource replaces the whole aspect. Reports
paths it removed apart from ones that were not there.
From DataHub Cloud's ingestion_tools.py and its agent_jobs.py source helpers,
without the Cloud-only parts: agent task bindings and stewardship, SYSTEM
provenance repair, the integrations package template for extra pip
requirements, and merge validators. New in OSS: a source's stored literal
credentials are masked when it is read back (a source saved from the UI can
hold them), the writes go through execute_write (one attempt; no reply is
reported as an unknown outcome with how to check), reads through two new
ReadBackend methods, and stringified JSON arguments are accepted.
The reads and writes are in gql/ingestion.gql; every field exists on GMS
1.7.0, so no version gates (the schema-snapshot test checks 1.7.0, 1.8.0 and
master). The writes are removed by TOOLS_IS_MUTATION_ENABLED=false.
Tests: create (recipe saved as JSON, literal credentials and missing type
refused, run options dropped, unknown outcome), list (paging cap, latest
run), one source (parsed, masked, missing, wrong URN type), update (merge,
carried-over settings, timezone, removed vs not found, refusals), the writes
switch on the group, catalog category and usage-event write group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds run_ingestion, list_ingestion_runs, list_ingestion_run_entities and rollback_ingestion_run to the opt-in `ingestion` group, so an agent can run a saved source on the executor, test a recipe's connection, follow and debug a run, see what it wrote and undo it (`datahub ingest run` / `list-source-runs` / `show` / `rollback`). - run_ingestion (open world, destructive): starts a run of a saved source and returns its execution URN at once; with `test_source_connection` it tests a recipe's or a source's connection (its stored recipe and CLI version) and waits up to 240 s for the report, returning the URN to read later if the test has not finished. Marked destructive, unlike Cloud's: a run with stateful ingestion removes what the source no longer has. - list_ingestion_runs: a source's recent runs (status filter over the widest window, since GraphQL can't filter), or one run's status, counts, first failures and warnings and CLI version from its structured report. - list_ingestion_run_entities: the aspects a run wrote (Rest.li /runs?action=describe), without the aspect values. - rollback_ingestion_run (destructive): dry run by default; reports what it reverts, only this run's rows, without aspect values. From DataHub Cloud's ingestion_tools.py and agent_jobs.py (run parsing and summaries) and the Ingestion Agent's connection-test polling. Dropped for OSS: recipe runs, dry runs and previews (DataHub Core has no createRecipeExecutionRequest; its executor runs only RUN_INGEST and TEST_CONNECTION), and Cloud's log streaming. Connection-test polls read only the status, then the report once. Writes go through execute_write (one attempt, unknown outcomes say how to check); the rollback reports a missing reply the same way. Reads go through three new ReadBackend methods. probe_ingestion_source and check_ingestion_filter are not ported: they submit createProbeSourceRequest, which DataHub Core's GMS does not have, and the datahub-actions executor has no probe task. Every GraphQL field exists on GMS 1.7.0 (schema-snapshot test on 1.7.0, 1.8.0 and master) and the Rest.li runs resource predates it: no version gates. Tests: saved-source runs (missing source, unsaved recipe, unknown outcome), connection tests of a recipe and of a source (polling, report, unfinished, literal credentials), one run's summary, status filtering, report shapes, run entities paging, rollback default dry run and unknown outcome, and the group's tool lists. Live: every ingestion tool against a local DataHub Core with GMS auth on, including a real run of a demo-data source, its rows and a dry and a real rollback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ingestion tool group was opt-in everywhere. In DataHub Core it is now on by default: "all tools" (no selection), the legacy-schema defaults and the null-settings defaults include it, and a selection that lists groups includes it only when it names the group or one of its tools, like any other group. DataHub Cloud is unchanged: its default server must not gain these tools when this package is synced, so the group stays opt-in there (`cloud_opt_in`). - tool_groups: `opt_in` becomes `cloud_opt_in`; `opt_in_group_ids`, `default_group_ids`, `is_opt_in` and `is_tool_selected` take `is_oss`, and `register_tools(groups=None)` uses the deployment's default groups. - The service applies the Core rule. `TOOLS_IS_MUTATION_ENABLED=false` still drops the group's writes and `INGESTION_TOOLS_ENABLED=false` the whole group. - The stdio wrapper serves every group by default, ingestion included; `DATAHUB_MCP_TOOL_GROUPS` still chooses. - The tool catalog gains `optInGroups` (Core: []). The settings tool picker takes opt-in groups from it and falls back to evals + ingestion when the field is absent (DataHub Cloud's catalog), so in Core the Ingestion group is a normal group, on with "Include all", while Cloud keeps its opt-in section. Opt-in is carried on the tool and group data instead of a hard-coded set. - Docs: the Ingestion section, the settings-page bullets, the write-tools section, the switches table, the stdio paragraph and the release note say it is on by default and how to turn it off. The risk note stays: these tools can create, run and roll back ingestion. Tests cover both deployments' defaults, group selection, both switches, stdio, the catalog field, and the picker with and without `optInGroups`. Live against a local DataHub with default settings: /catalog/tools returns optInGroups: [], tools/list has all 10 ingestion tools (39 in all) and list_ingestion_sources returns the instance's sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryOverview Deployment behavior: On DataHub Core, ingestion is included in “all tools”; Cloud keeps it opt-in via Docs cover ingestion tools, ChatGPT setup, settings/toggles, and breaking-change notes for default-on ingestion. Reviewed by Cursor Bugbot for commit ec429e2. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will increase total bundle size by 278 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: datahub-react-web-esmAssets Changed:
Files in
Files in
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ec429e2. Configure here.
| stored = source.get("config") | ||
| stored_config = stored if isinstance(stored, dict) else {} | ||
| config_input: dict = { | ||
| "recipe": json.dumps(recipe), |
There was a problem hiding this comment.
Update keeps run options key
Medium Severity
create_ingestion_source drops top-level __run_options__ so a saved recipe cannot force every scheduled run into a dry run, but update_ingestion_source deep-copies the stored recipe and writes it back unchanged at the root. Any later rename, schedule change, or config patch re-saves that key and keeps the source silently dry-running.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ec429e2. Configure here.
| raise ToolError(f"The recipe is not valid YAML or JSON: {e}") from e | ||
| if not isinstance(parsed, dict): | ||
| raise ToolError("The recipe must be a mapping with a `source` block.") | ||
| return cast(JsonObject, parsed) |
There was a problem hiding this comment.
YAML recipes corrupt when saved
Medium Severity
parse_recipe uses PyYAML 1.1 safe_load, then create and connection-test persist with json.dumps. Unquoted YAML on/off/yes/no become booleans, and timestamps become datetime objects that make json.dumps raise. A valid recipe can be saved with corrupted field types or fail the tool instead of storing the original values.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit ec429e2. Configure here.
| elif isinstance(value, list): | ||
| for i, child in enumerate(value): | ||
| found.extend(literal_secret_paths(child, f"{path}[{i}]")) | ||
| return found |
There was a problem hiding this comment.
Access key literals not refused
Medium Severity
literal_secret_paths only flags keys matching password|passwd|secret|token|private_key|api_key|apikey|credential. Common credential fields such as aws_access_key_id and access_key do not match, so create_ingestion_source, update_ingestion_source, and validate_recipe accept and persist those literals instead of requiring a ${SECRET} reference.
Reviewed by Cursor Bugbot for commit ec429e2. Configure here.
|
🔴 Meticulous spotted visual differences in 1 of 622 screens tested: view and approve differences detected. Meticulous evaluated ~18 hours of user flows which tested 3/41 of the executable lines edited in your PR1. 1. These 38 untested lines will likely automatically gain test coverage over the coming days, however if you wish to increase coverage immediately you can do so by interacting with your feature on localhost. Last updated for commit |
Smart test selectionpytest smoke testsMode: shadow. The selection below is computed but not applied; this PR still runs the default matrix (
Medium confidence: a wrong tag means tests are skipped, so check the tags above against what this PR touches. Selected scopes (19 files or classes, 58 tests)
Add the Playwright E2E testsThis run:
Add the commit |
Initial JS bundle size ➡️
|
Boot web vitals (no backend)Unauthenticated /login against the two dist/ trees from this job. No GMS — this is eager JS, not search/dataset payload. Lantern, desktop, 1x CPU. Does not forecast fleet p75; do not gate on LCP. Web-vitals A/B — base (4bfe413) (A) vs pr (ec429e2) (B)Lighthouse 12.8.2, throttling simulate (cpu 1x, rtt 40 ms, 10240 kbps). Form factor: desktop. Cache: cold (fresh incognito context per run). target n=3/build, 1 warm-up discarded, alternating A,B. Boot-only (no GMS). Unauthenticated login route — eager JS/CSS/font transfer and parse, not search/dataset payload. Do not treat as a fleet p75.
|
| metric | A p50 | B p50 | Δ p50 | Δ% | A p95 | B p95 |
|---|---|---|---|---|---|---|
| fcp | 852 ms | 855 ms | 3 ms | +0.3% | 855 ms | 857 ms |
| lcp | 1310 ms | 1312 ms | 3 ms | +0.2% | 1322 ms | 1317 ms |
| cls | 0.0000 | 0.0000 | 0.0000 | — | 0.0000 | 0.0000 |
| tbt | 14 ms | 17 ms | 3 ms | +17.9% | 18 ms | 18 ms |
| tti | 1311 ms | 1313 ms | 2 ms | +0.2% | 1323 ms | 1318 ms |
| ttfb | 1 ms | 1 ms | 0 ms | -33.4% | 2 ms | 1 ms |
| transferredBytes | 1077.0 KB | 1077.0 KB | 0.0 KB | +0.0% | 1077.0 KB | 1077.0 KB |
| mainThread | 295 ms | 300 ms | 5 ms | +1.6% | 302 ms | 311 ms |
| bootup | 155 ms | 161 ms | 6 ms | +3.6% | 165 ms | 162 ms |
Resource transfer by type (p50):
| type | A bytes | B bytes | Δ bytes | A requests | B requests |
|---|---|---|---|---|---|
| document | 1.3 KB | 1.3 KB | 0.0 KB | 1 | 1 |
| script | 645.2 KB | 645.2 KB | 0.0 KB | 8 | 8 |
| stylesheet | 3.0 KB | 3.0 KB | 0.0 KB | 2 | 2 |
| image | 48.7 KB | 48.7 KB | 0.0 KB | 1 | 1 |
| media | 257.3 KB | 257.3 KB | 0.0 KB | 1 | 1 |
| font | 106.6 KB | 106.6 KB | 0.0 KB | 3 | 3 |
| other | 0.0 KB | 0.0 KB | 0.0 KB | 0 | 0 |
LCP element A: div > div.sc-fpAkvV > div.sc-pRPz > p.sc-pNWdM — Welcome to DataHub
LCP element B: div > div.sc-fpAkvV > div.sc-pRPz > p.sc-pNWdM — Welcome to DataHub
These numbers rank changes and gate regressions against the measured origin(s). They do not sum across PRs and do not forecast any fleet-wide production number.


Stack. Part of the series that adds a built-in MCP server to DataHub Core. Based on
na--mcp-homepage(#21591); review only its own commits. Everything user-facing is behindMCP_SERVER_ENABLED, off by default.Stack so far:
1–22. Merged to
masteras #21332.23–34. #21435, the read tools (PRs 24–34 merged into it).
35–46. #21501, the write tools (PRs 36–46 merged into it).
47–55. #21587, MCP settings: model, API and UI.
56–60. #21588, telemetry, metrics, usage events and the stdio server.
61–64. #21589, docs, release notes and smoke tests.
65–68. #21590, settings enforcement and the tool catalog.
69–70. #21591, the home page module.
71–74. This PR, the ingestion tools. ← this PR
What this does
Adds an
ingestiontool group with 10 tools, so an agent can write and check a recipe, save it as an ingestion source, run it on DataHub's executor, follow the run and roll it back. It combines what would have been stack PRs 71–74, one commit each.list_connector_types,get_recipe_schemaandvalidate_recipe, thedatahub recipeCLI as MCP tools. They run against theacryl-datahubin the server's process; a connector it can't load gets an error that links its docs, never a false "invalid". Secret references resolve to a placeholder, never to the server's environment.list_ingestion_sources,create_ingestion_sourceandupdate_ingestion_source. Credentials must be${SECRET}references; stored literal credentials are masked when read back.run_ingestion(also tests a connection, waiting up to 240 s),list_ingestion_runs,list_ingestion_run_entitiesandrollback_ingestion_run(a dry run by default).run_ingestionis marked destructive, because a stateful run removes what the source no longer has.cloud_opt_in), so syncing this package doesn't add tools to its default server. The tool catalog reportsoptInGroups(Core:[]), and the settings tool picker reads it.Ported from DataHub Cloud's ingestion tools without the Cloud-only parts (the Ingestion Agent and its docs corpus, recipe runs and previews, probe requests, log streaming, agent task bindings). Writes go through
execute_write: one attempt, and no reply is reported as an unknown outcome with how to check.Switches:
INGESTION_TOOLS_ENABLED=falseremoves the whole group, andTOOLS_IS_MUTATION_ENABLED=falseremoves its writes. The docs and release note say how to turn it off, and keep the risk note: these tools can create, run and roll back ingestion.No version gates: every GraphQL field exists on GMS 1.7.0 (the schema-snapshot tests check 1.7.0, 1.8.0, 1.9.0 and
master) and the Rest.li runs resource predates it. The recipe introspection needsacryl-datahub1.8.0+ in the server; older gets a clear error.Testing
./gradlew :packages:datahub-core-mcp-tools:lint :packages:datahub-core-mcp-tools:testQuick :packages:datahub-ai-service:lint :packages:datahub-ai-service:testQuick: 1,019 core and 174 service tests pass at this PR's tip.context/agentsandsettingsV2(the tool picker with and withoutoptInGroups): 88 tests. ESLint, Prettier andtscpass./catalog/toolsreturnedoptInGroups: [],tools/listhad all 10 ingestion tools (39 in all), andlist_ingestion_sourcesreturned the instance's sources. A demo-data run succeeded (8 aspects), and both a dry-run and a real rollback worked; the test data was deleted afterwards.Checklist
🤖 Generated with Claude Code
Summary by cubic
Adds an
ingestiontool group with 10 tools to DataHub Core's built-in MCP server, so agents can write and validate recipes, create and update ingestion sources, run them on the executor, follow runs, and roll them back. The group is on by default in DataHub Core; DataHub Cloud keeps it opt-in.Behavior
list_connector_types,get_recipe_schema,validate_recipe,list_ingestion_sources,create_ingestion_source,update_ingestion_source,run_ingestion,list_ingestion_runs,list_ingestion_run_entities, androllback_ingestion_run.acryl-datahubin the server's process; unloadable connectors get a clear error linking their docs, never a false "invalid".${SECRET}references; stored literal credentials are masked when read back.run_ingestionis marked destructive since stateful runs remove what the source no longer has;rollback_ingestion_runis dry-run by default.INGESTION_TOOLS_ENABLED=falseremoves the whole group;TOOLS_IS_MUTATION_ENABLED=falsedrops only its writes.optInGroups(Core:[]), and the settings tool picker reads it; without the field it falls back to treatingevalsandingestionas opt-in.Written for commit ec429e2. Summary will update on new commits.