-
Notifications
You must be signed in to change notification settings - Fork 616
Add support for native grpc on the docker socket #3369
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Derek McGowan <derek@mcg.dev>
8f5fb52 to
36788c6
Compare
|
Did a quick rebase to get a fresh run of CI, and moved it out of draft after moby/moby#50744 was merged / accepted. |
| if err != nil { | ||
| opts = append([]client.ClientOpt{ | ||
| client.WithContextDialer(func(context.Context, string) (net.Conn, error) { | ||
| return d.Dial(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add some comment to describe that this is the fallback for the legacy approach @akerouanton (Which could include a link to the moby PR), so that we know when we could potentially remove the fallback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that'd make sense.
| c, err = client.New(ctx, d.DockerAPI.DaemonHost(), opts...) | ||
| workers []*client.WorkerInfo | ||
| ) | ||
| if err == nil { | ||
| workers, err = c.ListWorkers(ctx) | ||
| if err != nil { | ||
| c.Close() | ||
| } | ||
| } | ||
| if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive by review:
Is this not missing a return after c.Close()? Here the second if err != nil { can happen after ListWorkers and it does not look like that is the actual intent.
Uh oh!
There was an error while loading. Please reload this page.