-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(framework): Enforce StartRun entitlement via can_execute
#6909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+100
−2
Merged
Changes from 29 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
bdc9a3b
feat(superlink): add generic federation can_execute hook
chongshenng 820adb9
feat(superlink): add generic federation can_execute hook
chongshenng b3eec03
feat(superlink): enforce start run entitlement via can_execute
chongshenng c83f24f
refactor(superlink): type can_execute action with ActionType
chongshenng a77c2b0
Format code
chongshenng 2739fd2
refactor(superlink): type can_execute action with ActionType
chongshenng 73503d5
refactor(superlink): use typed can_execute args in StartRun
chongshenng 9e270ae
Format
chongshenng bcbad42
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng 828afdc
Merge branch 'main' into feat/pr1-can-execute-hook
chongshenng 2fd8a3f
Rebase
chongshenng a7d1052
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng c515134
Disable too many public methods
chongshenng 9a5960e
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng fc2f1a9
Merge branch 'main' into feat/pr1-can-execute-hook
chongshenng 7946f43
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng 2a20769
Update
chongshenng d4dfb1d
Revert
chongshenng 37e7a9c
Fix
chongshenng cf65e6d
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng 99806fb
Improve
chongshenng 1b4c70d
Fix
chongshenng 8568361
Merge branch 'main' into feat/pr1-can-execute-hook
chongshenng 9865ed5
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng 8c2278f
Set typing
chongshenng b0b9a85
Sort
chongshenng ed8ae0d
Fix
chongshenng 23ce56d
Merge branch 'feat/pr1-can-execute-hook' into feat/pr2-start-run-enti…
chongshenng 4d78827
Rebase
chongshenng d1a7c18
Fix
chongshenng 9eaa04f
Merge branch 'main' into feat/pr2-start-run-entitlement
chongshenng dace39a
Update framework/py/flwr/superlink/servicer/control/control_servicer.py
chongshenng 2eed4ed
Update framework/py/flwr/superlink/servicer/control/control_servicer.py
chongshenng 2fcc1d8
Update framework/py/flwr/superlink/servicer/control/control_servicer.py
chongshenng ee963cb
Add simulation test coverage
chongshenng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Copyright 2026 Flower Labs GmbH. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # ============================================================================== | ||
| """Flower SuperCore type definitions.""" | ||
|
|
||
|
|
||
| from dataclasses import dataclass | ||
|
|
||
| from flwr.supercore.constant import RunTime | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class ActionContext: | ||
| """Base context for authorization checks in ``can_execute``.""" | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class StartRunContext(ActionContext): | ||
| """Context for the `ActionType.START_RUN` action. | ||
|
|
||
| Attributes | ||
| ---------- | ||
| federation : str | ||
| Target federation name. | ||
| runtime : RunTime | ||
| The runtime relevant to the action. | ||
| """ | ||
|
|
||
| federation: str | ||
| runtime: RunTime |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.