Skip to content

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

Merged
danieljanes merged 21 commits intomainfrom
rm-ffs-1-add-state-methods
Apr 7, 2026
Merged

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

Conversation

@danieljanes
Copy link
Copy Markdown
Member

@danieljanes danieljanes commented Mar 22, 2026

This PR:

  • Adds two methods to CoreState (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.

Comment thread framework/py/flwr/supernode/nodestate/nodestate.py Outdated
Comment thread framework/py/flwr/server/superlink/linkstate/linkstate.py Outdated
@github-actions github-actions Bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 22, 2026
Comment thread framework/py/flwr/server/superlink/linkstate/sql_linkstate.py Outdated
Comment thread framework/py/flwr/supernode/nodestate/in_memory_nodestate.py Outdated
msheller
msheller previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Member

@msheller msheller left a comment

Choose a reason for hiding this comment

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

Ready for wider team review.

Comment thread framework/py/flwr/server/superlink/linkstate/sql_linkstate.py Outdated
Comment thread framework/py/flwr/supernode/nodestate/in_memory_nodestate.py Outdated
Comment thread framework/py/flwr/supernode/nodestate/in_memory_nodestate.py Outdated
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

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


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

Comment thread framework/py/flwr/supercore/corestate/sql_corestate.py
Comment thread framework/py/flwr/supercore/corestate/corestate.py
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

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


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

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

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


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

@danieljanes danieljanes enabled auto-merge (squash) April 7, 2026 16:52
@danieljanes danieljanes merged commit 663b7f1 into main Apr 7, 2026
132 of 133 checks passed
@danieljanes danieljanes deleted the rm-ffs-1-add-state-methods branch April 7, 2026 16:53
msheller added a commit that referenced this pull request Apr 8, 2026
…te (#6809)

Co-authored-by: Micah Sheller <micah@flower.ai>
Co-authored-by: jafermarq <javier@flower.ai>
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.

6 participants