Uh oh!
There was an error while loading. Please reload this page.
cli: perform feature detection lazily - #2424
Merged
Merged
Conversation
thaJeztah
commented
Apr 7, 2020
MemberAuthor
thaJeztahforce-pushed
the
lazy_feature_detection
branch
2 times, most recently
from
April 9, 2020 11:27
8abec90 to
d171265CompareUh oh!
There was an error while loading. Please reload this page.
thaJeztahforce-pushed
the
lazy_feature_detection
branch
from
April 9, 2020 16:08
d171265 to
0c08b36CompareUh oh!
There was an error while loading. Please reload this page.
thaJeztahforce-pushed
the
lazy_feature_detection
branch
2 times, most recently
from
April 9, 2020 19:25
7da559d to
e4e3abaComparethaJeztah
commented
Apr 9, 2020
MemberAuthor
@silvin-lubecki updated; PTAL |
thaJeztahforce-pushed
the
lazy_feature_detection
branch
14 times, most recently
from
April 10, 2020 14:31
bbe201a to
988c619CompareSigned-off-by: Sebastiaan van Stijn <github@gone.nl>
- Perform feature detection when actually needed, instead of during initializing - Version negotiation is performed either when making an API request, or when (e.g.) running `docker help` (to hide unsupported features) - Use a 2 second timeout when 'pinging' the daemon; this should be sufficient for most cases, and when feature detection failed, the daemon will still perform validation (and produce an error if needed) - context.WithTimeout doesn't currently work with ssh connections (connhelper), so we're only applying this timeout for tcp:// connections, otherwise keep the old behavior. Before this change: time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker help &> /dev/null' real 0m32.919s user 0m0.370s sys 0m0.227s time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker context ls &> /dev/null' real 0m32.072s user 0m0.029s sys 0m0.023s After this change: time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker help &> /dev/null' real 0m 2.28s user 0m 0.03s sys 0m 0.03s time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker context ls &> /dev/null' real 0m 0.13s user 0m 0.02s sys 0m 0.02s Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztahforce-pushed
the
lazy_feature_detection
branch
from
April 10, 2020 14:33
988c619 to
b397391Compare3 tasks
This was referenced Dec 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
alternative to / closes#1747
fixes#1739
fixes#2420
cli: perform feature detection lazily
docker help(to hide unsupported features)context.WithTimeout()doesn't currently work with ssh connections (connhelper), so we're only applying this timeout for tcp:// connections, otherwise keep the old behavior.Before this change:
After this change: