feat(framework): Add SuperExec executor config plumbing#7367
Draft
msheller wants to merge 1 commit into
Draft
Conversation
4caaf82 to
570d110
Compare
570d110 to
3f98b80
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds initial CLI/config plumbing for selecting a SuperExec executor (including a new kubernetes enum value) and optionally loading executor-specific configuration from a YAML file, with a dedicated SuperExec exit code for executor-config failures.
Changes:
- Add
ExecutorType.KUBERNETESand--executor-configCLI flag, passing the parsed config intorun_superexec. - Introduce a generic YAML loader for executor config sections keyed by executor name (e.g.
kubernetes:), plus initial unit tests. - Add exit code
402 SUPEREXEC_INVALID_EXECUTOR_CONFIGand corresponding documentation page.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/py/flwr/supercore/superexec/run_superexec.py | Accepts executor_config and maps executor-selection errors to exit code 402 (but currently does not apply the config). |
| framework/py/flwr/supercore/superexec/executor/config.py | New YAML-based executor-config loader selecting the top-level section for the chosen executor. |
| framework/py/flwr/supercore/superexec/executor/config_test.py | New tests covering a subset of executor-config loader error cases. |
| framework/py/flwr/supercore/constant.py | Adds ExecutorType.KUBERNETES. |
| framework/py/flwr/supercore/cli/flower_superexec.py | Adds --executor-config parsing and loads executor config before calling run_superexec. |
| framework/py/flwr/supercore/cli/flower_superexec_test.py | Adds CLI parsing test for kubernetes executor + config flag; asserts executor_config kwarg is present in run_superexec calls. |
| framework/py/flwr/common/exit/exit_code.py | Introduces exit code 402 and help text mapping. |
| framework/docs/source/ref-exit-codes/402.rst | Documents exit code 402 resolution steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Issue
Description
SuperExec needs a small CLI/config surface so deployment-owned Helm/Kapitan
templates can select the Kubernetes executor and provide trusted internal
executor config in a file.
Related issues/PRs
Stacked on #7300.
Proposal
Explanation
This PR adds
kubernetesas a SuperExec executor value, adds--executor-config, and loads a minimal YAMLkubernetes:section into aplain internal mapping for later Kubernetes executor construction.
The config loader intentionally stays generic and permissive for F1/F2: it
parses YAML, selects the top-level section for the configured executor, and
passes that mapping through without rejecting unknown fields, converting
deployment-facing key names, or performing deep Kubernetes object validation.
Checklist
#contributions)Any other comments?
Validated with the guarded stacked-branch refresh workflow:
git diff --checkpy_compileon changed Python filesdev_format_and_test.py --profile auto