vendor: update buildkit to master@cbfd4023383d

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-09-07 12:13:54 +01:00
parent e018f8b6fb
commit e2ebab5f26
60 changed files with 1912 additions and 664 deletions

View File

@ -8,6 +8,7 @@ import (
"net/url"
"os"
"strings"
"time"
contentapi "github.com/containerd/containerd/api/services/content/v1"
"github.com/containerd/containerd/defaults"
@ -186,16 +187,29 @@ func (c *Client) Dialer() session.Dialer {
}
func (c *Client) Wait(ctx context.Context) error {
opts := []grpc.CallOption{grpc.WaitForReady(true)}
_, err := c.ControlClient().Info(ctx, &controlapi.InfoRequest{}, opts...)
if err != nil {
if code := grpcerrors.Code(err); code == codes.Unimplemented {
for {
_, err := c.ControlClient().Info(ctx, &controlapi.InfoRequest{})
if err == nil {
return nil
}
switch code := grpcerrors.Code(err); code {
case codes.Unavailable:
case codes.Unimplemented:
// only buildkit v0.11+ supports the info api, but an unimplemented
// response error is still a response so we can ignore it
return nil
default:
return err
}
select {
case <-ctx.Done():
return ctx.Err()
case <-time.After(time.Second):
}
c.conn.ResetConnectBackoff()
}
return err
}
func (c *Client) Close() error {