vendor: update buildkit to v0.34.2

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax committed 2026-11-03 13:18:28 +01:00
1 parent b1bf12766e
commit 0f7dd638fd
9 files changed
+28 -71

No files matched your search

+2 -2
View File
@@ -64,7 +64,7 @@ require (
github.com/miekg/dns v1.1.73
github.com/mistifyio/go-zfs/v4 v4.0.0
github.com/mitchellh/copystructure v1.2.0
github.com/moby/buildkit v0.34.1
github.com/moby/buildkit v0.34.2
github.com/moby/docker-image-spec v1.3.1
github.com/moby/extensions v0.0.0-20261020100352-d2819d88bcbe
github.com/moby/go-archive v0.3.3
@@ -99,7 +99,7 @@ require (
github.com/sirupsen/logrus v1.10.2
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/tonistiigi/fsutil v0.0.0-20261027232937-ca65610c2295
github.com/tonistiigi/fsutil v0.0.0-20261103091533-a72de9dcf763
github.com/tonistiigi/go-archvariant v1.0.0
github.com/vbatts/tar-split v0.12.3
github.com/vishvananda/netlink v1.3.1
+4 -4
View File
@@ -469,8 +469,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/buildkit v0.34.1 h1:jVdxsXX0UpU0q1Et+9lFezPmh9sGE6vF0TrKZaGlfy4=
github.com/moby/buildkit v0.34.1/go.mod h1:e+Za70y2a3nL1U2Y0P8TvhPyKp2Ok2NS+Q4siSArDiM=
github.com/moby/buildkit v0.34.2 h1:fXgOe79JW5zJNDumRtwTemOklLX66otQokObUXuiGJo=
github.com/moby/buildkit v0.34.2/go.mod h1:HyFnF6kIPzHvqopF1+BKeGY8Ee9MXmfR2n+0Gd4Y69s=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/extensions v0.0.0-20261020100352-d2819d88bcbe h1:wHRo58MA+vgX2sXtL4uT/NcSYPiyJarqHZ4aDS8P0ys=
@@ -657,8 +657,8 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs=
github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323 h1:r0p7fK56l8WPequOaR3i9LBqfPtEdXIQbUTzT55iqT4=
github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323/go.mod h1:3Iuxbr0P7D3zUzBMAZB+ois3h/et0shEz0qApgHYGpY=
github.com/tonistiigi/fsutil v0.0.0-20261027232937-ca65610c2295 h1:ZsuzD6v7DvLAjJ4E1I9nuJ04NnOtE72PM0lOO/ApG/Q=
github.com/tonistiigi/fsutil v0.0.0-20261027232937-ca65610c2295/go.mod h1:oO0lfhK8QAY3alnpiYXcRVjyVx95XGWZE3K2M+AqfcM=
github.com/tonistiigi/fsutil v0.0.0-20261103091533-a72de9dcf763 h1:9FmebYajdrHrT3PGvCB821YQ610s1E2IeAErsltsiKY=
github.com/tonistiigi/fsutil v0.0.0-20261103091533-a72de9dcf763/go.mod h1:oO0lfhK8QAY3alnpiYXcRVjyVx95XGWZE3K2M+AqfcM=
github.com/tonistiigi/go-actions-cache v0.0.0-20260930145529-afe8013b5ac4 h1:RkHGDzvazJu1TzNvesQpnN5RwNxvU3e7O2UdJqjaj2Q=
github.com/tonistiigi/go-actions-cache v0.0.0-20260930145529-afe8013b5ac4/go.mod h1:PhGlvWoWwfUaY1K5xm8HHjcinBw/rD9FLQTPTxHbxyw=
github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0=
+4 -3
View File
@@ -597,9 +597,10 @@ func (gs *gitSourceHandler) resolveMetadata(ctx context.Context, jobCtx solver.J
}
saveResolved := true
defer func() {
v := md
if retErr != nil || !saveResolved {
v = nil
// untyped nil, a nil *Metadata would be stored as a value
var v any
if retErr == nil && saveResolved {
v = md
}
if err := release(v); err != nil {
bklog.G(ctx).Warnf("failed to release resolver cache lock for %s: %v", gs.remoteKey(), err)
+3 -3
View File
@@ -230,9 +230,9 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, er
func (dw *DiskWriter) requestAsyncFileData(p, dest string, fi os.FileInfo, st *types.Stat) {
// todo: limit worker threads
dw.eg.Go(func() error {
w := &lazyFileWriter{dest: dest}
if err := dw.processChange(dw.egCtx, ChangeKindAdd, p, fi, w); err != nil {
w.Close()
if err := dw.processChange(dw.egCtx, ChangeKindAdd, p, fi, &lazyFileWriter{
dest: dest,
}); err != nil {
return err
}
return chtimes(dest, st.ModTime) // TODO: parent dirs
+1 -1
View File
@@ -13,7 +13,7 @@ import (
func rewriteMetadata(p string, stat *types.Stat) error {
for key, value := range stat.Xattrs {
sysx.Setxattr(p, key, value, 0)
sysx.LSetxattr(p, key, value, 0)
}
if err := os.Lchown(p, int(stat.Uid), int(stat.Gid)); err != nil {
+5 -39
View File
@@ -423,7 +423,6 @@ func (r *receiver) asyncDataFunc(ctx context.Context, p string, wc io.WriteClose
r.pipes[id] = wwc
r.muPipes.Unlock()
if err := r.conn.SendMsg(&types.Packet{Type: types.PACKET_REQ, ID: id}); err != nil {
wwc.abandon()
return err
}
err := wwc.Wait(ctx)
@@ -438,61 +437,28 @@ func (r *receiver) asyncDataFunc(ctx context.Context, p string, wc io.WriteClose
type wrappedWriteCloser struct {
io.WriteCloser
mu sync.Mutex // serializes the receive loop with Wait
closed bool
abandoned bool
err error
done chan struct{}
err error
once sync.Once
done chan struct{}
}
func newWrappedWriteCloser(wc io.WriteCloser) *wrappedWriteCloser {
return &wrappedWriteCloser{WriteCloser: wc, done: make(chan struct{})}
}
func (w *wrappedWriteCloser) Write(dt []byte) (int, error) {
w.mu.Lock()
defer w.mu.Unlock()
if w.abandoned {
// The request was abandoned and the disk writer owns the
// underlying writer again. Drop the data.
return len(dt), nil
}
return w.WriteCloser.Write(dt)
}
func (w *wrappedWriteCloser) Close() error {
w.mu.Lock()
defer w.mu.Unlock()
if w.closed || w.abandoned {
return w.err
}
w.closed = true
w.err = w.WriteCloser.Close()
close(w.done)
w.once.Do(func() { close(w.done) })
return w.err
}
func (w *wrappedWriteCloser) Wait(ctx context.Context) error {
select {
case <-ctx.Done():
return ctx.Err()
case <-w.done:
}
w.mu.Lock()
defer w.mu.Unlock()
if w.closed {
return w.err
}
// Cancelled. The receive loop may still get data for this file. Make sure
// it does not touch the underlying writer after we return.
w.abandoned = true
return ctx.Err()
}
// abandon stops the receive loop from using the underlying writer.
func (w *wrappedWriteCloser) abandon() {
w.mu.Lock()
w.abandoned = true
w.mu.Unlock()
}
type stack[T any] struct {
+4 -8
View File
@@ -99,7 +99,7 @@ func (s *sender) run(ctx context.Context) error {
case types.PACKET_ERR:
return errors.Errorf("error from receiver: %s", p.Data)
case types.PACKET_REQ:
if err := s.queue(ctx, p.ID); err != nil {
if err := s.queue(p.ID); err != nil {
return err
}
case types.PACKET_FIN:
@@ -120,7 +120,7 @@ func (s *sender) updateProgress(size int, last bool) {
}
}
func (s *sender) queue(ctx context.Context, id uint32) error {
func (s *sender) queue(id uint32) error {
s.mu.Lock()
p, ok := s.files[id]
if !ok {
@@ -129,12 +129,8 @@ func (s *sender) queue(ctx context.Context, id uint32) error {
}
delete(s.files, id)
s.mu.Unlock()
select {
case s.sendpipeline <- &sendHandle{id, p}:
return nil
case <-ctx.Done():
return context.Cause(ctx)
}
s.sendpipeline <- &sendHandle{id, p}
return nil
}
func (s *sender) sendFile(h *sendHandle) error {
+3 -9
View File
@@ -61,10 +61,6 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) error {
hdr.PAXRecords["SCHILY.xattr."+k] = string(v)
}
// Without a format the tar writer rounds the modification time to the
// nearest second. PAX keeps the sub-second part.
hdr.Format = tar.FormatPAX
if err := tw.WriteHeader(hdr); err != nil {
return errors.Wrapf(err, "failed to write file header %s", name)
}
@@ -74,13 +70,11 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) error {
if err != nil {
return err
}
_, err = io.Copy(tw, rc)
closeErr := rc.Close()
if err != nil {
if _, err := io.Copy(tw, rc); err != nil {
return errors.WithStack(err)
}
if closeErr != nil {
return errors.WithStack(closeErr)
if err := rc.Close(); err != nil {
return errors.WithStack(err)
}
}
return nil
+2 -2
View File
@@ -1078,7 +1078,7 @@ github.com/mitchellh/copystructure
# github.com/mitchellh/reflectwalk v1.0.2
## explicit
github.com/mitchellh/reflectwalk
# github.com/moby/buildkit v0.34.1
# github.com/moby/buildkit v0.34.2
## explicit; go 1.26.8
github.com/moby/buildkit/api/services/control
github.com/moby/buildkit/api/types
@@ -1705,7 +1705,7 @@ github.com/tinylib/msgp/msgp
# github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323
## explicit; go 1.21
github.com/tonistiigi/dchapes-mode
# github.com/tonistiigi/fsutil v0.0.0-20261027232937-ca65610c2295
# github.com/tonistiigi/fsutil v0.0.0-20261103091533-a72de9dcf763
## explicit; go 1.25.0
github.com/tonistiigi/fsutil
github.com/tonistiigi/fsutil/copy