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

[27.x backport] cli/connhelper: getConnectionHelper: move ssh-option funcs out of closure #5392

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented Sep 2, 2024

The addSSHTimeout and disablePseudoTerminalAllocation were added in commits a5ebe22 and f3c2c26, and called inside the Dialer function, which means they're called every time the Dialer is called. Given that the sshFlags slice is not mutated by the Dialer, we can call these functions once.

- A picture of a cute animal (not mandatory but encouraged)

…sure

The addSSHTimeout and disablePseudoTerminalAllocation were added in commits
a5ebe22 and f3c2c26,
and called inside the Dialer function, which means they're called every
time the Dialer is called. Given that the sshFlags slice is not mutated
by the Dialer, we can call these functions once.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 0fd3fb0)
Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland vvoland added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Sep 2, 2024
@vvoland vvoland added this to the 27.2.1 milestone Sep 2, 2024
@vvoland vvoland self-assigned this Sep 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.99%. Comparing base (83072c0) to head (1a0b6a7).
Report is 5 commits behind head on 27.x.

Additional details and impacted files
@@           Coverage Diff           @@
##             27.x    #5392   +/-   ##
=======================================
  Coverage   60.99%   60.99%           
=======================================
  Files         304      304           
  Lines       21357    21357           
=======================================
  Hits        13026    13026           
  Misses       7402     7402           
  Partials      929      929           

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 074dfc0 into docker:27.x Sep 2, 2024
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants