Skip to content

feat(framework): Add SuperExec executor config plumbing#7367

Draft
msheller wants to merge 1 commit into
codex/kubernetes-executor-completed-pod-sweeperfrom
codex/superexec-executor-cli-config
Draft

feat(framework): Add SuperExec executor config plumbing#7367
msheller wants to merge 1 commit into
codex/kubernetes-executor-completed-pod-sweeperfrom
codex/superexec-executor-cli-config

Conversation

@msheller

@msheller msheller commented Jun 12, 2026

Copy link
Copy Markdown
Member

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 kubernetes as a SuperExec executor value, adds
--executor-config, and loads a minimal YAML kubernetes: section into a
plain 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

  • Implement proposed change
  • Write tests
  • Update documentation
  • Address LLM-reviewer comments, if applicable (e.g., GitHub Copilot)
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Any other comments?

Validated with the guarded stacked-branch refresh workflow:

  • git diff --check
  • py_compile on changed Python files
  • dev_format_and_test.py --profile auto

@msheller msheller force-pushed the codex/superexec-executor-cli-config branch 3 times, most recently from 4caaf82 to 570d110 Compare June 12, 2026 18:17
@msheller msheller force-pushed the codex/superexec-executor-cli-config branch from 570d110 to 3f98b80 Compare June 12, 2026 18:20
@msheller msheller requested a review from Copilot June 12, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.KUBERNETES and --executor-config CLI flag, passing the parsed config into run_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_CONFIG and 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.

Comment thread framework/py/flwr/supercore/superexec/run_superexec.py
Comment thread framework/py/flwr/supercore/cli/flower_superexec.py
Comment thread framework/py/flwr/supercore/superexec/executor/config_test.py
@github-actions github-actions Bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants