refactor(framework): Move exit module to supercore#6984
Draft
Conversation
exit module to supercore
…ower into codex/move-exit-to-supercore
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relocates the internal exit helpers from flwr.common.exit to flwr.supercore.exit, aligning ownership with SuperCore runtime components and updating in-repo imports/tests accordingly.
Changes:
- Moved/introduced
flwr.supercore.exitpackage (exit codes, exit function, exit handlers, signal handling) and corresponding tests. - Updated internal imports across SuperLink/SuperNode/ServerApp/Simulation/CLI/compat code to import from
flwr.supercore.exit. - Adjusted a few tests/mocks/patch paths to the new module location.
Reviewed changes
Copilot reviewed 23 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| framework/py/flwr/supernode/start_client_internal.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/supernode/runtime/run_clientapp.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/supernode/cli/flwr_clientapp.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/supernode/cli/flower_supernode.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/superlink/servicer/control/control_grpc.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/supercore/superexec/run_superexec.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/supercore/state/alembic/utils.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/supercore/state/alembic/utils_test.py | Switch ExitCode import to flwr.supercore.exit. |
| framework/py/flwr/supercore/inflatable/inflatable_utils.py | Switch add_exit_handler import to flwr.supercore.exit. |
| framework/py/flwr/supercore/exit/init.py | New public surface for the relocated exit package. |
| framework/py/flwr/supercore/exit/exit.py | Adjust imports for new package location. |
| framework/py/flwr/supercore/exit/exit_code.py | New/relocated exit codes and help text. |
| framework/py/flwr/supercore/exit/exit_handler.py | New/relocated exit handler registration/execution. |
| framework/py/flwr/supercore/exit/signal_handler.py | New/relocated signal registration helper. |
| framework/py/flwr/supercore/exit/*_test.py | Tests updated/added for relocated exit functionality. |
| framework/py/flwr/supercore/cli/flower_superexec.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/simulation/run_simulation.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/simulation/app.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/serverapp/exception.py | Switch ExitCode import to flwr.supercore.exit. |
| framework/py/flwr/server/superlink/fleet/rest_rere/rest_api.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/server/serverapp/app.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/server/app.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/compat/server/app.py | Switch register_signal_handlers import to flwr.supercore.exit. |
| framework/py/flwr/compat/client/app.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/client/rest_client/connection.py | Switch exit imports to flwr.supercore.exit. |
| framework/py/flwr/cli/supernode/register.py | Switch exit imports to flwr.supercore.exit. |
Comments suppressed due to low confidence (1)
framework/py/flwr/supercore/exit/exit.py:35
- This relative import (
from ...common.logger import log) is the only use of a triple-dot relative import to reachflwr.commonin the repo; most modules use absolute imports likefrom flwr.common.logger import log. Consider switching to the absolute import for consistency/readability.
💡 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.
Summary
exitpackage fromflwr.common.exittoflwr.supercore.exit