Repository navigation
fix(mcp): forward packaging mode in package and migrate - #158
Open
matthewmoorcroft wants to merge 9 commits into
Open
matthewmoorcroft wants to merge 9 commits into
matthewmoorcroft wants to merge 9 commits into
Conversation
The MCP package command and migrate's package step dropped packaging_mode, group_by and group_spec, so hosted runs always wrote the per-pipeline layout while reporting ok. Forward them to the adapter's --packaging-mode, --group-by and --group-spec flags so MCP gets the CLI's defaults and refusals, and document the parameters in the tool description. Co-authored-by: Isaac <no-reply@databricks.com>
A packaging_mode or group_by of 0 or False was treated as unset, so MCP package fell back to the per-pipeline layout with ok: true while the CLI refuses the same value. Only a missing key, None or "" now counts as unset; anything else is forwarded so argparse refuses it as on the command line. Co-authored-by: Isaac <no-reply@databricks.com>
…single-bundle packaging
…ext requires per-group
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The hosted flowx MCP server's
packagecall ignored the packaging mode:inputs packageasks the agent forpackaging_modeandgroup_spec, butpackage(andmigrate's package step) dropped them and always wrote the per-pipeline layout while returningok: true. This makes MCP honour the same modes the CLI does (from #73).What changed
src/flowx/mcp/server.py:packageandmigrateforwardpackaging_mode,group_byandgroup_specto the CLI's--packaging-mode/--group-by/--group-spec, so defaults and refusals of bad values match the CLI. Agroup_specsent alone impliesper-group+spec, as theinputs packagetext promises.inputs packagetext and the package skill document the parameters and note thatgroup_specmust be a path the server itself can read (on the hosted server usegroup_byinferred or a server-local path).How it was tested
tests/unit/test_mcp_package_modes.py: MCPpackagewrites the same files as the CLI from the same converted state for default/per-pipeline, single, per-group (inferred, explicit spec, and spec withoutgroup_by); a badpackaging_mode/group_byis refused through MCP exactly as through the CLI;migrateforwards the flags. The parity and refusal tests fail on the old code.uv.lockunchanged.Notes
No inline or remote
group_specsupport, and no changes todab_writer.pypackaging logic, Airflow code or other MCP differences.This pull request and its description were written by Isaac.