Skip to content
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

Add nice names for known resource servers #779

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

sirosen
Copy link
Member

@sirosen sirosen commented Mar 15, 2023

Each resource server listed in our scope requirements map has a nice_server_name attribute associated with it, resulting in the expected mapping

auth -> Globus Auth
transfer -> Globus Transfer

but notably also

$timer_service_id -> Globus Timers

This enables better output when a command fails the requires_login check, as the user is prompted with a known short name rather than a less readable resource_server value.

To implement this, the MissingLoginError class now depends upon the scope requirements. But this could be refactored in the future to make the integration between the two more loosely coupled.

Each resource server listed in our scope requirements map has a
nice_server_name attribute associated with it, resulting in the
expected mapping

  auth -> Globus Auth
  transfer -> Globus Transfer

but notably also

  $timer_service_id -> Globus Timers

This enables better output when a command fails the `requires_login`
check, as the user is prompted with a known short name rather than a
less readable resource_server value.

To implement this, the MissingLoginError class now depends upon the
scope requirements. But this could be refactored in the future to make
the integration between the two more loosely coupled.

The names are sorted to provide good guarantees to the testsuite.
@sirosen sirosen force-pushed the nicer-missing-login-errors branch from e4c40f0 to ab7a53f Compare March 15, 2023 22:02
@sirosen sirosen merged commit 5147a94 into globus:main Mar 15, 2023
@sirosen sirosen deleted the nicer-missing-login-errors branch March 15, 2023 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant