662: Add activity check to cached sftp connections #808
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.
Title
Please pick a concise, informative and complete title for your PR.
The title is important because it will appear in our change log.
Motivation
This PR fixes the bug where SSH connections would hang with no response, when a cached connection was used, and the ssh connection was interrupted due to external factors (network, etc). This was first detailed here:
Additionally, this filters out the
connect_kwargs
key/value pair when validating the kwargs when opening the sftp file.connect_kwargs
is sftp-implementation-specific, so is flagged as "invalid" with the universal validation function, which doesn't cause any problems... but does pollute the log with confusing logs suggesting the theconnect_kwargs
arg isn't getting used when it is correctly used.