Skip to content

feat(framework): Persist and apply federation config overrides per run#6867

Merged
danieljanes merged 7 commits intomainfrom
create-run-with-fed-cfg
Mar 27, 2026
Merged

feat(framework): Persist and apply federation config overrides per run#6867
danieljanes merged 7 commits intomainfrom
create-run-with-fed-cfg

Conversation

@panh99
Copy link
Copy Markdown
Member

@panh99 panh99 commented Mar 27, 2026

Summary

Persist simulation federation config overrides on each run and include the merged federation config directly in app input payloads.

What changed

  • store SimulationConfig overrides in linkstate for both in-memory and SQL backends
  • add schema and migration support for federation_config_overrides on the run table
  • merge federation defaults with per-run overrides before returning PullAppInputs
  • read simulation runtime settings from PullAppInputs.federation_config instead of the legacy GetFederationOptions RPC
  • remove the old federation-options retrieval path and update tests accordingly

Copilot AI review requested due to automatic review settings March 27, 2026 11:32
@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates how simulation/federation configuration overrides are stored (from ConfigRecord/binary blobs to SimulationConfig/JSON) and exposes the effective config to app processes via PullAppInputs.

Changes:

  • Persist per-run federation config overrides on the Run record and add LinkState.get_federation_config_overrides.
  • Populate PullAppInputsResponse.federation_config by combining federation defaults with per-run overrides.
  • Remove legacy “GetFederationOptions” usage from the simulation runner and adjust tests/schema accordingly.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
framework/py/flwr/superlink/servicer/control/control_servicer_test.py Updates run creation in tests to pass None for federation config overrides.
framework/py/flwr/superlink/servicer/control/control_servicer.py Stores override_federation_config as run-level overrides (no ConfigRecord conversion).
framework/py/flwr/supercore/state/schema/linkstate_tables.py Renames federation_options column to federation_config_overrides and changes storage type.
framework/py/flwr/supercore/state/schema/README.md Updates ER diagram to reflect new column name/type.
framework/py/flwr/supercore/state/alembic/versions/rev_2026_03_18_add_run_type_to_run_table.py Adds federation_config_overrides column and drops federation_options.
framework/py/flwr/simulation/app.py Switches simulation runtime settings source to PullAppInputsResponse.federation_config.
framework/py/flwr/server/superlink/simulation/simulationio_servicer.py Marks GetFederationOptions as not implemented.
framework/py/flwr/server/superlink/simulation/simulation_servicer_test.py Updates simulation run creation to use SimulationConfig.
framework/py/flwr/server/superlink/serverappio/serverappio_servicer_test.py Adjusts tests around federation options retrieval behavior.
framework/py/flwr/server/superlink/serverappio/serverappio_servicer.py Merges federation defaults + run overrides and returns federation_config in PullAppInputs.
framework/py/flwr/server/superlink/linkstate/sql_linkstate.py Stores/loads overrides as JSON; adds get_federation_config_overrides; removes legacy options method.
framework/py/flwr/server/superlink/linkstate/linkstate_test.py Reworks tests to validate federation config overrides storage.
framework/py/flwr/server/superlink/linkstate/linkstate.py Replaces abstract get_federation_options with get_federation_config_overrides.
framework/py/flwr/server/superlink/linkstate/in_memory_linkstate.py Stores overrides per-run in memory; adds getter; removes legacy options store.
framework/py/flwr/server/superlink/fleet/grpc_rere/node_auth_server_interceptor_test.py Updates run creation call signature.
framework/py/flwr/server/superlink/fleet/grpc_rere/fleet_servicer_test.py Updates run creation call signature.
framework/py/flwr/server/grid/inmemory_grid_test.py Updates run creation call signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@panh99 panh99 changed the title feat(framework): Store federation config overrides and expose it via PullAppInputs feat(framework): persist and apply simulation federation config overrides per run Mar 27, 2026
@panh99 panh99 changed the title feat(framework): persist and apply simulation federation config overrides per run feat(framework): Persist and apply federation config overrides per run Mar 27, 2026
jafermarq
jafermarq previously approved these changes Mar 27, 2026
@danieljanes danieljanes merged commit 683f97f into main Mar 27, 2026
69 checks passed
@danieljanes danieljanes deleted the create-run-with-fed-cfg branch March 27, 2026 15:45
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. One SuperLink Two Runtimes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants