test(mcp): validate packaged GraphQL against pinned GMS schemas
Merged
NW
4d ago+4844+4844+0123456789012345678901234567890123456789-221-221-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-gql-compiler (the previous PR in the stack); review only its own commit. These PRs build out the shared datahub-core-mcp-tools package and datahub-ai-service; nothing 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
- #21335
- #21336
- #21337
- #21338
- #21339 ā this PR
- #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
Every packaged .gql is compiled for, and validated against, GMS's GraphQL
schema at v1.7.0 (the supported floor), v1.8.0 (the latest release) and the
checkout's own master.
- tests/graphql_schemas.json pins each release to its commit; add the
releases just before and at each new #[since] gate. - scripts/export_graphql_schemas.py concatenates the SDL from
datahub-graphql-core at each pinned commit (fetching the tag in shallow
CI clones and checking it still matches the pin) into build/; the
exportGraphqlSchemas task runs it before the test tasks. Snapshots are
generated, not committed. - get_me's query moves to gql/get_me.gql, loaded with load_gql_document.
- A real gate is covered: Query.getRootDataProducts, new in 1.8.0, is
dropped for 1.7.0 and kept for 1.8.0, and is invalid on 1.7.0 without its
marker. - The DataHub AI Service workflow also runs when the GraphQL schema changes.
Testing
- Every packaged
.gqlcompiles and validates against the pinned GMS schemas. - A real gate (
getRootDataProducts, new in 1.8.0) is dropped for 1.7.0, kept for 1.8.0, and invalid on 1.7.0 without its marker. - The schema export was checked in a shallow clone without tags.
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