feat(ai): scaffold the datahub-ai-service with /health
Closed
NW
4d ago+6653+6653+0123456789012345678901234567890123456789-110-110-012345678901234567890123456789
Stack. This is one PR in a series that adds a built-in MCP server to DataHub Core. It is based on na--mcp-tools-gms-server-info (the previous PR in the stack); review only its own commit. Nothing in these first five PRs is wired into quickstart, the frontend or Helm yet, so they change no running DataHub. The later PRs that expose MCP are all behind a GMS feature flag, MCP_SERVER_ENABLED, off by default.
Stack so far:
- #21332
- #21333
- #21334 ā this PR
- #21335
- #21336
- #21337
- #21338
- #21339
- #21340
- #21341
- #21342
- #21343
- #21344
- #21345
- #21346
- #21347
- #21348
- #21349
- #21350
- #21351
- #21352
- #21353
- #21435
- #21436
- #21437
- #21438
- #21439
- #21440
- #21441
- #21442
- #21443
- #21444
- #21445
- #21447
- #21501
- #21502
- #21503
- #21504
- #21505
- #21506
- #21507
- #21508
- #21509
- #21510
- #21511
- #21512
What this does
Add packages/datahub-ai-service, the OSS service that will serve DataHub's MCP
tools at /mcp (and later other AI features).
- Gradle module (:packages:datahub-ai-service) built on the shared Python package
script, installing the monorepo SDK and datahub-core-mcp-tools editable. - AiServiceConfig read from the environment: DATAHUB_GMS_URL (required,
base path allowed), DATAHUB_AI_HOST/PORT (0.0.0.0:9005), MCP enablement,
SSE/JSON response mode, token-cache TTL and GMS timeout. A shared
DATAHUB_GMS_TOKEN is refused: each caller sends their own token. - Starlette app with an unauthenticated /health that never contacts GMS,
so the service starts before GMS is healthy. datahub-ai-service serveCLI.- Built, linted and tested by the "DataHub AI Service" workflow; excluded from the
main build like the other Python modules.
Testing
./gradlew :packages:datahub-ai-service:lint :packages:datahub-ai-service:testQuick: config parsing (including the refused shared token) and/healthwithout GMS.
Checklist
- The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
- Tests for the changes have been added/updated (if applicable)
- Docs related to the changes have been added/updated (if applicable). Docs come later in the stack, with the user-facing pieces.
- For any breaking change/potential downtime/deprecation/big changes an entry has been made in Breaking Changes. Not applicable: nothing user-facing changes yet.
š¤ Generated with Claude Code