feat(framework): Mention superlink to login against upon an authentication error - #7698
Draft
jafermarq wants to merge 3 commits into
Draft
feat(framework): Mention superlink to login against upon an authentication error#7698jafermarq wants to merge 3 commits into
superlink to login against upon an authentication error#7698jafermarq wants to merge 3 commits into
Conversation
jafermarq
requested review from
danieljanes,
panh99 and
tanertopal
as code owners
July 28, 2026 11:45
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the CLI UX for authentication failures by suggesting the specific SuperLink connection name to pass to flwr login, based on the command context (e.g., flwr ls supergrid → flwr login supergrid).
Changes:
- Update
flwr_cli_grpc_exc_handlerto include the relevant SuperLink name in UNAUTHENTICATED error guidance. - Add a unit test to ensure the suggested login command includes the connection name.
Critical issues
- The new use of
click.get_current_context()in the gRPC exception handler can raiseRuntimeErrorif the handler is executed outside an active Click/Typer context, masking the original UNAUTHENTICATED error. Additionally, callingread_superlink_connection()in the error handler can raiseClickException(e.g., missing default config), replacing the intended authentication guidance.
Simplicity/readability suggestions
- None beyond addressing the critical issue above.
Consistency concerns
- None identified.
Whether the PR should be split
- No.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| framework/py/flwr/cli/utils.py | Include SuperLink connection name in the UNAUTHENTICATED login suggestion. |
| framework/py/flwr/cli/utils_test.py | Add coverage for UNAUTHENTICATED gRPC error messaging including connection name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
superlink to login against upon authentication errorsuperlink to login against upon an authentication error
dstripelis
previously approved these changes
Jul 28, 2026
jafermarq
marked this pull request as draft
July 28, 2026 11:54
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.
Before it response said plainly "do
flwr login" w/o specifying theSuperLinkConnectionname:uv run --python=3.11.14 --all-extras --all-groups flwr ls supergrid Using SuperLink: supergrid (supergrid.flower.ai) 📄 Listing all runs... ╭─ Error ──────────────────────────────────────────────────────────────────────────────────────╮ │ Authentication failed. Please run `flwr login` to authenticate and try again. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯Now, it indicates which one to use (based on the command that triggered it: in this example
flwr ls):uv run --python=3.11.14 --all-extras --all-groups flwr ls supergrid Using SuperLink: supergrid (supergrid.flower.ai) 📄 Listing all runs... ╭─ Error ──────────────────────────────────────────────────────────────────────────────────────╮ │ Authentication failed. Please run `flwr login supergrid` to authenticate and try again. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯