feat(MCP): Use native OpenAPI tool fields and consolidate private deps#7656
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Docker builds report
|
There was a problem hiding this comment.
Code Review
This pull request removes the custom MCP schema generation logic, custom views, and x-gram extensions in favor of standard OpenAPI operation_id and description fields. It also removes the workflows extra dependency, updates the flagsmith-private package to v0.7.0, and simplifies the Dockerfile and Makefile. The feedback suggests using a conditional assignment (?=) for FLAGSMITH_PRIVATE_REVISION in the Makefile to allow developers to override the revision from the command line during testing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7656 +/- ##
=======================================
Coverage 98.52% 98.52%
=======================================
Files 1443 1443
Lines 55047 55050 +3
=======================================
+ Hits 54237 54240 +3
Misses 810 810 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
8e19685 to
71e61f5
Compare
71e61f5 to
ac1ef5f
Compare
Relocate the 36 MCP-tagged views' friendly names and descriptions from the non-standard `x-gram` extension to native `operation_id` and `description` (Flagsmith/flagsmith-private#145). Gram falls back to `operationId`/`description` when `x-gram` is absent, so the existing Gram push keeps working unchanged; this also prepares for the self-hosted MCP v3 server (Flagsmith/flagsmith-private#146), which reads the same native fields from the live `/swagger`. Descriptions are phrased API-agnostically ("Applies to ..." rather than "Use this tool ...") since they now also feed the public API docs, and the organisation descriptions are Britishised; tool names are unchanged. Consolidate the private apps: rbac and workflows_logic now ship inside flagsmith-private (>=0.7.0), so drop the separate `workflows-logic` dependency, the `flagsmith-rbac` clone in `install-private-modules`, and the `--extra workflows` installs; `integrate-private-tests` pulls those suites from flagsmith-private at the installed version's tag. Switch pytest to `--import-mode=importlib` (with `pythonpath = ["."]`) so the imported private test suites resolve without per-directory package markers, matching flagsmith-private's own pytest configuration. Bump uv 0.11.8 -> 0.11.14. The Gram schema generator and deploy push are deliberately left intact; Gram stays live until the v3 server lands. beep boop
ac1ef5f to
6533fe7
Compare
emyller
left a comment
There was a problem hiding this comment.
LGTM with one language question.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to Flagsmith/flagsmith-private#145 and the self-hosted MCP v3 epic (Flagsmith/flagsmith-private#127).
x-gramextension to nativeoperation_idanddescription. Gram falls back tooperationId/descriptionwhenx-gramis absent, so the existing Gram push keeps working unchanged; this also prepares for the self-hosted MCP v3 server (Flagsmith/flagsmith-private#146), which reads the same native fields from the live/swagger. Descriptions are phrased API-agnostically ("Applies to …" rather than "Use this tool …") since they now also feed the public API docs, and the organisation descriptions are Britishised. Tool names are unchanged.rbacandworkflows_logicnow ship insideflagsmith-private(>=0.7.0), so drop the separateworkflows-logicdependency, theflagsmith-rbacclone ininstall-private-modules, and the--extra workflowsinstalls.integrate-private-testspulls those suites fromflagsmith-privateat the installed version's tag.--import-mode=importlib(withpythonpath = ["."]) so the imported private test suites resolve without per-directory package markers, matching flagsmith-private's own pytest config. (from tests.*importers keep working viapythonpath.)The Gram schema generator and deploy push are deliberately left intact — Gram stays live until the v3 server lands.
How did you test this code?
3780 passed, 7 skipped.make typecheck(1690 files) andmake lintpass.flagsmith-private==0.7.0from the index and ranmake generate-mcp-spec: 43mcp-tagged operations, nox-gram, every op with nativeoperationId+description, including the private tools (org roles, release pipelines, change requests).flagsmith-privatetest suites (rbac, workflows) collect cleanly under importlib, including duplicate test-module basenames acrossunit/andintegration/.