refactor: remove legacy CLI runtime helpers and fix GPU worker count#16
Merged
Conversation
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
444ee38 to
202b65f
Compare
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
202b65f to
da7c2fd
Compare
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
timzsu
requested changes
May 5, 2026
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
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.
Purpose
This PR addresses the two pre-release bugs related to FlowMesh CLI mentioned in #1 (comment), including the legacy authentication commands and the usability of the worker creation command. Specifically, we replace the stale
logoutcommand with the new commands for persisting and managing FlowMesh config, as well as refactor the worker creation command to allow spawing multi-GPU workers.Changes
cli/src/flowmesh_cli/commands/base.py— replacelogoutwithinit,deinit,and
configcommandssdk/stack/src/flowmesh_stack/doctor.py— replace login validation with config file validation in thedoctorcommand.sdk/stack/src/flowmesh_stack/workers.py— fix GPU worker count:count=1createsa single worker with all specified GPUs in
cuda_devices;count>1creates oneworker per GPU and validates that count matches the number of detected targets
tests/cli/test_cli_commands.py— replaceTestLogoutwithTestConfigcovering file, env, auto, and invalid casescli/src/flowmesh_cli/commands/{node,result,ssh,system,task,trace,worker,workflow}.py,cli/src/flowmesh_cli/core/runtime.py,sdk/src/flowmesh/_base_client.py, etc.Design
FlowMesh is designed to be simple and focused on serving agentic workflows. Authentication and complex operational logic are therefore deferred to plugin implementation. However, there is still stale code remaining in the CLI and SDK packages. This PR cleans up the stale code and refactors FlowMesh config resolution (prioritizing explicit params → env → config file → defaults) to better support single-user execution.
Moreover, previously, the worker deployment CLI command (
flowmesh stack worker up) only supported deploying single-GPU workers. This PR extends the capability to enable deploying either a single multi-GPU worker or multiple single-GPU workers. The behavior is inferred from the requested worker count. Ifcount=1, the command will spawn a single worker with access to the specified target GPUs. Otherwise, the command will deploy multiple workers, each with one GPU, requiring that the requested worker count and the number of GPU targets must match.Test Plan
Test Result
Pre-submission Checklist
pre-commit run --all-filesand fixed any issues.uv run pytest tests/passes locally.uv sync --all-extras --frozen).[BREAKING]and described migration steps above.