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

Improve EOF error messaging during CLI login flows #1093

Merged

Conversation

chris-janidlo
Copy link
Contributor

@chris-janidlo chris-janidlo commented Oct 24, 2024

Motivated by observed issues in Compute - users can set up working Compute endpoints, change their setups slightly around access to STDIN, and then see cryptic EOF errors when they eventually need to re-auth.

NB: as of the time of this commit, Compute handles this by raising an error before running login flows if the current environment does not appear to be an interactive terminal. The goal of this commit is to move that behavior to a more centralized location.


📚 Documentation preview 📚: https://globus-sdk-python--1093.org.readthedocs.build/en/1093/

Copy link
Member

@sirosen sirosen left a comment

Choose a reason for hiding this comment

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

I actually don't recall the original use-case which we discussed that well.

I'm perfectly happy for us to wrap EOFErrors like this if it makes external consumption easier -- it makes the error specific to the SDK, so it has at least some utility.

However, I want to make sure we're clear about what the interface we're defining is, so I've left some questions with a soft suggestion for some rearrangement.

Motivated by observed issues in Compute - users can set up working
Compute endpoints, change their setups slightly around access to STDIN,
and then see cryptic EOF errors when they eventually need to re-auth.

NB: as of the time of this commit, Compute handles this by raising an
error before running login flows if the current environment does not
appear to be an interactive terminal. The goal of this commit is to move
that behavior to a more centralized location.
@chris-janidlo chris-janidlo force-pushed the command-line-login-flow-manager-catch-eof branch from 001e3f5 to 9cc6d09 Compare October 25, 2024 19:31
Copy link
Contributor

@derek-globus derek-globus left a comment

Choose a reason for hiding this comment

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

This looks great, thanks for submitting a contribution Chris!

@sirosen sirosen merged commit d924f27 into globus:main Oct 25, 2024
16 checks passed
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.

3 participants