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

Fix(CLI): Poll buildkit container when bootstrap #197

Merged
merged 1 commit into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/envd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func run(args []string) (bool, error) {
&cli.StringFlag{
Name: flag.FlagBuildkitdImage,
Usage: "docker image to use for buildkitd",
Value: "docker.io/moby/buildkit:v0.10.1",
Value: "docker.io/moby/buildkit:v0.10.3",
},
&cli.StringFlag{
Name: flag.FlagBuildkitdContainer,
Expand Down
9 changes: 2 additions & 7 deletions pkg/buildkitd/buildkitd.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ func (c *generalClient) maybeStart(ctx context.Context,
}
}
c.logger.Debug("container is running, check if it's ready...")
cli, err := client.New(ctx, c.BuildkitdAddr(), client.WithFailFast())
if err != nil {
return "", errors.Wrap(err, "failed to create the buildkit client")
}
c.Client = cli

if err := c.waitUntilConnected(ctx, runningTimeout); err != nil {
return "", errors.Wrap(err, "failed to connect to buildkitd")
Expand All @@ -134,8 +129,8 @@ func (c generalClient) waitUntilConnected(
case <-time.After(interval):
connected, err := c.connected(ctxTimeout)
if err != nil {
// Has not yet started. Keep waiting.
return errors.Wrap(err, "failed to connect to buildkitd")
logrus.Debug("failed to connect to buildkitd")
continue
}
if !connected {
continue
Expand Down