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 error handling for pure SSH protocol #5063

Merged
merged 3 commits into from Feb 16, 2023

Conversation

bk2204
Copy link
Member

@bk2204 bk2204 commented Jun 30, 2022

In some cases, we can end up with a panic due to a pure SSH transfer lacking any connections, but it's not clear what those cases are. Let's add some explicit checks that our connection is functional and return an error if not, and let's also add some defensiveness to make sure that if we encounter an unexpected case that we return a better error message.

In some cases, we can end up with a panic due to a pure SSH transfer
lacking any connections, but it's not clear what those cases are.  Let's
help improve a possible failure case by explicitly setting sshTransfer
to nil, since shutting down is the only case in which we explicitly set
the number of connections to 0.

This means that we'll get a better error message in such a case, since
we'll attempt a legacy SSH connection, which won't work, and that will
be reported to the user.
In some cases, we can end up with a panic due to a pure SSH transfer
lacking any connections, but it's not clear what those cases are.  Let's
add some explicit checks that our connection is functional and return an
error if not.
Let's improve the logging for the pure SSH protocol so that when we have
a problem, it's easier for users to use the trace output to figure out
what's wrong.
@bk2204 bk2204 marked this pull request as ready for review February 16, 2023 15:21
@bk2204 bk2204 requested a review from a team as a code owner February 16, 2023 15:21
@bk2204 bk2204 merged commit f60fcdd into git-lfs:main Feb 16, 2023
@bk2204 bk2204 deleted the pure-ssh-failure branch February 16, 2023 17:18
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.

None yet

2 participants