mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 21:47:13 +08:00
vendor: update buildkit to v0.11@348e79dfed17
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
2
vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go
generated
vendored
2
vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go
generated
vendored
@ -299,7 +299,7 @@ type ListContentRequest struct {
|
||||
// filters. Expanded, containers that match the following will be
|
||||
// returned:
|
||||
//
|
||||
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
|
||||
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
|
||||
//
|
||||
// If filters is zero-length or nil, all items will be returned.
|
||||
Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
|
||||
|
2
vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
generated
vendored
2
vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
generated
vendored
@ -141,7 +141,7 @@ message ListContentRequest {
|
||||
// filters. Expanded, containers that match the following will be
|
||||
// returned:
|
||||
//
|
||||
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
|
||||
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
|
||||
//
|
||||
// If filters is zero-length or nil, all items will be returned.
|
||||
repeated string filters = 1;
|
||||
|
3
vendor/github.com/containerd/containerd/content/local/store.go
generated
vendored
3
vendor/github.com/containerd/containerd/content/local/store.go
generated
vendored
@ -34,7 +34,7 @@ import (
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/opencontainers/go-digest"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
@ -505,6 +505,7 @@ func (s *store) resumeStatus(ref string, total int64, digester digest.Digester)
|
||||
return status, fmt.Errorf("provided total differs from status: %v != %v", total, status.Total)
|
||||
}
|
||||
|
||||
//nolint:dupword
|
||||
// TODO(stevvooe): slow slow slow!!, send to goroutine or use resumable hashes
|
||||
fp, err := os.Open(data)
|
||||
if err != nil {
|
||||
|
12
vendor/github.com/containerd/containerd/platforms/defaults_windows.go
generated
vendored
12
vendor/github.com/containerd/containerd/platforms/defaults_windows.go
generated
vendored
@ -46,10 +46,14 @@ type matchComparer struct {
|
||||
|
||||
// Match matches platform with the same windows major, minor
|
||||
// and build version.
|
||||
func (m matchComparer) Match(p imagespec.Platform) bool {
|
||||
if m.defaults.Match(p) {
|
||||
// TODO(windows): Figure out whether OSVersion is deprecated.
|
||||
return strings.HasPrefix(p.OSVersion, m.osVersionPrefix)
|
||||
func (m matchComparer) Match(p specs.Platform) bool {
|
||||
match := m.defaults.Match(p)
|
||||
|
||||
if match && p.OS == "windows" {
|
||||
if strings.HasPrefix(p.OSVersion, m.osVersionPrefix) {
|
||||
return true
|
||||
}
|
||||
return p.OSVersion == ""
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
2
vendor/github.com/containerd/containerd/version/version.go
generated
vendored
2
vendor/github.com/containerd/containerd/version/version.go
generated
vendored
@ -23,7 +23,7 @@ var (
|
||||
Package = "github.com/containerd/containerd"
|
||||
|
||||
// Version holds the complete version number. Filled in at linking time.
|
||||
Version = "1.6.15+unknown"
|
||||
Version = "1.6.20+unknown"
|
||||
|
||||
// Revision is filled with the VCS (e.g. git) revision being used to build
|
||||
// the program at linking time.
|
||||
|
7
vendor/github.com/containerd/ttrpc/server.go
generated
vendored
7
vendor/github.com/containerd/ttrpc/server.go
generated
vendored
@ -24,6 +24,7 @@ import (
|
||||
"net"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -467,14 +468,12 @@ func (c *serverConn) run(sctx context.Context) {
|
||||
// branch. Basically, it means that we are no longer receiving
|
||||
// requests due to a terminal error.
|
||||
recvErr = nil // connection is now "closing"
|
||||
if err == io.EOF || err == io.ErrUnexpectedEOF {
|
||||
if err == io.EOF || err == io.ErrUnexpectedEOF || errors.Is(err, syscall.ECONNRESET) {
|
||||
// The client went away and we should stop processing
|
||||
// requests, so that the client connection is closed
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
logrus.WithError(err).Error("error receiving message")
|
||||
}
|
||||
logrus.WithError(err).Error("error receiving message")
|
||||
case <-shutdown:
|
||||
return
|
||||
}
|
||||
|
5
vendor/github.com/moby/buildkit/client/llb/definition.go
generated
vendored
5
vendor/github.com/moby/buildkit/client/llb/definition.go
generated
vendored
@ -29,6 +29,10 @@ type DefinitionOp struct {
|
||||
|
||||
// NewDefinitionOp returns a new operation from a marshalled definition.
|
||||
func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) {
|
||||
if def == nil {
|
||||
return nil, errors.New("invalid nil input definition to definition op")
|
||||
}
|
||||
|
||||
ops := make(map[digest.Digest]*pb.Op)
|
||||
defs := make(map[digest.Digest][]byte)
|
||||
platforms := make(map[digest.Digest]*ocispecs.Platform)
|
||||
@ -205,6 +209,7 @@ func (d *DefinitionOp) Inputs() []Output {
|
||||
dgst: input.Digest,
|
||||
index: input.Index,
|
||||
inputCache: d.inputCache,
|
||||
sources: d.sources,
|
||||
}
|
||||
existingIndexes := d.inputCache[input.Digest]
|
||||
indexDiff := int(input.Index) - len(existingIndexes)
|
||||
|
2
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/types.go
generated
vendored
2
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/types.go
generated
vendored
@ -11,7 +11,7 @@ const (
|
||||
ExporterImageConfigDigestKey = "containerimage.config.digest"
|
||||
ExporterImageDescriptorKey = "containerimage.descriptor"
|
||||
ExporterInlineCache = "containerimage.inlinecache"
|
||||
ExporterBuildInfo = "containerimage.buildinfo"
|
||||
ExporterBuildInfo = "containerimage.buildinfo" // Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md
|
||||
ExporterPlatformsKey = "refs.platforms"
|
||||
ExporterEpochKey = "source.date.epoch"
|
||||
)
|
||||
|
4
vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
generated
vendored
4
vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
generated
vendored
@ -927,11 +927,11 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien
|
||||
|
||||
if msg == nil {
|
||||
// empty message from ctx cancel, so just start shutting down
|
||||
// input, but continue processing more exit/done messages
|
||||
// input
|
||||
closeDoneOnce.Do(func() {
|
||||
close(done)
|
||||
})
|
||||
continue
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
if file := msg.GetFile(); file != nil {
|
||||
|
29
vendor/github.com/moby/buildkit/session/session.go
generated
vendored
29
vendor/github.com/moby/buildkit/session/session.go
generated
vendored
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"github.com/moby/buildkit/identity"
|
||||
@ -36,14 +37,16 @@ type Attachable interface {
|
||||
|
||||
// Session is a long running connection between client and a daemon
|
||||
type Session struct {
|
||||
id string
|
||||
name string
|
||||
sharedKey string
|
||||
ctx context.Context
|
||||
cancelCtx func()
|
||||
done chan struct{}
|
||||
grpcServer *grpc.Server
|
||||
conn net.Conn
|
||||
mu sync.Mutex // synchronizes conn run and close
|
||||
id string
|
||||
name string
|
||||
sharedKey string
|
||||
ctx context.Context
|
||||
cancelCtx func()
|
||||
done chan struct{}
|
||||
grpcServer *grpc.Server
|
||||
conn net.Conn
|
||||
closeCalled bool
|
||||
}
|
||||
|
||||
// NewSession returns a new long running session
|
||||
@ -99,6 +102,11 @@ func (s *Session) ID() string {
|
||||
|
||||
// Run activates the session
|
||||
func (s *Session) Run(ctx context.Context, dialer Dialer) error {
|
||||
s.mu.Lock()
|
||||
if s.closeCalled {
|
||||
s.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
s.cancelCtx = cancel
|
||||
s.done = make(chan struct{})
|
||||
@ -118,15 +126,18 @@ func (s *Session) Run(ctx context.Context, dialer Dialer) error {
|
||||
}
|
||||
conn, err := dialer(ctx, "h2c", meta)
|
||||
if err != nil {
|
||||
s.mu.Unlock()
|
||||
return errors.Wrap(err, "failed to dial gRPC")
|
||||
}
|
||||
s.conn = conn
|
||||
s.mu.Unlock()
|
||||
serve(ctx, s.grpcServer, conn)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close closes the session
|
||||
func (s *Session) Close() error {
|
||||
s.mu.Lock()
|
||||
if s.cancelCtx != nil && s.done != nil {
|
||||
if s.conn != nil {
|
||||
s.conn.Close()
|
||||
@ -134,6 +145,8 @@ func (s *Session) Close() error {
|
||||
s.grpcServer.Stop()
|
||||
<-s.done
|
||||
}
|
||||
s.closeCalled = true
|
||||
s.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
3
vendor/github.com/moby/buildkit/util/buildinfo/types/types.go
generated
vendored
3
vendor/github.com/moby/buildkit/util/buildinfo/types/types.go
generated
vendored
@ -1,3 +1,6 @@
|
||||
// Package binfotypes implements types for build information.
|
||||
//
|
||||
// Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md
|
||||
package binfotypes
|
||||
|
||||
import (
|
||||
|
16
vendor/github.com/moby/buildkit/util/gitutil/git_ref.go
generated
vendored
16
vendor/github.com/moby/buildkit/util/gitutil/git_ref.go
generated
vendored
@ -73,22 +73,12 @@ func ParseGitRef(ref string) (*GitRef, error) {
|
||||
}
|
||||
}
|
||||
|
||||
refSplitBySharp := strings.SplitN(ref, "#", 2)
|
||||
res.Remote = refSplitBySharp[0]
|
||||
var fragment string
|
||||
res.Remote, fragment, _ = strings.Cut(ref, "#")
|
||||
if len(res.Remote) == 0 {
|
||||
return res, errdefs.ErrInvalidArgument
|
||||
}
|
||||
|
||||
if len(refSplitBySharp) > 1 {
|
||||
refSplitBySharpSplitByColon := strings.SplitN(refSplitBySharp[1], ":", 2)
|
||||
res.Commit = refSplitBySharpSplitByColon[0]
|
||||
if len(res.Commit) == 0 {
|
||||
return res, errdefs.ErrInvalidArgument
|
||||
}
|
||||
if len(refSplitBySharpSplitByColon) > 1 {
|
||||
res.SubDir = refSplitBySharpSplitByColon[1]
|
||||
}
|
||||
}
|
||||
res.Commit, res.SubDir, _ = strings.Cut(fragment, ":")
|
||||
repoSplitBySlash := strings.Split(res.Remote, "/")
|
||||
res.ShortName = strings.TrimSuffix(repoSplitBySlash[len(repoSplitBySlash)-1], ".git")
|
||||
return res, nil
|
||||
|
2
vendor/github.com/moby/buildkit/util/imageutil/buildinfo.go
generated
vendored
2
vendor/github.com/moby/buildkit/util/imageutil/buildinfo.go
generated
vendored
@ -9,6 +9,8 @@ import (
|
||||
)
|
||||
|
||||
// BuildInfo returns build info from image config.
|
||||
//
|
||||
// Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md
|
||||
func BuildInfo(dt []byte) (*binfotypes.BuildInfo, error) {
|
||||
if len(dt) == 0 {
|
||||
return nil, nil
|
||||
|
2
vendor/github.com/moby/buildkit/util/progress/progressui/init.go
generated
vendored
2
vendor/github.com/moby/buildkit/util/progress/progressui/init.go
generated
vendored
@ -14,7 +14,7 @@ var colorError aec.ANSI
|
||||
|
||||
func init() {
|
||||
// As recommended on https://no-color.org/
|
||||
if _, ok := os.LookupEnv("NO_COLOR"); ok {
|
||||
if v := os.Getenv("NO_COLOR"); v != "" {
|
||||
// nil values will result in no ANSI color codes being emitted.
|
||||
return
|
||||
} else if runtime.GOOS == "windows" {
|
||||
|
9
vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
generated
vendored
9
vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
generated
vendored
@ -59,4 +59,13 @@ const (
|
||||
|
||||
// AnnotationBaseImageName is the annotation key for the image reference of the image's base image.
|
||||
AnnotationBaseImageName = "org.opencontainers.image.base.name"
|
||||
|
||||
// AnnotationArtifactCreated is the annotation key for the date and time on which the artifact was built, conforming to RFC 3339.
|
||||
AnnotationArtifactCreated = "org.opencontainers.artifact.created"
|
||||
|
||||
// AnnotationArtifactDescription is the annotation key for the human readable description for the artifact.
|
||||
AnnotationArtifactDescription = "org.opencontainers.artifact.description"
|
||||
|
||||
// AnnotationReferrersFiltersApplied is the annotation key for the comma separated list of filters applied by the registry in the referrers listing.
|
||||
AnnotationReferrersFiltersApplied = "org.opencontainers.referrers.filtersApplied"
|
||||
)
|
||||
|
34
vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go
generated
vendored
Normal file
34
vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright 2022 The Linux Foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v1
|
||||
|
||||
// Artifact describes an artifact manifest.
|
||||
// This structure provides `application/vnd.oci.artifact.manifest.v1+json` mediatype when marshalled to JSON.
|
||||
type Artifact struct {
|
||||
// MediaType is the media type of the object this schema refers to.
|
||||
MediaType string `json:"mediaType"`
|
||||
|
||||
// ArtifactType is the IANA media type of the artifact this schema refers to.
|
||||
ArtifactType string `json:"artifactType"`
|
||||
|
||||
// Blobs is a collection of blobs referenced by this manifest.
|
||||
Blobs []Descriptor `json:"blobs,omitempty"`
|
||||
|
||||
// Subject (reference) is an optional link from the artifact to another manifest forming an association between the artifact and the other manifest.
|
||||
Subject *Descriptor `json:"subject,omitempty"`
|
||||
|
||||
// Annotations contains arbitrary metadata for the artifact manifest.
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
}
|
9
vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go
generated
vendored
9
vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go
generated
vendored
@ -48,6 +48,15 @@ type ImageConfig struct {
|
||||
|
||||
// StopSignal contains the system call signal that will be sent to the container to exit.
|
||||
StopSignal string `json:"StopSignal,omitempty"`
|
||||
|
||||
// ArgsEscaped `[Deprecated]` - This field is present only for legacy
|
||||
// compatibility with Docker and should not be used by new image builders.
|
||||
// It is used by Docker for Windows images to indicate that the `Entrypoint`
|
||||
// or `Cmd` or both, contains only a single element array, that is a
|
||||
// pre-escaped, and combined into a single string `CommandLine`. If `true`
|
||||
// the value in `Entrypoint` or `Cmd` should be used as-is to avoid double
|
||||
// escaping.
|
||||
ArgsEscaped bool `json:"ArgsEscaped,omitempty"`
|
||||
}
|
||||
|
||||
// RootFS describes a layer content addresses
|
||||
|
5
vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go
generated
vendored
5
vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Linux Foundation
|
||||
// Copyright 2016-2022 The Linux Foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -44,6 +44,9 @@ type Descriptor struct {
|
||||
//
|
||||
// This should only be used when referring to a manifest.
|
||||
Platform *Platform `json:"platform,omitempty"`
|
||||
|
||||
// ArtifactType is the IANA media type of this artifact.
|
||||
ArtifactType string `json:"artifactType,omitempty"`
|
||||
}
|
||||
|
||||
// Platform describes the platform which the image in the manifest runs on.
|
||||
|
5
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
generated
vendored
5
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Linux Foundation
|
||||
// Copyright 2016-2022 The Linux Foundation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -30,6 +30,9 @@ type Manifest struct {
|
||||
// Layers is an indexed list of layers referenced by the manifest.
|
||||
Layers []Descriptor `json:"layers"`
|
||||
|
||||
// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
|
||||
Subject *Descriptor `json:"subject,omitempty"`
|
||||
|
||||
// Annotations contains arbitrary metadata for the image manifest.
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
}
|
||||
|
3
vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
generated
vendored
3
vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
generated
vendored
@ -54,4 +54,7 @@ const (
|
||||
|
||||
// MediaTypeImageConfig specifies the media type for the image configuration.
|
||||
MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json"
|
||||
|
||||
// MediaTypeArtifactManifest specifies the media type for a content descriptor.
|
||||
MediaTypeArtifactManifest = "application/vnd.oci.artifact.manifest.v1+json"
|
||||
)
|
||||
|
4
vendor/github.com/opencontainers/image-spec/specs-go/version.go
generated
vendored
4
vendor/github.com/opencontainers/image-spec/specs-go/version.go
generated
vendored
@ -20,9 +20,9 @@ const (
|
||||
// VersionMajor is for an API incompatible changes
|
||||
VersionMajor = 1
|
||||
// VersionMinor is for functionality in a backwards-compatible manner
|
||||
VersionMinor = 0
|
||||
VersionMinor = 1
|
||||
// VersionPatch is for backwards-compatible bug fixes
|
||||
VersionPatch = 2
|
||||
VersionPatch = 0
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = "-dev"
|
||||
|
Reference in New Issue
Block a user