Skip to content

refactor(framework): Add FFS-replacement methods to LinkState/NodeState#6809

Open
danieljanes wants to merge 7 commits intomainfrom
rm-ffs-1-add-state-methods
Open

refactor(framework): Add FFS-replacement methods to LinkState/NodeState#6809
danieljanes wants to merge 7 commits intomainfrom
rm-ffs-1-add-state-methods

Conversation

@danieljanes
Copy link
Copy Markdown
Member

This PR:

  • Adds two methods to LinkState and NodeState (store_fab and get_fab)
  • Implements those methods in all implementations
  • Add DB migrations

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 adds first-class FAB (Flower App Bundle) storage and retrieval APIs to the state layer (LinkState/NodeState) as a replacement for the previous FFS-style handling, including persistence via a new SQL table and migration.

Changes:

  • Introduces store_fab/get_fab abstract methods on LinkState and NodeState and implements them for in-memory and SQL-backed state.
  • Adds a new fab table to the LinkState SQL schema plus an Alembic migration to create it.
  • Extends existing state test suites to cover FAB storage, deduplication-by-hash, and missing-hash behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
framework/py/flwr/supernode/nodestate/nodestate_test.py Adds NodeState tests for storing/retrieving FABs, deduplication by content hash, and missing lookups.
framework/py/flwr/supernode/nodestate/nodestate.py Extends the NodeState interface with store_fab/get_fab.
framework/py/flwr/supernode/nodestate/in_memory_nodestate.py Implements FAB storage in the in-memory NodeState backend keyed by SHA-256(content).
framework/py/flwr/supercore/state/schema/linkstate_tables.py Adds the fab table to LinkState SQLAlchemy metadata.
framework/py/flwr/supercore/state/alembic/versions/rev_2026_03_21_add_fab_table.py Introduces an Alembic migration to create/drop the fab table.
framework/py/flwr/supercore/state/alembic/utils_test.py Adds a migration test asserting the fab table exists after running migrations.
framework/py/flwr/server/superlink/linkstate/sql_linkstate.py Implements FAB persistence in SqlLinkState (upsert + retrieval).
framework/py/flwr/server/superlink/linkstate/linkstate_test.py Adds LinkState tests for FAB store/get, deduplication, and missing hash behavior.
framework/py/flwr/server/superlink/linkstate/linkstate.py Extends the LinkState interface with store_fab/get_fab.
framework/py/flwr/server/superlink/linkstate/in_memory_linkstate.py Implements FAB storage in the in-memory LinkState backend keyed by SHA-256(content).

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

@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 22, 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.

3 participants