vendor: update buildkit to 41c29fffe299
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
+40
-31
@@ -1,19 +1,19 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/api/services/control/control.proto
|
||||
|
||||
package moby_buildkit_v1
|
||||
|
||||
import (
|
||||
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
types "github.com/moby/buildkit/api/types"
|
||||
pb "github.com/moby/buildkit/solver/pb"
|
||||
pb1 "github.com/moby/buildkit/sourcepolicy/pb"
|
||||
status "google.golang.org/genproto/googleapis/rpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
@@ -262,14 +262,14 @@ type UsageRecord struct {
|
||||
InUse bool `protobuf:"varint,3,opt,name=InUse,proto3" json:"InUse,omitempty"`
|
||||
Size int64 `protobuf:"varint,4,opt,name=Size,proto3" json:"Size,omitempty"`
|
||||
// Deprecated: Marked as deprecated in github.com/moby/buildkit/api/services/control/control.proto.
|
||||
Parent string `protobuf:"bytes,5,opt,name=Parent,proto3" json:"Parent,omitempty"`
|
||||
CreatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
|
||||
LastUsedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=LastUsedAt,proto3" json:"LastUsedAt,omitempty"`
|
||||
UsageCount int64 `protobuf:"varint,8,opt,name=UsageCount,proto3" json:"UsageCount,omitempty"`
|
||||
Description string `protobuf:"bytes,9,opt,name=Description,proto3" json:"Description,omitempty"`
|
||||
RecordType string `protobuf:"bytes,10,opt,name=RecordType,proto3" json:"RecordType,omitempty"`
|
||||
Shared bool `protobuf:"varint,11,opt,name=Shared,proto3" json:"Shared,omitempty"`
|
||||
Parents []string `protobuf:"bytes,12,rep,name=Parents,proto3" json:"Parents,omitempty"`
|
||||
Parent string `protobuf:"bytes,5,opt,name=Parent,proto3" json:"Parent,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
|
||||
LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=LastUsedAt,proto3" json:"LastUsedAt,omitempty"`
|
||||
UsageCount int64 `protobuf:"varint,8,opt,name=UsageCount,proto3" json:"UsageCount,omitempty"`
|
||||
Description string `protobuf:"bytes,9,opt,name=Description,proto3" json:"Description,omitempty"`
|
||||
RecordType string `protobuf:"bytes,10,opt,name=RecordType,proto3" json:"RecordType,omitempty"`
|
||||
Shared bool `protobuf:"varint,11,opt,name=Shared,proto3" json:"Shared,omitempty"`
|
||||
Parents []string `protobuf:"bytes,12,rep,name=Parents,proto3" json:"Parents,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -340,14 +340,14 @@ func (x *UsageRecord) GetParent() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UsageRecord) GetCreatedAt() *timestamp.Timestamp {
|
||||
func (x *UsageRecord) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UsageRecord) GetLastUsedAt() *timestamp.Timestamp {
|
||||
func (x *UsageRecord) GetLastUsedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastUsedAt
|
||||
}
|
||||
@@ -410,6 +410,7 @@ type SolveRequest struct {
|
||||
EnableSessionExporter bool `protobuf:"varint,14,opt,name=EnableSessionExporter,proto3" json:"EnableSessionExporter,omitempty"`
|
||||
SourcePolicySession string `protobuf:"bytes,15,opt,name=SourcePolicySession,proto3" json:"SourcePolicySession,omitempty"`
|
||||
CompatibilityVersion int64 `protobuf:"varint,16,opt,name=CompatibilityVersion,proto3" json:"CompatibilityVersion,omitempty"`
|
||||
ProxyNetwork bool `protobuf:"varint,17,opt,name=ProxyNetwork,proto3" json:"ProxyNetwork,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -556,6 +557,13 @@ func (x *SolveRequest) GetCompatibilityVersion() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SolveRequest) GetProxyNetwork() bool {
|
||||
if x != nil {
|
||||
return x.ProxyNetwork
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type CacheOptions struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// ExportRefDeprecated is deprecated in favor or the new Exports since BuildKit v0.4.0.
|
||||
@@ -861,8 +869,8 @@ type Vertex struct {
|
||||
Inputs []string `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Cached bool `protobuf:"varint,4,opt,name=cached,proto3" json:"cached,omitempty"`
|
||||
Started *timestamp.Timestamp `protobuf:"bytes,5,opt,name=started,proto3" json:"started,omitempty"`
|
||||
Completed *timestamp.Timestamp `protobuf:"bytes,6,opt,name=completed,proto3" json:"completed,omitempty"`
|
||||
Started *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started,proto3" json:"started,omitempty"`
|
||||
Completed *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=completed,proto3" json:"completed,omitempty"`
|
||||
Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` // typed errors?
|
||||
ProgressGroup *pb.ProgressGroup `protobuf:"bytes,8,opt,name=progressGroup,proto3" json:"progressGroup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -927,14 +935,14 @@ func (x *Vertex) GetCached() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Vertex) GetStarted() *timestamp.Timestamp {
|
||||
func (x *Vertex) GetStarted() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Started
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Vertex) GetCompleted() *timestamp.Timestamp {
|
||||
func (x *Vertex) GetCompleted() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Completed
|
||||
}
|
||||
@@ -962,9 +970,9 @@ type VertexStatus struct {
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Current int64 `protobuf:"varint,4,opt,name=current,proto3" json:"current,omitempty"`
|
||||
Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Timestamp *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Started *timestamp.Timestamp `protobuf:"bytes,7,opt,name=started,proto3" json:"started,omitempty"`
|
||||
Completed *timestamp.Timestamp `protobuf:"bytes,8,opt,name=completed,proto3" json:"completed,omitempty"`
|
||||
Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Started *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=started,proto3" json:"started,omitempty"`
|
||||
Completed *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=completed,proto3" json:"completed,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -1034,21 +1042,21 @@ func (x *VertexStatus) GetTotal() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *VertexStatus) GetTimestamp() *timestamp.Timestamp {
|
||||
func (x *VertexStatus) GetTimestamp() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *VertexStatus) GetStarted() *timestamp.Timestamp {
|
||||
func (x *VertexStatus) GetStarted() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Started
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *VertexStatus) GetCompleted() *timestamp.Timestamp {
|
||||
func (x *VertexStatus) GetCompleted() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Completed
|
||||
}
|
||||
@@ -1058,7 +1066,7 @@ func (x *VertexStatus) GetCompleted() *timestamp.Timestamp {
|
||||
type VertexLog struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Vertex string `protobuf:"bytes,1,opt,name=vertex,proto3" json:"vertex,omitempty"`
|
||||
Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Stream int64 `protobuf:"varint,3,opt,name=stream,proto3" json:"stream,omitempty"`
|
||||
Msg []byte `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -1102,7 +1110,7 @@ func (x *VertexLog) GetVertex() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *VertexLog) GetTimestamp() *timestamp.Timestamp {
|
||||
func (x *VertexLog) GetTimestamp() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
@@ -1562,8 +1570,8 @@ type BuildHistoryRecord struct {
|
||||
FrontendAttrs map[string]string `protobuf:"bytes,3,rep,name=FrontendAttrs,proto3" json:"FrontendAttrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
Exporters []*Exporter `protobuf:"bytes,4,rep,name=Exporters,proto3" json:"Exporters,omitempty"`
|
||||
Error *status.Status `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
|
||||
CreatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
|
||||
CompletedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=CompletedAt,proto3" json:"CompletedAt,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
|
||||
CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=CompletedAt,proto3" json:"CompletedAt,omitempty"`
|
||||
Logs *Descriptor `protobuf:"bytes,8,opt,name=logs,proto3" json:"logs,omitempty"`
|
||||
ExporterResponse map[string]string `protobuf:"bytes,9,rep,name=ExporterResponse,proto3" json:"ExporterResponse,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
Result *BuildResultInfo `protobuf:"bytes,10,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
@@ -1645,14 +1653,14 @@ func (x *BuildHistoryRecord) GetError() *status.Status {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BuildHistoryRecord) GetCreatedAt() *timestamp.Timestamp {
|
||||
func (x *BuildHistoryRecord) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BuildHistoryRecord) GetCompletedAt() *timestamp.Timestamp {
|
||||
func (x *BuildHistoryRecord) GetCompletedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CompletedAt
|
||||
}
|
||||
@@ -2066,7 +2074,7 @@ const file_github_com_moby_buildkit_api_services_control_control_proto_rawDesc =
|
||||
" \x01(\tR\n" +
|
||||
"RecordType\x12\x16\n" +
|
||||
"\x06Shared\x18\v \x01(\bR\x06Shared\x12\x18\n" +
|
||||
"\aParents\x18\f \x03(\tR\aParents\"\xda\b\n" +
|
||||
"\aParents\x18\f \x03(\tR\aParents\"\xfe\b\n" +
|
||||
"\fSolveRequest\x12\x10\n" +
|
||||
"\x03Ref\x18\x01 \x01(\tR\x03Ref\x12.\n" +
|
||||
"\n" +
|
||||
@@ -2086,7 +2094,8 @@ const file_github_com_moby_buildkit_api_services_control_control_proto_rawDesc =
|
||||
"\tExporters\x18\r \x03(\v2\x1a.moby.buildkit.v1.ExporterR\tExporters\x124\n" +
|
||||
"\x15EnableSessionExporter\x18\x0e \x01(\bR\x15EnableSessionExporter\x120\n" +
|
||||
"\x13SourcePolicySession\x18\x0f \x01(\tR\x13SourcePolicySession\x122\n" +
|
||||
"\x14CompatibilityVersion\x18\x10 \x01(\x03R\x14CompatibilityVersion\x1aJ\n" +
|
||||
"\x14CompatibilityVersion\x18\x10 \x01(\x03R\x14CompatibilityVersion\x12\"\n" +
|
||||
"\fProxyNetwork\x18\x11 \x01(\bR\fProxyNetwork\x1aJ\n" +
|
||||
"\x1cExporterAttrsDeprecatedEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a@\n" +
|
||||
@@ -2307,7 +2316,7 @@ var file_github_com_moby_buildkit_api_services_control_control_proto_goTypes = [
|
||||
nil, // 37: moby.buildkit.v1.Descriptor.AnnotationsEntry
|
||||
nil, // 38: moby.buildkit.v1.BuildResultInfo.ResultsEntry
|
||||
nil, // 39: moby.buildkit.v1.Exporter.AttrsEntry
|
||||
(*timestamp.Timestamp)(nil), // 40: google.protobuf.Timestamp
|
||||
(*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
|
||||
(*pb.Definition)(nil), // 41: pb.Definition
|
||||
(*pb1.Policy)(nil), // 42: moby.buildkit.v1.sourcepolicy.Policy
|
||||
(*pb.ProgressGroup)(nil), // 43: pb.ProgressGroup
|
||||
|
||||
+1
@@ -78,6 +78,7 @@ message SolveRequest {
|
||||
bool EnableSessionExporter = 14;
|
||||
string SourcePolicySession = 15;
|
||||
int64 CompatibilityVersion = 16;
|
||||
bool ProxyNetwork = 17;
|
||||
}
|
||||
|
||||
message CacheOptions {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/api/services/control/control.proto
|
||||
|
||||
package moby_buildkit_v1
|
||||
|
||||
+101
-62
@@ -6,15 +6,15 @@ package moby_buildkit_v1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
types "github.com/moby/buildkit/api/types"
|
||||
pb "github.com/moby/buildkit/solver/pb"
|
||||
pb1 "github.com/moby/buildkit/sourcepolicy/pb"
|
||||
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
|
||||
timestamppb "github.com/planetscale/vtprotobuf/types/known/timestamppb"
|
||||
timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb"
|
||||
status "google.golang.org/genproto/googleapis/rpc/status"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
io "io"
|
||||
)
|
||||
|
||||
@@ -106,8 +106,8 @@ func (m *UsageRecord) CloneVT() *UsageRecord {
|
||||
r.InUse = m.InUse
|
||||
r.Size = m.Size
|
||||
r.Parent = m.Parent
|
||||
r.CreatedAt = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.CreatedAt).CloneVT())
|
||||
r.LastUsedAt = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.LastUsedAt).CloneVT())
|
||||
r.CreatedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CreatedAt).CloneVT())
|
||||
r.LastUsedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.LastUsedAt).CloneVT())
|
||||
r.UsageCount = m.UsageCount
|
||||
r.Description = m.Description
|
||||
r.RecordType = m.RecordType
|
||||
@@ -144,6 +144,7 @@ func (m *SolveRequest) CloneVT() *SolveRequest {
|
||||
r.EnableSessionExporter = m.EnableSessionExporter
|
||||
r.SourcePolicySession = m.SourcePolicySession
|
||||
r.CompatibilityVersion = m.CompatibilityVersion
|
||||
r.ProxyNetwork = m.ProxyNetwork
|
||||
if rhs := m.ExporterAttrsDeprecated; rhs != nil {
|
||||
tmpContainer := make(map[string]string, len(rhs))
|
||||
for k, v := range rhs {
|
||||
@@ -347,8 +348,8 @@ func (m *Vertex) CloneVT() *Vertex {
|
||||
r.Digest = m.Digest
|
||||
r.Name = m.Name
|
||||
r.Cached = m.Cached
|
||||
r.Started = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.Started).CloneVT())
|
||||
r.Completed = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.Completed).CloneVT())
|
||||
r.Started = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Started).CloneVT())
|
||||
r.Completed = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Completed).CloneVT())
|
||||
r.Error = m.Error
|
||||
r.ProgressGroup = m.ProgressGroup.CloneVT()
|
||||
if rhs := m.Inputs; rhs != nil {
|
||||
@@ -377,9 +378,9 @@ func (m *VertexStatus) CloneVT() *VertexStatus {
|
||||
r.Name = m.Name
|
||||
r.Current = m.Current
|
||||
r.Total = m.Total
|
||||
r.Timestamp = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.Timestamp).CloneVT())
|
||||
r.Started = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.Started).CloneVT())
|
||||
r.Completed = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.Completed).CloneVT())
|
||||
r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT())
|
||||
r.Started = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Started).CloneVT())
|
||||
r.Completed = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Completed).CloneVT())
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
copy(r.unknownFields, m.unknownFields)
|
||||
@@ -397,7 +398,7 @@ func (m *VertexLog) CloneVT() *VertexLog {
|
||||
}
|
||||
r := new(VertexLog)
|
||||
r.Vertex = m.Vertex
|
||||
r.Timestamp = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.Timestamp).CloneVT())
|
||||
r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT())
|
||||
r.Stream = m.Stream
|
||||
if rhs := m.Msg; rhs != nil {
|
||||
tmpBytes := make([]byte, len(rhs))
|
||||
@@ -604,8 +605,8 @@ func (m *BuildHistoryRecord) CloneVT() *BuildHistoryRecord {
|
||||
r := new(BuildHistoryRecord)
|
||||
r.Ref = m.Ref
|
||||
r.Frontend = m.Frontend
|
||||
r.CreatedAt = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.CreatedAt).CloneVT())
|
||||
r.CompletedAt = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.CompletedAt).CloneVT())
|
||||
r.CreatedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CreatedAt).CloneVT())
|
||||
r.CompletedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CompletedAt).CloneVT())
|
||||
r.Logs = m.Logs.CloneVT()
|
||||
r.Result = m.Result.CloneVT()
|
||||
r.Generation = m.Generation
|
||||
@@ -901,10 +902,10 @@ func (this *UsageRecord) EqualVT(that *UsageRecord) bool {
|
||||
if this.Parent != that.Parent {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.CreatedAt).EqualVT((*timestamppb.Timestamp)(that.CreatedAt)) {
|
||||
if !(*timestamppb1.Timestamp)(this.CreatedAt).EqualVT((*timestamppb1.Timestamp)(that.CreatedAt)) {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.LastUsedAt).EqualVT((*timestamppb.Timestamp)(that.LastUsedAt)) {
|
||||
if !(*timestamppb1.Timestamp)(this.LastUsedAt).EqualVT((*timestamppb1.Timestamp)(that.LastUsedAt)) {
|
||||
return false
|
||||
}
|
||||
if this.UsageCount != that.UsageCount {
|
||||
@@ -1047,6 +1048,9 @@ func (this *SolveRequest) EqualVT(that *SolveRequest) bool {
|
||||
if this.CompatibilityVersion != that.CompatibilityVersion {
|
||||
return false
|
||||
}
|
||||
if this.ProxyNetwork != that.ProxyNetwork {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
@@ -1317,10 +1321,10 @@ func (this *Vertex) EqualVT(that *Vertex) bool {
|
||||
if this.Cached != that.Cached {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.Started).EqualVT((*timestamppb.Timestamp)(that.Started)) {
|
||||
if !(*timestamppb1.Timestamp)(this.Started).EqualVT((*timestamppb1.Timestamp)(that.Started)) {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.Completed).EqualVT((*timestamppb.Timestamp)(that.Completed)) {
|
||||
if !(*timestamppb1.Timestamp)(this.Completed).EqualVT((*timestamppb1.Timestamp)(that.Completed)) {
|
||||
return false
|
||||
}
|
||||
if this.Error != that.Error {
|
||||
@@ -1360,13 +1364,13 @@ func (this *VertexStatus) EqualVT(that *VertexStatus) bool {
|
||||
if this.Total != that.Total {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.Timestamp).EqualVT((*timestamppb.Timestamp)(that.Timestamp)) {
|
||||
if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.Started).EqualVT((*timestamppb.Timestamp)(that.Started)) {
|
||||
if !(*timestamppb1.Timestamp)(this.Started).EqualVT((*timestamppb1.Timestamp)(that.Started)) {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.Completed).EqualVT((*timestamppb.Timestamp)(that.Completed)) {
|
||||
if !(*timestamppb1.Timestamp)(this.Completed).EqualVT((*timestamppb1.Timestamp)(that.Completed)) {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
@@ -1388,7 +1392,7 @@ func (this *VertexLog) EqualVT(that *VertexLog) bool {
|
||||
if this.Vertex != that.Vertex {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.Timestamp).EqualVT((*timestamppb.Timestamp)(that.Timestamp)) {
|
||||
if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) {
|
||||
return false
|
||||
}
|
||||
if this.Stream != that.Stream {
|
||||
@@ -1683,10 +1687,10 @@ func (this *BuildHistoryRecord) EqualVT(that *BuildHistoryRecord) bool {
|
||||
} else if !proto.Equal(this.Error, that.Error) {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.CreatedAt).EqualVT((*timestamppb.Timestamp)(that.CreatedAt)) {
|
||||
if !(*timestamppb1.Timestamp)(this.CreatedAt).EqualVT((*timestamppb1.Timestamp)(that.CreatedAt)) {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.CompletedAt).EqualVT((*timestamppb.Timestamp)(that.CompletedAt)) {
|
||||
if !(*timestamppb1.Timestamp)(this.CompletedAt).EqualVT((*timestamppb1.Timestamp)(that.CompletedAt)) {
|
||||
return false
|
||||
}
|
||||
if !this.Logs.EqualVT(that.Logs) {
|
||||
@@ -2162,7 +2166,7 @@ func (m *UsageRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x40
|
||||
}
|
||||
if m.LastUsedAt != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.LastUsedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.LastUsedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2172,7 +2176,7 @@ func (m *UsageRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.CreatedAt != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.CreatedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.CreatedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2253,6 +2257,18 @@ func (m *SolveRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if m.ProxyNetwork {
|
||||
i--
|
||||
if m.ProxyNetwork {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0x88
|
||||
}
|
||||
if m.CompatibilityVersion != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CompatibilityVersion))
|
||||
i--
|
||||
@@ -2801,7 +2817,7 @@ func (m *Vertex) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.Completed != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.Completed).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.Completed).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2811,7 +2827,7 @@ func (m *Vertex) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if m.Started != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.Started).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.Started).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2887,7 +2903,7 @@ func (m *VertexStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if m.Completed != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.Completed).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.Completed).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2897,7 +2913,7 @@ func (m *VertexStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
if m.Started != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.Started).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.Started).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2907,7 +2923,7 @@ func (m *VertexStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.Timestamp != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -2993,7 +3009,7 @@ func (m *VertexLog) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.Timestamp != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -3582,7 +3598,7 @@ func (m *BuildHistoryRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
if m.CompletedAt != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.CompletedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.CompletedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -3592,7 +3608,7 @@ func (m *BuildHistoryRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.CreatedAt != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.CreatedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.CreatedAt).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -4069,11 +4085,11 @@ func (m *UsageRecord) SizeVT() (n int) {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.CreatedAt != nil {
|
||||
l = (*timestamppb.Timestamp)(m.CreatedAt).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.CreatedAt).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.LastUsedAt != nil {
|
||||
l = (*timestamppb.Timestamp)(m.LastUsedAt).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.LastUsedAt).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.UsageCount != 0 {
|
||||
@@ -4188,6 +4204,9 @@ func (m *SolveRequest) SizeVT() (n int) {
|
||||
if m.CompatibilityVersion != 0 {
|
||||
n += 2 + protohelpers.SizeOfVarint(uint64(m.CompatibilityVersion))
|
||||
}
|
||||
if m.ProxyNetwork {
|
||||
n += 3
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
@@ -4344,11 +4363,11 @@ func (m *Vertex) SizeVT() (n int) {
|
||||
n += 2
|
||||
}
|
||||
if m.Started != nil {
|
||||
l = (*timestamppb.Timestamp)(m.Started).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.Started).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.Completed != nil {
|
||||
l = (*timestamppb.Timestamp)(m.Completed).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.Completed).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.Error)
|
||||
@@ -4388,15 +4407,15 @@ func (m *VertexStatus) SizeVT() (n int) {
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(m.Total))
|
||||
}
|
||||
if m.Timestamp != nil {
|
||||
l = (*timestamppb.Timestamp)(m.Timestamp).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.Started != nil {
|
||||
l = (*timestamppb.Timestamp)(m.Started).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.Started).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.Completed != nil {
|
||||
l = (*timestamppb.Timestamp)(m.Completed).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.Completed).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
@@ -4414,7 +4433,7 @@ func (m *VertexLog) SizeVT() (n int) {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.Timestamp != nil {
|
||||
l = (*timestamppb.Timestamp)(m.Timestamp).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.Stream != 0 {
|
||||
@@ -4624,11 +4643,11 @@ func (m *BuildHistoryRecord) SizeVT() (n int) {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.CreatedAt != nil {
|
||||
l = (*timestamppb.Timestamp)(m.CreatedAt).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.CreatedAt).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.CompletedAt != nil {
|
||||
l = (*timestamppb.Timestamp)(m.CompletedAt).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.CompletedAt).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.Logs != nil {
|
||||
@@ -5355,9 +5374,9 @@ func (m *UsageRecord) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.CreatedAt == nil {
|
||||
m.CreatedAt = ×tamp.Timestamp{}
|
||||
m.CreatedAt = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.CreatedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.CreatedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -5391,9 +5410,9 @@ func (m *UsageRecord) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.LastUsedAt == nil {
|
||||
m.LastUsedAt = ×tamp.Timestamp{}
|
||||
m.LastUsedAt = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.LastUsedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.LastUsedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -6359,6 +6378,26 @@ func (m *SolveRequest) UnmarshalVT(dAtA []byte) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 17:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProxyNetwork", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.ProxyNetwork = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
@@ -7524,9 +7563,9 @@ func (m *Vertex) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Started == nil {
|
||||
m.Started = ×tamp.Timestamp{}
|
||||
m.Started = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.Started).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.Started).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -7560,9 +7599,9 @@ func (m *Vertex) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Completed == nil {
|
||||
m.Completed = ×tamp.Timestamp{}
|
||||
m.Completed = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.Completed).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.Completed).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -7849,9 +7888,9 @@ func (m *VertexStatus) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Timestamp == nil {
|
||||
m.Timestamp = ×tamp.Timestamp{}
|
||||
m.Timestamp = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -7885,9 +7924,9 @@ func (m *VertexStatus) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Started == nil {
|
||||
m.Started = ×tamp.Timestamp{}
|
||||
m.Started = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.Started).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.Started).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -7921,9 +7960,9 @@ func (m *VertexStatus) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Completed == nil {
|
||||
m.Completed = ×tamp.Timestamp{}
|
||||
m.Completed = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.Completed).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.Completed).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -8040,9 +8079,9 @@ func (m *VertexLog) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Timestamp == nil {
|
||||
m.Timestamp = ×tamp.Timestamp{}
|
||||
m.Timestamp = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -9390,9 +9429,9 @@ func (m *BuildHistoryRecord) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.CreatedAt == nil {
|
||||
m.CreatedAt = ×tamp.Timestamp{}
|
||||
m.CreatedAt = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.CreatedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.CreatedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -9426,9 +9465,9 @@ func (m *BuildHistoryRecord) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.CompletedAt == nil {
|
||||
m.CompletedAt = ×tamp.Timestamp{}
|
||||
m.CompletedAt = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.CompletedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.CompletedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/api/types/worker.proto
|
||||
|
||||
package moby_buildkit_v1_types
|
||||
|
||||
+4
@@ -255,6 +255,10 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
|
||||
meta.Ulimit = ul
|
||||
}
|
||||
|
||||
if e.constraints.Metadata.LinuxResources != nil {
|
||||
addCap(&e.constraints, pb.CapExecMetaLinuxResources)
|
||||
}
|
||||
|
||||
network, err := getNetwork(e.base)(ctx, c)
|
||||
if err != nil {
|
||||
return "", nil, nil, nil, err
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ func NewFileOp(s State, action *FileAction, c Constraints) *FileOp {
|
||||
}
|
||||
|
||||
// CopyInput is either llb.State or *FileActionWithState
|
||||
// It is used by [Copy] to to specify the source of the copy operation.
|
||||
// It is used by [Copy] to specify the source of the copy operation.
|
||||
type CopyInput interface {
|
||||
isFileOpCopyInput()
|
||||
}
|
||||
|
||||
+11
@@ -324,6 +324,17 @@ func getCgroupParent(s State) func(context.Context, *Constraints) (string, error
|
||||
}
|
||||
}
|
||||
|
||||
// LinuxResources holds CPU and memory resource limits for containers.
|
||||
type LinuxResources struct {
|
||||
Memory int64
|
||||
MemorySwap int64
|
||||
CPUShares uint64
|
||||
CPUPeriod uint64
|
||||
CPUQuota int64
|
||||
CpusetCpus string
|
||||
CpusetMems string
|
||||
}
|
||||
|
||||
// Network returns a [StateOption] which sets the network mode used for containers created by [State.Run].
|
||||
// This is the equivalent of [State.Network]
|
||||
// See [State.With] for where to use this.
|
||||
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package llb
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/moby/buildkit/solver/pb"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type PassthroughInput struct {
|
||||
State State
|
||||
Output bool
|
||||
}
|
||||
|
||||
type PassthroughOp struct {
|
||||
cache MarshalCache
|
||||
id string
|
||||
inputs []Output
|
||||
outputs []Output
|
||||
outputMap []int
|
||||
constraints Constraints
|
||||
}
|
||||
|
||||
func NewPassthroughOp(id string, inputs []PassthroughInput, opts ...ConstraintsOpt) *PassthroughOp {
|
||||
var c Constraints
|
||||
for _, o := range opts {
|
||||
o.SetConstraintsOption(&c)
|
||||
}
|
||||
addCap(&c, pb.CapPassthroughOp)
|
||||
|
||||
op := &PassthroughOp{id: id, constraints: c}
|
||||
for _, input := range inputs {
|
||||
out := input.State.Output()
|
||||
if out == nil {
|
||||
continue
|
||||
}
|
||||
inputIndex := len(op.inputs)
|
||||
op.inputs = append(op.inputs, out)
|
||||
if input.Output {
|
||||
outputIndex := len(op.outputMap)
|
||||
op.outputMap = append(op.outputMap, inputIndex)
|
||||
op.outputs = append(op.outputs, &output{vertex: op, getIndex: func() (pb.OutputIndex, error) {
|
||||
return pb.OutputIndex(outputIndex), nil
|
||||
}})
|
||||
}
|
||||
}
|
||||
return op
|
||||
}
|
||||
|
||||
func NewPassthrough(id string, inputs []PassthroughInput, opts ...ConstraintsOpt) State {
|
||||
op := NewPassthroughOp(id, inputs, opts...)
|
||||
return NewState(op.Output())
|
||||
}
|
||||
|
||||
func (p *PassthroughOp) Validate(context.Context, *Constraints) error {
|
||||
if len(p.inputs) == 0 {
|
||||
return errors.Errorf("passthrough must have at least one input")
|
||||
}
|
||||
if p.id == "" {
|
||||
return errors.Errorf("passthrough requires an id")
|
||||
}
|
||||
if len(p.outputMap) == 0 {
|
||||
return errors.Errorf("passthrough must have at least one output")
|
||||
}
|
||||
for _, input := range p.outputMap {
|
||||
if input < 0 || input >= len(p.inputs) {
|
||||
return errors.Errorf("passthrough output references invalid input %d", input)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *PassthroughOp) Marshal(ctx context.Context, constraints *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) {
|
||||
cache := p.cache.Acquire()
|
||||
defer cache.Release()
|
||||
|
||||
if dgst, dt, md, srcs, err := cache.Load(constraints); err == nil {
|
||||
return dgst, dt, md, srcs, nil
|
||||
}
|
||||
|
||||
if err := p.Validate(ctx, constraints); err != nil {
|
||||
return "", nil, nil, nil, err
|
||||
}
|
||||
|
||||
pop, md := MarshalConstraints(constraints, &p.constraints)
|
||||
pop.Platform = nil
|
||||
|
||||
op := &pb.PassthroughOp{Id: p.id}
|
||||
for _, input := range p.inputs {
|
||||
pbInput, err := input.ToInput(ctx, constraints)
|
||||
if err != nil {
|
||||
return "", nil, nil, nil, err
|
||||
}
|
||||
pop.Inputs = append(pop.Inputs, pbInput)
|
||||
}
|
||||
for _, input := range p.outputMap {
|
||||
op.Outputs = append(op.Outputs, int64(input))
|
||||
}
|
||||
pop.Op = &pb.Op_Passthrough{Passthrough: op}
|
||||
|
||||
dt, err := deterministicMarshal(pop)
|
||||
if err != nil {
|
||||
return "", nil, nil, nil, err
|
||||
}
|
||||
|
||||
return cache.Store(dt, md, p.constraints.SourceLocations, constraints)
|
||||
}
|
||||
|
||||
func (p *PassthroughOp) Output() Output {
|
||||
return p.OutputAt(0)
|
||||
}
|
||||
|
||||
func (p *PassthroughOp) OutputAt(index int) Output {
|
||||
if index < 0 || index >= len(p.outputs) {
|
||||
return &output{vertex: p, err: errors.Errorf("invalid passthrough output %d", index)}
|
||||
}
|
||||
return p.outputs[index]
|
||||
}
|
||||
|
||||
func (p *PassthroughOp) Inputs() []Output {
|
||||
return p.inputs
|
||||
}
|
||||
+94
-10
@@ -385,6 +385,18 @@ func (s State) Reset(s2 State) State {
|
||||
return Reset(s2)(s)
|
||||
}
|
||||
|
||||
func (s State) Requires(id string, deps ...State) State {
|
||||
if len(deps) == 0 {
|
||||
return s
|
||||
}
|
||||
inputs := make([]PassthroughInput, 0, len(deps)+1)
|
||||
inputs = append(inputs, PassthroughInput{State: s, Output: true})
|
||||
for _, dep := range deps {
|
||||
inputs = append(inputs, PassthroughInput{State: dep})
|
||||
}
|
||||
return s.WithOutput(NewPassthroughOp(id, inputs).Output())
|
||||
}
|
||||
|
||||
// User sets the user for this state.
|
||||
// See [User] for more details.
|
||||
func (s State) User(v string) State {
|
||||
@@ -591,6 +603,10 @@ func mergeMetadata(m1, m2 OpMetadata) OpMetadata {
|
||||
m1.ProgressGroup = m2.ProgressGroup
|
||||
}
|
||||
|
||||
if m2.LinuxResources != nil {
|
||||
m1.LinuxResources = m2.LinuxResources
|
||||
}
|
||||
|
||||
return m1
|
||||
}
|
||||
|
||||
@@ -668,11 +684,12 @@ type Constraints struct {
|
||||
|
||||
// OpMetadata has a more friendly interface for pb.OpMetadata.
|
||||
type OpMetadata struct {
|
||||
IgnoreCache bool `json:"ignore_cache,omitempty"`
|
||||
Description map[string]string `json:"description,omitempty"`
|
||||
ExportCache *pb.ExportCache `json:"export_cache,omitempty"`
|
||||
Caps map[apicaps.CapID]bool `json:"caps,omitempty"`
|
||||
ProgressGroup *pb.ProgressGroup `json:"progress_group,omitempty"`
|
||||
IgnoreCache bool `json:"ignore_cache,omitempty"`
|
||||
Description map[string]string `json:"description,omitempty"`
|
||||
ExportCache *pb.ExportCache `json:"export_cache,omitempty"`
|
||||
Caps map[apicaps.CapID]bool `json:"caps,omitempty"`
|
||||
ProgressGroup *pb.ProgressGroup `json:"progress_group,omitempty"`
|
||||
LinuxResources *pb.LinuxResources `json:"linux_resources,omitempty"`
|
||||
}
|
||||
|
||||
func NewOpMetadata(mpb *pb.OpMetadata) OpMetadata {
|
||||
@@ -687,11 +704,12 @@ func (m OpMetadata) ToPB() *pb.OpMetadata {
|
||||
caps[string(k)] = v
|
||||
}
|
||||
return &pb.OpMetadata{
|
||||
IgnoreCache: m.IgnoreCache,
|
||||
Description: m.Description,
|
||||
ExportCache: m.ExportCache,
|
||||
Caps: caps,
|
||||
ProgressGroup: m.ProgressGroup,
|
||||
IgnoreCache: m.IgnoreCache,
|
||||
Description: m.Description,
|
||||
ExportCache: m.ExportCache,
|
||||
Caps: caps,
|
||||
ProgressGroup: m.ProgressGroup,
|
||||
LinuxResources: m.LinuxResources,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,6 +730,7 @@ func (m *OpMetadata) FromPB(mpb *pb.OpMetadata) {
|
||||
m.Caps = nil
|
||||
}
|
||||
m.ProgressGroup = mpb.ProgressGroup
|
||||
m.LinuxResources = mpb.LinuxResources
|
||||
}
|
||||
|
||||
func Platform(p ocispecs.Platform) ConstraintsOpt {
|
||||
@@ -732,6 +751,71 @@ func ProgressGroup(id, name string, weak bool) ConstraintsOpt {
|
||||
})
|
||||
}
|
||||
|
||||
// WithLinuxResources sets all CPU/memory resource limits at once.
|
||||
// Resource limits are applied via OpMetadata and do not affect the cache key.
|
||||
func WithLinuxResources(res LinuxResources) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
c.Metadata.LinuxResources = &pb.LinuxResources{
|
||||
Memory: res.Memory,
|
||||
MemorySwap: res.MemorySwap,
|
||||
CpuShares: res.CPUShares,
|
||||
CpuPeriod: res.CPUPeriod,
|
||||
CpuQuota: res.CPUQuota,
|
||||
CpusetCpus: res.CpusetCpus,
|
||||
CpusetMems: res.CpusetMems,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func ensureLinuxResources(c *Constraints) *pb.LinuxResources {
|
||||
if c.Metadata.LinuxResources == nil {
|
||||
c.Metadata.LinuxResources = &pb.LinuxResources{}
|
||||
}
|
||||
return c.Metadata.LinuxResources
|
||||
}
|
||||
|
||||
func MemoryLimit(limit int64) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).Memory = limit
|
||||
})
|
||||
}
|
||||
|
||||
func MemorySwapLimit(limit int64) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).MemorySwap = limit
|
||||
})
|
||||
}
|
||||
|
||||
func CPUShares(shares uint64) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).CpuShares = shares
|
||||
})
|
||||
}
|
||||
|
||||
func CPUPeriod(period uint64) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).CpuPeriod = period
|
||||
})
|
||||
}
|
||||
|
||||
func CPUQuota(quota int64) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).CpuQuota = quota
|
||||
})
|
||||
}
|
||||
|
||||
func CpusetCpus(cpus string) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).CpusetCpus = cpus
|
||||
})
|
||||
}
|
||||
|
||||
func CpusetMems(mems string) ConstraintsOpt {
|
||||
return constraintsOptFunc(func(c *Constraints) {
|
||||
ensureLinuxResources(c).CpusetMems = mems
|
||||
})
|
||||
}
|
||||
|
||||
var (
|
||||
LinuxAmd64 = Platform(ocispecs.Platform{OS: "linux", Architecture: "amd64"})
|
||||
LinuxArmhf = Platform(ocispecs.Platform{OS: "linux", Architecture: "arm", Variant: "v7"})
|
||||
|
||||
+69
@@ -8,10 +8,13 @@ import (
|
||||
"maps"
|
||||
"os"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd/v2/core/content"
|
||||
"github.com/containerd/containerd/v2/core/images"
|
||||
contentlocal "github.com/containerd/containerd/v2/plugins/content/local"
|
||||
controlapi "github.com/moby/buildkit/api/services/control"
|
||||
"github.com/moby/buildkit/client/llb"
|
||||
@@ -53,6 +56,7 @@ type SolveOpt struct {
|
||||
Internal bool
|
||||
SourcePolicy *spb.Policy
|
||||
SourcePolicyProvider session.Attachable
|
||||
ProxyNetwork bool
|
||||
Ref string
|
||||
}
|
||||
|
||||
@@ -309,6 +313,7 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
|
||||
Internal: opt.Internal,
|
||||
CompatibilityVersion: int64(opt.CompatibilityVersion),
|
||||
SourcePolicy: opt.SourcePolicy,
|
||||
ProxyNetwork: opt.ProxyNetwork,
|
||||
}
|
||||
if opt.SourcePolicyProvider != nil {
|
||||
sopt.SourcePolicySession = s.ID()
|
||||
@@ -417,9 +422,55 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reset cache stores that have reset=true — delete unreferenced blobs
|
||||
for _, ref := range cacheOpt.storesToReset {
|
||||
if err := resetCacheStore(ctx, ref.store, ref.path); err != nil {
|
||||
bklog.G(ctx).WithError(err).Warn("failed to reset cache store")
|
||||
}
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// resetCacheStore deletes all blobs not referenced by any manifest in
|
||||
// index.json. Referenced blobs are always preserved.
|
||||
func resetCacheStore(ctx context.Context, cs content.Store, storePath string) error {
|
||||
idx := ociindex.NewStoreIndex(storePath)
|
||||
index, err := idx.Read()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "reset: failed to read index.json")
|
||||
}
|
||||
|
||||
var mu sync.Mutex
|
||||
referenced := make(map[digest.Digest]struct{})
|
||||
childrenHandler := images.ChildrenHandler(cs)
|
||||
handler := images.HandlerFunc(func(ctx context.Context, desc ocispecs.Descriptor) ([]ocispecs.Descriptor, error) {
|
||||
mu.Lock()
|
||||
referenced[desc.Digest] = struct{}{}
|
||||
mu.Unlock()
|
||||
return childrenHandler(ctx, desc)
|
||||
})
|
||||
if err := images.Dispatch(ctx, handler, nil, index.Manifests...); err != nil {
|
||||
return errors.Wrap(err, "reset: failed to collect referenced blobs")
|
||||
}
|
||||
|
||||
var toDelete []digest.Digest
|
||||
if err := cs.Walk(ctx, func(info content.Info) error {
|
||||
if _, ok := referenced[info.Digest]; !ok {
|
||||
toDelete = append(toDelete, info.Digest)
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
return errors.Wrap(err, "reset: failed to walk content store")
|
||||
}
|
||||
|
||||
for _, dgst := range toDelete {
|
||||
if err := cs.Delete(ctx, dgst); err != nil {
|
||||
bklog.G(ctx).WithError(err).Warnf("reset: failed to delete blob %s", dgst)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func prepareSyncedFiles(def *llb.Definition, localMounts map[string]fsutil.FS) (filesync.StaticDirSource, error) {
|
||||
resetUIDAndGID := func(p string, st *fstypes.Stat) fsutil.MapResult {
|
||||
st.Uid = 0
|
||||
@@ -464,10 +515,16 @@ func prepareSyncedFiles(def *llb.Definition, localMounts map[string]fsutil.FS) (
|
||||
return result, nil
|
||||
}
|
||||
|
||||
type cacheStoreRef struct {
|
||||
path string
|
||||
store content.Store
|
||||
}
|
||||
|
||||
type cacheOptions struct {
|
||||
options controlapi.CacheOptions
|
||||
contentStores map[string]content.Store // key: ID of content store ("local:" + csDir)
|
||||
storesToUpdate map[string]string // key: path to content store, value: tag
|
||||
storesToReset []cacheStoreRef // cache stores with reset=true
|
||||
frontendAttrs map[string]string
|
||||
}
|
||||
|
||||
@@ -476,6 +533,7 @@ func parseCacheOptions(ctx context.Context, isGateway bool, opt SolveOpt) (*cach
|
||||
cacheExports []*controlapi.CacheOptionsEntry
|
||||
cacheImports []*controlapi.CacheOptionsEntry
|
||||
)
|
||||
var storesToReset []cacheStoreRef
|
||||
contentStores := make(map[string]content.Store)
|
||||
storesToUpdate := make(map[string]string)
|
||||
frontendAttrs := make(map[string]string)
|
||||
@@ -500,6 +558,16 @@ func parseCacheOptions(ctx context.Context, isGateway bool, opt SolveOpt) (*cach
|
||||
}
|
||||
// TODO(AkihiroSuda): support custom index JSON path and tag
|
||||
storesToUpdate[csDir] = tag
|
||||
|
||||
if v, ok := ex.Attrs["reset"]; ok {
|
||||
b, err := strconv.ParseBool(v)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to parse reset attribute")
|
||||
}
|
||||
if b {
|
||||
storesToReset = append(storesToReset, cacheStoreRef{path: csDir, store: cs})
|
||||
}
|
||||
}
|
||||
}
|
||||
if ex.Type == "registry" {
|
||||
regRef := ex.Attrs["ref"]
|
||||
@@ -579,6 +647,7 @@ func parseCacheOptions(ctx context.Context, isGateway bool, opt SolveOpt) (*cach
|
||||
},
|
||||
contentStores: contentStores,
|
||||
storesToUpdate: storesToUpdate,
|
||||
storesToReset: storesToReset,
|
||||
frontendAttrs: frontendAttrs,
|
||||
}
|
||||
return &res, nil
|
||||
|
||||
+7
@@ -19,6 +19,9 @@ type Config struct {
|
||||
// Entitlements e.g. security.insecure, network.host, device
|
||||
Entitlements []string `toml:"insecure-entitlements"`
|
||||
|
||||
// ProxyNetwork enables proxy network enforcement for all builds.
|
||||
ProxyNetwork bool `toml:"proxyNetwork"`
|
||||
|
||||
// LogFormat is the format of the logs. It can be "json" or "text".
|
||||
Log LogConfig `toml:"log"`
|
||||
|
||||
@@ -62,6 +65,10 @@ type SystemConfig struct {
|
||||
// PlatformCacheMaxAge controls how often supported platforms
|
||||
// are refreshed by rescanning the system.
|
||||
PlatformsCacheMaxAge *Duration `toml:"platformsCacheMaxAge"`
|
||||
|
||||
// MaxRegistryConcurrency sets the maximum number of concurrent
|
||||
// connections per registry.
|
||||
MaxRegistryConcurrency *int `toml:"maxRegistryConcurrency"`
|
||||
}
|
||||
|
||||
type LogConfig struct {
|
||||
|
||||
+1
@@ -51,6 +51,7 @@ var (
|
||||
OptKeyOCITypes ImageExporterOptKey = "oci-mediatypes"
|
||||
|
||||
// Use OCI artifact format for the attestation manifest.
|
||||
// Value: bool <true|false>
|
||||
OptKeyOCIArtifact ImageExporterOptKey = "oci-artifact"
|
||||
|
||||
// Force attestation to be attached.
|
||||
|
||||
+74
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/docker/go-units"
|
||||
"github.com/moby/buildkit/client/llb"
|
||||
"github.com/moby/buildkit/solver/pb"
|
||||
"github.com/moby/buildkit/util/cpuset"
|
||||
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tonistiigi/go-csvvalue"
|
||||
@@ -96,6 +97,79 @@ func parseUlimits(v string) ([]*pb.Ulimit, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func parseLinuxResources(opts map[string]string) (*pb.LinuxResources, error) {
|
||||
var res pb.LinuxResources
|
||||
|
||||
if v, ok := opts[keyMemory]; ok && v != "" {
|
||||
n, err := strconv.ParseInt(v, 10, 64)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyMemory, v)
|
||||
}
|
||||
if n <= 0 {
|
||||
return nil, errors.Errorf("invalid %s value: %s: must be > 0", keyMemory, v)
|
||||
}
|
||||
res.Memory = n
|
||||
}
|
||||
if v, ok := opts[keyMemorySwap]; ok && v != "" {
|
||||
n, err := strconv.ParseInt(v, 10, 64)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyMemorySwap, v)
|
||||
}
|
||||
if n < -1 || n == 0 {
|
||||
return nil, errors.Errorf("invalid %s value: %s: must be -1 (unlimited) or > 0", keyMemorySwap, v)
|
||||
}
|
||||
res.MemorySwap = n
|
||||
}
|
||||
if v, ok := opts[keyCPUShares]; ok && v != "" {
|
||||
n, err := strconv.ParseUint(v, 10, 64)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyCPUShares, v)
|
||||
}
|
||||
if n == 0 {
|
||||
return nil, errors.Errorf("invalid %s value: %s: must be > 0", keyCPUShares, v)
|
||||
}
|
||||
res.CpuShares = n
|
||||
}
|
||||
if v, ok := opts[keyCPUPeriod]; ok && v != "" {
|
||||
n, err := strconv.ParseUint(v, 10, 64)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyCPUPeriod, v)
|
||||
}
|
||||
if n == 0 {
|
||||
return nil, errors.Errorf("invalid %s value: %s: must be > 0", keyCPUPeriod, v)
|
||||
}
|
||||
res.CpuPeriod = n
|
||||
}
|
||||
if v, ok := opts[keyCPUQuota]; ok && v != "" {
|
||||
n, err := strconv.ParseInt(v, 10, 64)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyCPUQuota, v)
|
||||
}
|
||||
if n <= 0 {
|
||||
return nil, errors.Errorf("invalid %s value: %s: must be > 0", keyCPUQuota, v)
|
||||
}
|
||||
res.CpuQuota = n
|
||||
}
|
||||
if v, ok := opts[keyCpusetCpus]; ok && v != "" {
|
||||
if err := cpuset.Validate(v); err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyCpusetCpus, v)
|
||||
}
|
||||
res.CpusetCpus = v
|
||||
}
|
||||
if v, ok := opts[keyCpusetMems]; ok && v != "" {
|
||||
if err := cpuset.Validate(v); err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid %s value: %s", keyCpusetMems, v)
|
||||
}
|
||||
res.CpusetMems = v
|
||||
}
|
||||
|
||||
if res.Memory == 0 && res.MemorySwap == 0 && res.CpuShares == 0 &&
|
||||
res.CpuPeriod == 0 && res.CpuQuota == 0 && res.CpusetCpus == "" && res.CpusetMems == "" {
|
||||
return nil, nil
|
||||
}
|
||||
return &res, nil
|
||||
}
|
||||
|
||||
func parseNetMode(v string) (pb.NetMode, error) {
|
||||
if v == "" {
|
||||
return llb.NetModeSandbox, nil
|
||||
|
||||
+14
@@ -40,6 +40,13 @@ const (
|
||||
keyShmSize = "shm-size"
|
||||
keyTargetPlatform = "platform"
|
||||
keyUlimit = "ulimit"
|
||||
keyMemory = "memory"
|
||||
keyMemorySwap = "memswap"
|
||||
keyCPUShares = "cpushares"
|
||||
keyCPUPeriod = "cpuperiod"
|
||||
keyCPUQuota = "cpuquota"
|
||||
keyCpusetCpus = "cpusetcpus"
|
||||
keyCpusetMems = "cpusetmems"
|
||||
keyCacheFrom = "cache-from" // for registry only. deprecated in favor of keyCacheImports
|
||||
keyCacheImports = "cache-imports" // JSON representation of []CacheOptionsEntry
|
||||
|
||||
@@ -64,6 +71,7 @@ type Config struct {
|
||||
ShmSize int64
|
||||
Target string
|
||||
Ulimits []*pb.Ulimit
|
||||
LinuxResources *pb.LinuxResources
|
||||
Devices []*pb.CDIDevice
|
||||
LinterConfig *linter.Config
|
||||
|
||||
@@ -193,6 +201,12 @@ func (bc *Client) init() error {
|
||||
}
|
||||
bc.Ulimits = ulimits
|
||||
|
||||
linuxRes, err := parseLinuxResources(opts)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to parse resource limits")
|
||||
}
|
||||
bc.LinuxResources = linuxRes
|
||||
|
||||
defaultNetMode, err := parseNetMode(opts[keyForceNetwork])
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+5
-5
@@ -1,13 +1,12 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/frontend/gateway/pb/gateway.proto
|
||||
|
||||
package moby_buildkit_v1_frontend
|
||||
|
||||
import (
|
||||
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
types1 "github.com/moby/buildkit/api/types"
|
||||
pb "github.com/moby/buildkit/solver/pb"
|
||||
pb1 "github.com/moby/buildkit/sourcepolicy/pb"
|
||||
@@ -16,6 +15,7 @@ import (
|
||||
status "google.golang.org/genproto/googleapis/rpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
@@ -1446,7 +1446,7 @@ type ResolveSourceHTTPResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Checksum string `protobuf:"bytes,1,opt,name=Checksum,proto3" json:"Checksum,omitempty"`
|
||||
Filename string `protobuf:"bytes,2,opt,name=Filename,proto3" json:"Filename,omitempty"`
|
||||
LastModified *timestamp.Timestamp `protobuf:"bytes,3,opt,name=LastModified,proto3" json:"LastModified,omitempty"`
|
||||
LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=LastModified,proto3" json:"LastModified,omitempty"`
|
||||
ChecksumResponse *ChecksumResponse `protobuf:"bytes,4,opt,name=ChecksumResponse,proto3" json:"ChecksumResponse,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1496,7 +1496,7 @@ func (x *ResolveSourceHTTPResponse) GetFilename() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ResolveSourceHTTPResponse) GetLastModified() *timestamp.Timestamp {
|
||||
func (x *ResolveSourceHTTPResponse) GetLastModified() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastModified
|
||||
}
|
||||
@@ -3837,7 +3837,7 @@ var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_goTypes = []
|
||||
(*pb.Platform)(nil), // 70: pb.Platform
|
||||
(*pb1.Policy)(nil), // 71: moby.buildkit.v1.sourcepolicy.Policy
|
||||
(*pb.SourceOp)(nil), // 72: pb.SourceOp
|
||||
(*timestamp.Timestamp)(nil), // 73: google.protobuf.Timestamp
|
||||
(*timestamppb.Timestamp)(nil), // 73: google.protobuf.Timestamp
|
||||
(*types.Stat)(nil), // 74: fsutil.types.Stat
|
||||
(*pb2.APICap)(nil), // 75: moby.buildkit.v1.apicaps.APICap
|
||||
(*types1.WorkerRecord)(nil), // 76: moby.buildkit.v1.types.WorkerRecord
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/frontend/gateway/pb/gateway.proto
|
||||
|
||||
package moby_buildkit_v1_frontend
|
||||
|
||||
+8
-8
@@ -6,17 +6,17 @@ package moby_buildkit_v1_frontend
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
types1 "github.com/moby/buildkit/api/types"
|
||||
pb "github.com/moby/buildkit/solver/pb"
|
||||
pb1 "github.com/moby/buildkit/sourcepolicy/pb"
|
||||
pb2 "github.com/moby/buildkit/util/apicaps/pb"
|
||||
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
|
||||
timestamppb "github.com/planetscale/vtprotobuf/types/known/timestamppb"
|
||||
timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb"
|
||||
types "github.com/tonistiigi/fsutil/types"
|
||||
status "google.golang.org/genproto/googleapis/rpc/status"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
io "io"
|
||||
)
|
||||
|
||||
@@ -556,7 +556,7 @@ func (m *ResolveSourceHTTPResponse) CloneVT() *ResolveSourceHTTPResponse {
|
||||
r := new(ResolveSourceHTTPResponse)
|
||||
r.Checksum = m.Checksum
|
||||
r.Filename = m.Filename
|
||||
r.LastModified = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.LastModified).CloneVT())
|
||||
r.LastModified = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.LastModified).CloneVT())
|
||||
r.ChecksumResponse = m.ChecksumResponse.CloneVT()
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
@@ -2163,7 +2163,7 @@ func (this *ResolveSourceHTTPResponse) EqualVT(that *ResolveSourceHTTPResponse)
|
||||
if this.Filename != that.Filename {
|
||||
return false
|
||||
}
|
||||
if !(*timestamppb.Timestamp)(this.LastModified).EqualVT((*timestamppb.Timestamp)(that.LastModified)) {
|
||||
if !(*timestamppb1.Timestamp)(this.LastModified).EqualVT((*timestamppb1.Timestamp)(that.LastModified)) {
|
||||
return false
|
||||
}
|
||||
if !this.ChecksumResponse.EqualVT(that.ChecksumResponse) {
|
||||
@@ -4718,7 +4718,7 @@ func (m *ResolveSourceHTTPResponse) MarshalToSizedBufferVT(dAtA []byte) (int, er
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if m.LastModified != nil {
|
||||
size, err := (*timestamppb.Timestamp)(m.LastModified).MarshalToSizedBufferVT(dAtA[:i])
|
||||
size, err := (*timestamppb1.Timestamp)(m.LastModified).MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -7280,7 +7280,7 @@ func (m *ResolveSourceHTTPResponse) SizeVT() (n int) {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.LastModified != nil {
|
||||
l = (*timestamppb.Timestamp)(m.LastModified).SizeVT()
|
||||
l = (*timestamppb1.Timestamp)(m.LastModified).SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.ChecksumResponse != nil {
|
||||
@@ -11940,9 +11940,9 @@ func (m *ResolveSourceHTTPResponse) UnmarshalVT(dAtA []byte) error {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.LastModified == nil {
|
||||
m.LastModified = ×tamp.Timestamp{}
|
||||
m.LastModified = ×tamppb.Timestamp{}
|
||||
}
|
||||
if err := (*timestamppb.Timestamp)(m.LastModified).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := (*timestamppb1.Timestamp)(m.LastModified).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/auth/auth.proto
|
||||
|
||||
package auth
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/auth/auth.proto
|
||||
|
||||
package auth
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/filesync/filesync.proto
|
||||
|
||||
package filesync
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/filesync/filesync.proto
|
||||
|
||||
package filesync
|
||||
|
||||
+5
-1
@@ -7,6 +7,10 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ErrNoActiveSessions is returned when a session group does not contain any
|
||||
// active session IDs.
|
||||
var ErrNoActiveSessions = errors.New("no active sessions")
|
||||
|
||||
type Group interface {
|
||||
SessionIterator() Iterator
|
||||
}
|
||||
@@ -69,7 +73,7 @@ func (sm *Manager) Any(ctx context.Context, g Group, f func(context.Context, str
|
||||
if lastErr != nil {
|
||||
return lastErr
|
||||
}
|
||||
return errors.Errorf("no active sessions")
|
||||
return errors.WithStack(ErrNoActiveSessions)
|
||||
}
|
||||
|
||||
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
||||
|
||||
+2
-2
@@ -67,9 +67,9 @@ func serve(ctx context.Context, grpcServer *grpc.Server, conn net.Conn) {
|
||||
}
|
||||
|
||||
func grpcClientConn(ctx context.Context, conn net.Conn, opts map[string][]string) (context.Context, *grpc.ClientConn, error) {
|
||||
var dialCount int64
|
||||
var dialCount atomic.Int64
|
||||
dialer := grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
|
||||
if c := atomic.AddInt64(&dialCount, 1); c > 1 {
|
||||
if c := dialCount.Add(1); c > 1 {
|
||||
return nil, errors.Errorf("only one connection allowed")
|
||||
}
|
||||
return conn, nil
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/secrets/secrets.proto
|
||||
|
||||
package secrets
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/secrets/secrets.proto
|
||||
|
||||
package secrets
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/sshforward/ssh.proto
|
||||
|
||||
package sshforward
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/sshforward/ssh.proto
|
||||
|
||||
package sshforward
|
||||
|
||||
+2
-2
@@ -130,7 +130,7 @@ func toDialer(paths []string, raw bool) (func(context.Context) (net.Conn, error)
|
||||
continue
|
||||
}
|
||||
|
||||
fi, err := os.Stat(p)
|
||||
fi, err := os.Stat(p) //nolint:gosec // SSH agent paths are explicit user inputs and may intentionally be symlinks.
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
@@ -142,7 +142,7 @@ func toDialer(paths []string, raw bool) (func(context.Context) (net.Conn, error)
|
||||
return nil, errors.Errorf("raw mode only supported with socket paths")
|
||||
}
|
||||
|
||||
f, err := os.Open(p)
|
||||
f, err := os.Open(p) //nolint:gosec // SSH key paths are explicit user inputs and may intentionally be symlinks.
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to open %s", p)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/upload/upload.proto
|
||||
|
||||
package upload
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/session/upload/upload.proto
|
||||
|
||||
package upload
|
||||
|
||||
+168
-26
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/solver/errdefs/errdefs.proto
|
||||
|
||||
package errdefs
|
||||
@@ -514,6 +514,134 @@ func (x *ContentCache) GetIndex() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type ProvenanceMaterialsIncomplete struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Incomplete []*ProvenanceMaterialIncomplete `protobuf:"bytes,1,rep,name=incomplete,proto3" json:"incomplete,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialsIncomplete) Reset() {
|
||||
*x = ProvenanceMaterialsIncomplete{}
|
||||
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialsIncomplete) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProvenanceMaterialsIncomplete) ProtoMessage() {}
|
||||
|
||||
func (x *ProvenanceMaterialsIncomplete) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ProvenanceMaterialsIncomplete.ProtoReflect.Descriptor instead.
|
||||
func (*ProvenanceMaterialsIncomplete) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialsIncomplete) GetIncomplete() []*ProvenanceMaterialIncomplete {
|
||||
if x != nil {
|
||||
return x.Incomplete
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ProvenanceMaterialIncomplete struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Op string `protobuf:"bytes,1,opt,name=op,proto3" json:"op,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
|
||||
Uri string `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"`
|
||||
FinalUri string `protobuf:"bytes,5,opt,name=final_uri,json=finalUri,proto3" json:"final_uri,omitempty"`
|
||||
Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) Reset() {
|
||||
*x = ProvenanceMaterialIncomplete{}
|
||||
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProvenanceMaterialIncomplete) ProtoMessage() {}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ProvenanceMaterialIncomplete.ProtoReflect.Descriptor instead.
|
||||
func (*ProvenanceMaterialIncomplete) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) GetOp() string {
|
||||
if x != nil {
|
||||
return x.Op
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) GetMethod() string {
|
||||
if x != nil {
|
||||
return x.Method
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) GetUri() string {
|
||||
if x != nil {
|
||||
return x.Uri
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) GetFinalUri() string {
|
||||
if x != nil {
|
||||
return x.FinalUri
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProvenanceMaterialIncomplete) GetReason() string {
|
||||
if x != nil {
|
||||
return x.Reason
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_github_com_moby_buildkit_solver_errdefs_errdefs_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc = "" +
|
||||
@@ -550,7 +678,18 @@ const file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc = "" +
|
||||
"FileAction\x12\x14\n" +
|
||||
"\x05index\x18\x01 \x01(\x03R\x05index\"$\n" +
|
||||
"\fContentCache\x12\x14\n" +
|
||||
"\x05index\x18\x01 \x01(\x03R\x05indexB)Z'github.com/moby/buildkit/solver/errdefsb\x06proto3"
|
||||
"\x05index\x18\x01 \x01(\x03R\x05index\"f\n" +
|
||||
"\x1dProvenanceMaterialsIncomplete\x12E\n" +
|
||||
"\n" +
|
||||
"incomplete\x18\x01 \x03(\v2%.errdefs.ProvenanceMaterialIncompleteR\n" +
|
||||
"incomplete\"\xa1\x01\n" +
|
||||
"\x1cProvenanceMaterialIncomplete\x12\x0e\n" +
|
||||
"\x02op\x18\x01 \x01(\tR\x02op\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n" +
|
||||
"\x06method\x18\x03 \x01(\tR\x06method\x12\x10\n" +
|
||||
"\x03uri\x18\x04 \x01(\tR\x03uri\x12\x1b\n" +
|
||||
"\tfinal_uri\x18\x05 \x01(\tR\bfinalUri\x12\x16\n" +
|
||||
"\x06reason\x18\x06 \x01(\tR\x06reasonB)Z'github.com/moby/buildkit/solver/errdefsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescOnce sync.Once
|
||||
@@ -564,34 +703,37 @@ func file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP() []
|
||||
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_goTypes = []any{
|
||||
(*Vertex)(nil), // 0: errdefs.Vertex
|
||||
(*Source)(nil), // 1: errdefs.Source
|
||||
(*Frontend)(nil), // 2: errdefs.Frontend
|
||||
(*FrontendCap)(nil), // 3: errdefs.FrontendCap
|
||||
(*CompatibilityFeature)(nil), // 4: errdefs.CompatibilityFeature
|
||||
(*Subrequest)(nil), // 5: errdefs.Subrequest
|
||||
(*Solve)(nil), // 6: errdefs.Solve
|
||||
(*FileAction)(nil), // 7: errdefs.FileAction
|
||||
(*ContentCache)(nil), // 8: errdefs.ContentCache
|
||||
nil, // 9: errdefs.Solve.DescriptionEntry
|
||||
(*pb.SourceInfo)(nil), // 10: pb.SourceInfo
|
||||
(*pb.Range)(nil), // 11: pb.Range
|
||||
(*pb.Op)(nil), // 12: pb.Op
|
||||
(*Vertex)(nil), // 0: errdefs.Vertex
|
||||
(*Source)(nil), // 1: errdefs.Source
|
||||
(*Frontend)(nil), // 2: errdefs.Frontend
|
||||
(*FrontendCap)(nil), // 3: errdefs.FrontendCap
|
||||
(*CompatibilityFeature)(nil), // 4: errdefs.CompatibilityFeature
|
||||
(*Subrequest)(nil), // 5: errdefs.Subrequest
|
||||
(*Solve)(nil), // 6: errdefs.Solve
|
||||
(*FileAction)(nil), // 7: errdefs.FileAction
|
||||
(*ContentCache)(nil), // 8: errdefs.ContentCache
|
||||
(*ProvenanceMaterialsIncomplete)(nil), // 9: errdefs.ProvenanceMaterialsIncomplete
|
||||
(*ProvenanceMaterialIncomplete)(nil), // 10: errdefs.ProvenanceMaterialIncomplete
|
||||
nil, // 11: errdefs.Solve.DescriptionEntry
|
||||
(*pb.SourceInfo)(nil), // 12: pb.SourceInfo
|
||||
(*pb.Range)(nil), // 13: pb.Range
|
||||
(*pb.Op)(nil), // 14: pb.Op
|
||||
}
|
||||
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_depIdxs = []int32{
|
||||
10, // 0: errdefs.Source.info:type_name -> pb.SourceInfo
|
||||
11, // 1: errdefs.Source.ranges:type_name -> pb.Range
|
||||
12, // 2: errdefs.Solve.op:type_name -> pb.Op
|
||||
12, // 0: errdefs.Source.info:type_name -> pb.SourceInfo
|
||||
13, // 1: errdefs.Source.ranges:type_name -> pb.Range
|
||||
14, // 2: errdefs.Solve.op:type_name -> pb.Op
|
||||
7, // 3: errdefs.Solve.file:type_name -> errdefs.FileAction
|
||||
8, // 4: errdefs.Solve.cache:type_name -> errdefs.ContentCache
|
||||
9, // 5: errdefs.Solve.description:type_name -> errdefs.Solve.DescriptionEntry
|
||||
6, // [6:6] is the sub-list for method output_type
|
||||
6, // [6:6] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
11, // 5: errdefs.Solve.description:type_name -> errdefs.Solve.DescriptionEntry
|
||||
10, // 6: errdefs.ProvenanceMaterialsIncomplete.incomplete:type_name -> errdefs.ProvenanceMaterialIncomplete
|
||||
7, // [7:7] is the sub-list for method output_type
|
||||
7, // [7:7] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_init() }
|
||||
@@ -609,7 +751,7 @@ func file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc), len(file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
+13
@@ -55,3 +55,16 @@ message ContentCache {
|
||||
// Original index of result that failed the slow cache calculation.
|
||||
int64 index = 1;
|
||||
}
|
||||
|
||||
message ProvenanceMaterialsIncomplete {
|
||||
repeated ProvenanceMaterialIncomplete incomplete = 1;
|
||||
}
|
||||
|
||||
message ProvenanceMaterialIncomplete {
|
||||
string op = 1;
|
||||
string name = 2;
|
||||
string method = 3;
|
||||
string uri = 4;
|
||||
string final_uri = 5;
|
||||
string reason = 6;
|
||||
}
|
||||
|
||||
+610
@@ -220,6 +220,51 @@ func (m *ContentCache) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialsIncomplete) CloneVT() *ProvenanceMaterialsIncomplete {
|
||||
if m == nil {
|
||||
return (*ProvenanceMaterialsIncomplete)(nil)
|
||||
}
|
||||
r := new(ProvenanceMaterialsIncomplete)
|
||||
if rhs := m.Incomplete; rhs != nil {
|
||||
tmpContainer := make([]*ProvenanceMaterialIncomplete, len(rhs))
|
||||
for k, v := range rhs {
|
||||
tmpContainer[k] = v.CloneVT()
|
||||
}
|
||||
r.Incomplete = tmpContainer
|
||||
}
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
copy(r.unknownFields, m.unknownFields)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialsIncomplete) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialIncomplete) CloneVT() *ProvenanceMaterialIncomplete {
|
||||
if m == nil {
|
||||
return (*ProvenanceMaterialIncomplete)(nil)
|
||||
}
|
||||
r := new(ProvenanceMaterialIncomplete)
|
||||
r.Op = m.Op
|
||||
r.Name = m.Name
|
||||
r.Method = m.Method
|
||||
r.Uri = m.Uri
|
||||
r.FinalUri = m.FinalUri
|
||||
r.Reason = m.Reason
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
copy(r.unknownFields, m.unknownFields)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialIncomplete) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (this *Vertex) EqualVT(that *Vertex) bool {
|
||||
if this == that {
|
||||
return true
|
||||
@@ -504,6 +549,73 @@ func (this *ContentCache) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ProvenanceMaterialsIncomplete) EqualVT(that *ProvenanceMaterialsIncomplete) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Incomplete) != len(that.Incomplete) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Incomplete {
|
||||
vy := that.Incomplete[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &ProvenanceMaterialIncomplete{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &ProvenanceMaterialIncomplete{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ProvenanceMaterialsIncomplete) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ProvenanceMaterialsIncomplete)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ProvenanceMaterialIncomplete) EqualVT(that *ProvenanceMaterialIncomplete) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Op != that.Op {
|
||||
return false
|
||||
}
|
||||
if this.Name != that.Name {
|
||||
return false
|
||||
}
|
||||
if this.Method != that.Method {
|
||||
return false
|
||||
}
|
||||
if this.Uri != that.Uri {
|
||||
return false
|
||||
}
|
||||
if this.FinalUri != that.FinalUri {
|
||||
return false
|
||||
}
|
||||
if this.Reason != that.Reason {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ProvenanceMaterialIncomplete) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ProvenanceMaterialIncomplete)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (m *Vertex) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
@@ -982,6 +1094,126 @@ func (m *ContentCache) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialsIncomplete) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
size := m.SizeVT()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialsIncomplete) MarshalToVT(dAtA []byte) (int, error) {
|
||||
size := m.SizeVT()
|
||||
return m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialsIncomplete) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
if m == nil {
|
||||
return 0, nil
|
||||
}
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.unknownFields != nil {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if len(m.Incomplete) > 0 {
|
||||
for iNdEx := len(m.Incomplete) - 1; iNdEx >= 0; iNdEx-- {
|
||||
size, err := m.Incomplete[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialIncomplete) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
size := m.SizeVT()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialIncomplete) MarshalToVT(dAtA []byte) (int, error) {
|
||||
size := m.SizeVT()
|
||||
return m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialIncomplete) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
if m == nil {
|
||||
return 0, nil
|
||||
}
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.unknownFields != nil {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if len(m.Reason) > 0 {
|
||||
i -= len(m.Reason)
|
||||
copy(dAtA[i:], m.Reason)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Reason)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if len(m.FinalUri) > 0 {
|
||||
i -= len(m.FinalUri)
|
||||
copy(dAtA[i:], m.FinalUri)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FinalUri)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.Uri) > 0 {
|
||||
i -= len(m.Uri)
|
||||
copy(dAtA[i:], m.Uri)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uri)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.Method) > 0 {
|
||||
i -= len(m.Method)
|
||||
copy(dAtA[i:], m.Method)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Method)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Name) > 0 {
|
||||
i -= len(m.Name)
|
||||
copy(dAtA[i:], m.Name)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Op) > 0 {
|
||||
i -= len(m.Op)
|
||||
copy(dAtA[i:], m.Op)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Op)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *Vertex) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -1170,6 +1402,56 @@ func (m *ContentCache) SizeVT() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialsIncomplete) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Incomplete) > 0 {
|
||||
for _, e := range m.Incomplete {
|
||||
l = e.SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ProvenanceMaterialIncomplete) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Op)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.Name)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.Method)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.Uri)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.FinalUri)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.Reason)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Vertex) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -2257,3 +2539,331 @@ func (m *ContentCache) UnmarshalVT(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ProvenanceMaterialsIncomplete) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ProvenanceMaterialsIncomplete: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ProvenanceMaterialsIncomplete: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Incomplete", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Incomplete = append(m.Incomplete, &ProvenanceMaterialIncomplete{})
|
||||
if err := m.Incomplete[len(m.Incomplete)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ProvenanceMaterialIncomplete) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ProvenanceMaterialIncomplete: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ProvenanceMaterialIncomplete: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Op = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Name = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Method = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Uri = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field FinalUri", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.FinalUri = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Reason = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package errdefs
|
||||
|
||||
import (
|
||||
"github.com/containerd/typeurl/v2"
|
||||
"github.com/moby/buildkit/util/grpcerrors"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func init() {
|
||||
typeurl.Register((*ProvenanceMaterialsIncomplete)(nil), "github.com/moby/buildkit", "errdefs.ProvenanceMaterialsIncomplete+json")
|
||||
}
|
||||
|
||||
type ProvenanceMaterialsIncompleteError struct {
|
||||
*ProvenanceMaterialsIncomplete
|
||||
error
|
||||
}
|
||||
|
||||
func (e *ProvenanceMaterialsIncompleteError) Unwrap() error {
|
||||
return e.error
|
||||
}
|
||||
|
||||
func (e *ProvenanceMaterialsIncompleteError) ToProto() grpcerrors.TypedErrorProto {
|
||||
return e.ProvenanceMaterialsIncomplete
|
||||
}
|
||||
|
||||
func (p *ProvenanceMaterialsIncomplete) WrapError(err error) error {
|
||||
return &ProvenanceMaterialsIncompleteError{
|
||||
error: err,
|
||||
ProvenanceMaterialsIncomplete: p,
|
||||
}
|
||||
}
|
||||
|
||||
func WithProvenanceMaterialsIncomplete(err error, incomplete []*ProvenanceMaterialIncomplete) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
return &ProvenanceMaterialsIncompleteError{
|
||||
error: err,
|
||||
ProvenanceMaterialsIncomplete: &ProvenanceMaterialsIncomplete{
|
||||
Incomplete: incomplete,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func NewProvenanceMaterialsIncomplete(incomplete []*ProvenanceMaterialIncomplete) error {
|
||||
return WithProvenanceMaterialsIncomplete(errors.New("provenance materials are incomplete"), incomplete)
|
||||
}
|
||||
+3
-7
@@ -1,13 +1,12 @@
|
||||
package errdefs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
|
||||
"github.com/containerd/typeurl/v2"
|
||||
"github.com/golang/protobuf/jsonpb" //nolint:staticcheck
|
||||
"github.com/moby/buildkit/solver/pb"
|
||||
"github.com/moby/buildkit/util/grpcerrors"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -66,12 +65,9 @@ func (v *Solve) WrapError(err error) error {
|
||||
}
|
||||
|
||||
func (v *Solve) MarshalJSON() ([]byte, error) {
|
||||
m := jsonpb.Marshaler{}
|
||||
buf := new(bytes.Buffer)
|
||||
err := m.Marshal(buf, v)
|
||||
return buf.Bytes(), err
|
||||
return protojson.Marshal(v)
|
||||
}
|
||||
|
||||
func (v *Solve) UnmarshalJSON(b []byte) error {
|
||||
return jsonpb.Unmarshal(bytes.NewReader(b), v)
|
||||
return protojson.Unmarshal(b, v)
|
||||
}
|
||||
|
||||
+19
@@ -349,6 +349,25 @@ type BuildKitMetadata struct {
|
||||
Source *Source `json:"source,omitempty"`
|
||||
Layers map[string][][]ocispecs.Descriptor `json:"layers,omitempty"`
|
||||
SysUsage []*resourcestypes.SysSample `json:"sysUsage,omitempty"`
|
||||
Network *NetworkMetadata `json:"network,omitempty"`
|
||||
}
|
||||
|
||||
type NetworkMetadata struct {
|
||||
Mode string `json:"mode,omitempty"`
|
||||
Proxy *ProxyNetworkMetadata `json:"proxy,omitempty"`
|
||||
}
|
||||
|
||||
type ProxyNetworkMetadata struct {
|
||||
Incomplete []ProxyCaptureIncomplete `json:"incomplete,omitempty"`
|
||||
}
|
||||
|
||||
type ProxyCaptureIncomplete struct {
|
||||
Op string `json:"op,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Method string `json:"method,omitempty"`
|
||||
URI string `json:"uri,omitempty"`
|
||||
FinalURI string `json:"finalUri,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
type BuildKitComplete struct {
|
||||
|
||||
+23
-2
@@ -57,6 +57,7 @@ const (
|
||||
CapExecMetaBase apicaps.CapID = "exec.meta.base"
|
||||
CapExecMetaCgroupParent apicaps.CapID = "exec.meta.cgroup.parent"
|
||||
CapExecMetaNetwork apicaps.CapID = "exec.meta.network"
|
||||
CapExecMetaNetworkProxy apicaps.CapID = "exec.meta.network.proxy"
|
||||
CapExecMetaProxy apicaps.CapID = "exec.meta.proxyenv"
|
||||
CapExecMetaSecurity apicaps.CapID = "exec.meta.security"
|
||||
CapExecMetaSecurityDeviceWhitelistV1 apicaps.CapID = "exec.meta.security.devices.v1"
|
||||
@@ -64,6 +65,7 @@ const (
|
||||
CapExecMetaUlimit apicaps.CapID = "exec.meta.ulimit"
|
||||
CapExecMetaCDI apicaps.CapID = "exec.meta.cdi"
|
||||
CapExecMetaRemoveMountStubsRecursive apicaps.CapID = "exec.meta.removemountstubs.recursive"
|
||||
CapExecMetaLinuxResources apicaps.CapID = "exec.meta.linux.resources"
|
||||
CapExecMountBind apicaps.CapID = "exec.mount.bind"
|
||||
CapExecMountBindReadWriteNoOutput apicaps.CapID = "exec.mount.bind.readwrite-nooutput"
|
||||
CapExecMountCache apicaps.CapID = "exec.mount.cache"
|
||||
@@ -98,8 +100,9 @@ const (
|
||||
CapRemoteCacheS3 apicaps.CapID = "cache.s3"
|
||||
CapRemoteCacheAzBlob apicaps.CapID = "cache.azblob"
|
||||
|
||||
CapMergeOp apicaps.CapID = "mergeop"
|
||||
CapDiffOp apicaps.CapID = "diffop"
|
||||
CapMergeOp apicaps.CapID = "mergeop"
|
||||
CapDiffOp apicaps.CapID = "diffop"
|
||||
CapPassthroughOp apicaps.CapID = "passthroughop"
|
||||
|
||||
CapAnnotations apicaps.CapID = "exporter.image.annotations"
|
||||
CapAttestations apicaps.CapID = "exporter.image.attestations"
|
||||
@@ -367,6 +370,12 @@ func init() {
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapExecMetaNetworkProxy,
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapExecMetaSetsDefaultPath,
|
||||
Enabled: true,
|
||||
@@ -397,6 +406,12 @@ func init() {
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapExecMetaLinuxResources,
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapExecMountBind,
|
||||
Enabled: true,
|
||||
@@ -581,6 +596,12 @@ func init() {
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapPassthroughOp,
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapAnnotations,
|
||||
Enabled: true,
|
||||
|
||||
+11
-6
@@ -5,12 +5,13 @@ import "encoding/json"
|
||||
type jsonOp struct {
|
||||
Inputs []*Input `json:"inputs,omitempty"`
|
||||
Op struct {
|
||||
Exec *ExecOp `json:"exec,omitempty"`
|
||||
Source *SourceOp `json:"source,omitempty"`
|
||||
File *FileOp `json:"file,omitempty"`
|
||||
Build *BuildOp `json:"build,omitempty"`
|
||||
Merge *MergeOp `json:"merge,omitempty"`
|
||||
Diff *DiffOp `json:"diff,omitempty"`
|
||||
Exec *ExecOp `json:"exec,omitempty"`
|
||||
Source *SourceOp `json:"source,omitempty"`
|
||||
File *FileOp `json:"file,omitempty"`
|
||||
Build *BuildOp `json:"build,omitempty"`
|
||||
Merge *MergeOp `json:"merge,omitempty"`
|
||||
Diff *DiffOp `json:"diff,omitempty"`
|
||||
Pass *PassthroughOp `json:"passthrough,omitempty"`
|
||||
}
|
||||
Platform *Platform `json:"platform,omitempty"`
|
||||
Constraints *WorkerConstraints `json:"constraints,omitempty"`
|
||||
@@ -32,6 +33,8 @@ func (m *Op) MarshalJSON() ([]byte, error) {
|
||||
v.Op.Merge = op.Merge
|
||||
case *Op_Diff:
|
||||
v.Op.Diff = op.Diff
|
||||
case *Op_Passthrough:
|
||||
v.Op.Pass = op.Passthrough
|
||||
}
|
||||
v.Platform = m.Platform
|
||||
v.Constraints = m.Constraints
|
||||
@@ -58,6 +61,8 @@ func (m *Op) UnmarshalJSON(data []byte) error {
|
||||
m.Op = &Op_Merge{v.Op.Merge}
|
||||
case v.Op.Diff != nil:
|
||||
m.Op = &Op_Diff{v.Op.Diff}
|
||||
case v.Op.Pass != nil:
|
||||
m.Op = &Op_Passthrough{v.Op.Pass}
|
||||
}
|
||||
m.Platform = v.Platform
|
||||
m.Constraints = v.Constraints
|
||||
|
||||
+357
-158
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/solver/pb/ops.proto
|
||||
|
||||
// Package pb provides the protobuf definition of LLB: low-level builder instruction.
|
||||
@@ -30,6 +30,7 @@ const (
|
||||
NetMode_UNSET NetMode = 0 // sandbox
|
||||
NetMode_HOST NetMode = 1
|
||||
NetMode_NONE NetMode = 2
|
||||
NetMode_PROXY NetMode = 3
|
||||
)
|
||||
|
||||
// Enum value maps for NetMode.
|
||||
@@ -38,11 +39,13 @@ var (
|
||||
0: "UNSET",
|
||||
1: "HOST",
|
||||
2: "NONE",
|
||||
3: "PROXY",
|
||||
}
|
||||
NetMode_value = map[string]int32{
|
||||
"UNSET": 0,
|
||||
"HOST": 1,
|
||||
"NONE": 2,
|
||||
"PROXY": 3,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -292,6 +295,7 @@ type Op struct {
|
||||
// *Op_Build
|
||||
// *Op_Merge
|
||||
// *Op_Diff
|
||||
// *Op_Passthrough
|
||||
Op isOp_Op `protobuf_oneof:"op"`
|
||||
Platform *Platform `protobuf:"bytes,10,opt,name=platform,proto3" json:"platform,omitempty"`
|
||||
Constraints *WorkerConstraints `protobuf:"bytes,11,opt,name=constraints,proto3" json:"constraints,omitempty"`
|
||||
@@ -397,6 +401,15 @@ func (x *Op) GetDiff() *DiffOp {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Op) GetPassthrough() *PassthroughOp {
|
||||
if x != nil {
|
||||
if x, ok := x.Op.(*Op_Passthrough); ok {
|
||||
return x.Passthrough
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Op) GetPlatform() *Platform {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
@@ -439,6 +452,10 @@ type Op_Diff struct {
|
||||
Diff *DiffOp `protobuf:"bytes,7,opt,name=diff,proto3,oneof"`
|
||||
}
|
||||
|
||||
type Op_Passthrough struct {
|
||||
Passthrough *PassthroughOp `protobuf:"bytes,8,opt,name=passthrough,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*Op_Exec) isOp_Op() {}
|
||||
|
||||
func (*Op_Source) isOp_Op() {}
|
||||
@@ -451,6 +468,8 @@ func (*Op_Merge) isOp_Op() {}
|
||||
|
||||
func (*Op_Diff) isOp_Op() {}
|
||||
|
||||
func (*Op_Passthrough) isOp_Op() {}
|
||||
|
||||
// Platform is github.com/opencontainers/image-spec/specs-go/v1.Platform
|
||||
type Platform struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@@ -1604,11 +1623,12 @@ type OpMetadata struct {
|
||||
Description map[string]string `protobuf:"bytes,2,rep,name=description,proto3" json:"description,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
// index 3 reserved for WorkerConstraint in previous versions
|
||||
// WorkerConstraint worker_constraint = 3;
|
||||
ExportCache *ExportCache `protobuf:"bytes,4,opt,name=export_cache,json=exportCache,proto3" json:"export_cache,omitempty"`
|
||||
Caps map[string]bool `protobuf:"bytes,5,rep,name=caps,proto3" json:"caps,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||
ProgressGroup *ProgressGroup `protobuf:"bytes,6,opt,name=progress_group,json=progressGroup,proto3" json:"progress_group,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
ExportCache *ExportCache `protobuf:"bytes,4,opt,name=export_cache,json=exportCache,proto3" json:"export_cache,omitempty"`
|
||||
Caps map[string]bool `protobuf:"bytes,5,rep,name=caps,proto3" json:"caps,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||
ProgressGroup *ProgressGroup `protobuf:"bytes,6,opt,name=progress_group,json=progressGroup,proto3" json:"progress_group,omitempty"`
|
||||
LinuxResources *LinuxResources `protobuf:"bytes,7,opt,name=linux_resources,json=linuxResources,proto3" json:"linux_resources,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *OpMetadata) Reset() {
|
||||
@@ -1676,6 +1696,13 @@ func (x *OpMetadata) GetProgressGroup() *ProgressGroup {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OpMetadata) GetLinuxResources() *LinuxResources {
|
||||
if x != nil {
|
||||
return x.LinuxResources
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Source is a source mapping description for a file
|
||||
type Source struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@@ -2106,6 +2133,101 @@ func (x *ProgressGroup) GetWeak() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// LinuxResources specifies cgroup resource limits for containers.
|
||||
// Used in OpMetadata to set per-step resource constraints without
|
||||
// affecting the cache key.
|
||||
type LinuxResources struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Memory int64 `protobuf:"varint,1,opt,name=memory,proto3" json:"memory,omitempty"` // memory limit in bytes
|
||||
MemorySwap int64 `protobuf:"varint,2,opt,name=memorySwap,proto3" json:"memorySwap,omitempty"` // memory+swap limit in bytes
|
||||
CpuShares uint64 `protobuf:"varint,3,opt,name=cpuShares,proto3" json:"cpuShares,omitempty"` // relative CPU weight
|
||||
CpuPeriod uint64 `protobuf:"varint,4,opt,name=cpuPeriod,proto3" json:"cpuPeriod,omitempty"` // CFS period in microseconds
|
||||
CpuQuota int64 `protobuf:"varint,5,opt,name=cpuQuota,proto3" json:"cpuQuota,omitempty"` // CFS quota in microseconds
|
||||
CpusetCpus string `protobuf:"bytes,6,opt,name=cpusetCpus,proto3" json:"cpusetCpus,omitempty"` // CPU affinity (e.g., "0-3")
|
||||
CpusetMems string `protobuf:"bytes,7,opt,name=cpusetMems,proto3" json:"cpusetMems,omitempty"` // memory node affinity (e.g., "0,1")
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LinuxResources) Reset() {
|
||||
*x = LinuxResources{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[26]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LinuxResources) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LinuxResources) ProtoMessage() {}
|
||||
|
||||
func (x *LinuxResources) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[26]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LinuxResources.ProtoReflect.Descriptor instead.
|
||||
func (*LinuxResources) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{26}
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetMemory() int64 {
|
||||
if x != nil {
|
||||
return x.Memory
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetMemorySwap() int64 {
|
||||
if x != nil {
|
||||
return x.MemorySwap
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetCpuShares() uint64 {
|
||||
if x != nil {
|
||||
return x.CpuShares
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetCpuPeriod() uint64 {
|
||||
if x != nil {
|
||||
return x.CpuPeriod
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetCpuQuota() int64 {
|
||||
if x != nil {
|
||||
return x.CpuQuota
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetCpusetCpus() string {
|
||||
if x != nil {
|
||||
return x.CpusetCpus
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LinuxResources) GetCpusetMems() string {
|
||||
if x != nil {
|
||||
return x.CpusetMems
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ProxyEnv struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
HttpProxy string `protobuf:"bytes,1,opt,name=http_proxy,json=httpProxy,proto3" json:"http_proxy,omitempty"`
|
||||
@@ -2119,7 +2241,7 @@ type ProxyEnv struct {
|
||||
|
||||
func (x *ProxyEnv) Reset() {
|
||||
*x = ProxyEnv{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[26]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[27]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2131,7 +2253,7 @@ func (x *ProxyEnv) String() string {
|
||||
func (*ProxyEnv) ProtoMessage() {}
|
||||
|
||||
func (x *ProxyEnv) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[26]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[27]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2144,7 +2266,7 @@ func (x *ProxyEnv) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ProxyEnv.ProtoReflect.Descriptor instead.
|
||||
func (*ProxyEnv) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{26}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{27}
|
||||
}
|
||||
|
||||
func (x *ProxyEnv) GetHttpProxy() string {
|
||||
@@ -2192,7 +2314,7 @@ type WorkerConstraints struct {
|
||||
|
||||
func (x *WorkerConstraints) Reset() {
|
||||
*x = WorkerConstraints{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[27]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[28]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2204,7 +2326,7 @@ func (x *WorkerConstraints) String() string {
|
||||
func (*WorkerConstraints) ProtoMessage() {}
|
||||
|
||||
func (x *WorkerConstraints) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[27]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[28]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2217,7 +2339,7 @@ func (x *WorkerConstraints) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkerConstraints.ProtoReflect.Descriptor instead.
|
||||
func (*WorkerConstraints) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{27}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{28}
|
||||
}
|
||||
|
||||
func (x *WorkerConstraints) GetFilter() []string {
|
||||
@@ -2243,7 +2365,7 @@ type Definition struct {
|
||||
|
||||
func (x *Definition) Reset() {
|
||||
*x = Definition{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[28]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[29]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2255,7 +2377,7 @@ func (x *Definition) String() string {
|
||||
func (*Definition) ProtoMessage() {}
|
||||
|
||||
func (x *Definition) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[28]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[29]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2268,7 +2390,7 @@ func (x *Definition) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Definition.ProtoReflect.Descriptor instead.
|
||||
func (*Definition) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{28}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{29}
|
||||
}
|
||||
|
||||
func (x *Definition) GetDef() [][]byte {
|
||||
@@ -2301,7 +2423,7 @@ type FileOp struct {
|
||||
|
||||
func (x *FileOp) Reset() {
|
||||
*x = FileOp{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[29]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[30]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2313,7 +2435,7 @@ func (x *FileOp) String() string {
|
||||
func (*FileOp) ProtoMessage() {}
|
||||
|
||||
func (x *FileOp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[29]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[30]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2326,7 +2448,7 @@ func (x *FileOp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileOp.ProtoReflect.Descriptor instead.
|
||||
func (*FileOp) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{29}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{30}
|
||||
}
|
||||
|
||||
func (x *FileOp) GetActions() []*FileAction {
|
||||
@@ -2356,7 +2478,7 @@ type FileAction struct {
|
||||
|
||||
func (x *FileAction) Reset() {
|
||||
*x = FileAction{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[30]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[31]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2368,7 +2490,7 @@ func (x *FileAction) String() string {
|
||||
func (*FileAction) ProtoMessage() {}
|
||||
|
||||
func (x *FileAction) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[30]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[31]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2381,7 +2503,7 @@ func (x *FileAction) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileAction.ProtoReflect.Descriptor instead.
|
||||
func (*FileAction) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{30}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{31}
|
||||
}
|
||||
|
||||
func (x *FileAction) GetInput() int64 {
|
||||
@@ -2537,7 +2659,7 @@ type FileActionCopy struct {
|
||||
|
||||
func (x *FileActionCopy) Reset() {
|
||||
*x = FileActionCopy{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[31]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[32]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2549,7 +2671,7 @@ func (x *FileActionCopy) String() string {
|
||||
func (*FileActionCopy) ProtoMessage() {}
|
||||
|
||||
func (x *FileActionCopy) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[31]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[32]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2562,7 +2684,7 @@ func (x *FileActionCopy) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileActionCopy.ProtoReflect.Descriptor instead.
|
||||
func (*FileActionCopy) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{31}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{32}
|
||||
}
|
||||
|
||||
func (x *FileActionCopy) GetSrc() string {
|
||||
@@ -2695,7 +2817,7 @@ type FileActionMkFile struct {
|
||||
|
||||
func (x *FileActionMkFile) Reset() {
|
||||
*x = FileActionMkFile{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[32]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[33]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2707,7 +2829,7 @@ func (x *FileActionMkFile) String() string {
|
||||
func (*FileActionMkFile) ProtoMessage() {}
|
||||
|
||||
func (x *FileActionMkFile) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[32]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[33]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2720,7 +2842,7 @@ func (x *FileActionMkFile) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileActionMkFile.ProtoReflect.Descriptor instead.
|
||||
func (*FileActionMkFile) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{32}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{33}
|
||||
}
|
||||
|
||||
func (x *FileActionMkFile) GetPath() string {
|
||||
@@ -2774,7 +2896,7 @@ type FileActionSymlink struct {
|
||||
|
||||
func (x *FileActionSymlink) Reset() {
|
||||
*x = FileActionSymlink{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[33]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[34]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2786,7 +2908,7 @@ func (x *FileActionSymlink) String() string {
|
||||
func (*FileActionSymlink) ProtoMessage() {}
|
||||
|
||||
func (x *FileActionSymlink) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[33]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[34]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2799,7 +2921,7 @@ func (x *FileActionSymlink) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileActionSymlink.ProtoReflect.Descriptor instead.
|
||||
func (*FileActionSymlink) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{33}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{34}
|
||||
}
|
||||
|
||||
func (x *FileActionSymlink) GetOldpath() string {
|
||||
@@ -2848,7 +2970,7 @@ type FileActionMkDir struct {
|
||||
|
||||
func (x *FileActionMkDir) Reset() {
|
||||
*x = FileActionMkDir{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[34]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[35]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2860,7 +2982,7 @@ func (x *FileActionMkDir) String() string {
|
||||
func (*FileActionMkDir) ProtoMessage() {}
|
||||
|
||||
func (x *FileActionMkDir) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[34]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[35]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2873,7 +2995,7 @@ func (x *FileActionMkDir) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileActionMkDir.ProtoReflect.Descriptor instead.
|
||||
func (*FileActionMkDir) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{34}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{35}
|
||||
}
|
||||
|
||||
func (x *FileActionMkDir) GetPath() string {
|
||||
@@ -2925,7 +3047,7 @@ type FileActionRm struct {
|
||||
|
||||
func (x *FileActionRm) Reset() {
|
||||
*x = FileActionRm{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[35]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[36]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2937,7 +3059,7 @@ func (x *FileActionRm) String() string {
|
||||
func (*FileActionRm) ProtoMessage() {}
|
||||
|
||||
func (x *FileActionRm) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[35]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[36]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -2950,7 +3072,7 @@ func (x *FileActionRm) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FileActionRm.ProtoReflect.Descriptor instead.
|
||||
func (*FileActionRm) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{35}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{36}
|
||||
}
|
||||
|
||||
func (x *FileActionRm) GetPath() string {
|
||||
@@ -2984,7 +3106,7 @@ type ChownOpt struct {
|
||||
|
||||
func (x *ChownOpt) Reset() {
|
||||
*x = ChownOpt{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[36]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[37]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2996,7 +3118,7 @@ func (x *ChownOpt) String() string {
|
||||
func (*ChownOpt) ProtoMessage() {}
|
||||
|
||||
func (x *ChownOpt) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[36]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[37]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3009,7 +3131,7 @@ func (x *ChownOpt) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChownOpt.ProtoReflect.Descriptor instead.
|
||||
func (*ChownOpt) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{36}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{37}
|
||||
}
|
||||
|
||||
func (x *ChownOpt) GetUser() *UserOpt {
|
||||
@@ -3041,7 +3163,7 @@ type UserOpt struct {
|
||||
|
||||
func (x *UserOpt) Reset() {
|
||||
*x = UserOpt{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[37]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[38]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3053,7 +3175,7 @@ func (x *UserOpt) String() string {
|
||||
func (*UserOpt) ProtoMessage() {}
|
||||
|
||||
func (x *UserOpt) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[37]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[38]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3066,7 +3188,7 @@ func (x *UserOpt) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UserOpt.ProtoReflect.Descriptor instead.
|
||||
func (*UserOpt) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{37}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{38}
|
||||
}
|
||||
|
||||
func (x *UserOpt) GetUser() isUserOpt_User {
|
||||
@@ -3120,7 +3242,7 @@ type NamedUserOpt struct {
|
||||
|
||||
func (x *NamedUserOpt) Reset() {
|
||||
*x = NamedUserOpt{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[38]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[39]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3132,7 +3254,7 @@ func (x *NamedUserOpt) String() string {
|
||||
func (*NamedUserOpt) ProtoMessage() {}
|
||||
|
||||
func (x *NamedUserOpt) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[38]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[39]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3145,7 +3267,7 @@ func (x *NamedUserOpt) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use NamedUserOpt.ProtoReflect.Descriptor instead.
|
||||
func (*NamedUserOpt) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{38}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{39}
|
||||
}
|
||||
|
||||
func (x *NamedUserOpt) GetName() string {
|
||||
@@ -3171,7 +3293,7 @@ type MergeInput struct {
|
||||
|
||||
func (x *MergeInput) Reset() {
|
||||
*x = MergeInput{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[39]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[40]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3183,7 +3305,7 @@ func (x *MergeInput) String() string {
|
||||
func (*MergeInput) ProtoMessage() {}
|
||||
|
||||
func (x *MergeInput) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[39]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[40]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3196,7 +3318,7 @@ func (x *MergeInput) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MergeInput.ProtoReflect.Descriptor instead.
|
||||
func (*MergeInput) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{39}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{40}
|
||||
}
|
||||
|
||||
func (x *MergeInput) GetInput() int64 {
|
||||
@@ -3215,7 +3337,7 @@ type MergeOp struct {
|
||||
|
||||
func (x *MergeOp) Reset() {
|
||||
*x = MergeOp{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[40]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[41]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3227,7 +3349,7 @@ func (x *MergeOp) String() string {
|
||||
func (*MergeOp) ProtoMessage() {}
|
||||
|
||||
func (x *MergeOp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[40]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[41]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3240,7 +3362,7 @@ func (x *MergeOp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MergeOp.ProtoReflect.Descriptor instead.
|
||||
func (*MergeOp) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{40}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{41}
|
||||
}
|
||||
|
||||
func (x *MergeOp) GetInputs() []*MergeInput {
|
||||
@@ -3259,7 +3381,7 @@ type LowerDiffInput struct {
|
||||
|
||||
func (x *LowerDiffInput) Reset() {
|
||||
*x = LowerDiffInput{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[41]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[42]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3271,7 +3393,7 @@ func (x *LowerDiffInput) String() string {
|
||||
func (*LowerDiffInput) ProtoMessage() {}
|
||||
|
||||
func (x *LowerDiffInput) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[41]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[42]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3284,7 +3406,7 @@ func (x *LowerDiffInput) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use LowerDiffInput.ProtoReflect.Descriptor instead.
|
||||
func (*LowerDiffInput) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{41}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{42}
|
||||
}
|
||||
|
||||
func (x *LowerDiffInput) GetInput() int64 {
|
||||
@@ -3303,7 +3425,7 @@ type UpperDiffInput struct {
|
||||
|
||||
func (x *UpperDiffInput) Reset() {
|
||||
*x = UpperDiffInput{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[42]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[43]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3315,7 +3437,7 @@ func (x *UpperDiffInput) String() string {
|
||||
func (*UpperDiffInput) ProtoMessage() {}
|
||||
|
||||
func (x *UpperDiffInput) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[42]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[43]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3328,7 +3450,7 @@ func (x *UpperDiffInput) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpperDiffInput.ProtoReflect.Descriptor instead.
|
||||
func (*UpperDiffInput) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{42}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{43}
|
||||
}
|
||||
|
||||
func (x *UpperDiffInput) GetInput() int64 {
|
||||
@@ -3348,7 +3470,7 @@ type DiffOp struct {
|
||||
|
||||
func (x *DiffOp) Reset() {
|
||||
*x = DiffOp{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[43]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[44]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -3360,7 +3482,7 @@ func (x *DiffOp) String() string {
|
||||
func (*DiffOp) ProtoMessage() {}
|
||||
|
||||
func (x *DiffOp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[43]
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[44]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3373,7 +3495,7 @@ func (x *DiffOp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DiffOp.ProtoReflect.Descriptor instead.
|
||||
func (*DiffOp) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{43}
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{44}
|
||||
}
|
||||
|
||||
func (x *DiffOp) GetLower() *LowerDiffInput {
|
||||
@@ -3390,11 +3512,63 @@ func (x *DiffOp) GetUpper() *UpperDiffInput {
|
||||
return nil
|
||||
}
|
||||
|
||||
type PassthroughOp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Outputs []int64 `protobuf:"varint,2,rep,packed,name=outputs,proto3" json:"outputs,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PassthroughOp) Reset() {
|
||||
*x = PassthroughOp{}
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[45]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PassthroughOp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PassthroughOp) ProtoMessage() {}
|
||||
|
||||
func (x *PassthroughOp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[45]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PassthroughOp.ProtoReflect.Descriptor instead.
|
||||
func (*PassthroughOp) Descriptor() ([]byte, []int) {
|
||||
return file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP(), []int{45}
|
||||
}
|
||||
|
||||
func (x *PassthroughOp) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassthroughOp) GetOutputs() []int64 {
|
||||
if x != nil {
|
||||
return x.Outputs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_github_com_moby_buildkit_solver_pb_ops_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
",github.com/moby/buildkit/solver/pb/ops.proto\x12\x02pb\"\xe8\x02\n" +
|
||||
",github.com/moby/buildkit/solver/pb/ops.proto\x12\x02pb\"\x9f\x03\n" +
|
||||
"\x02Op\x12!\n" +
|
||||
"\x06inputs\x18\x01 \x03(\v2\t.pb.InputR\x06inputs\x12 \n" +
|
||||
"\x04exec\x18\x02 \x01(\v2\n" +
|
||||
@@ -3405,7 +3579,8 @@ const file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc = "" +
|
||||
"\x05build\x18\x05 \x01(\v2\v.pb.BuildOpH\x00R\x05build\x12#\n" +
|
||||
"\x05merge\x18\x06 \x01(\v2\v.pb.MergeOpH\x00R\x05merge\x12 \n" +
|
||||
"\x04diff\x18\a \x01(\v2\n" +
|
||||
".pb.DiffOpH\x00R\x04diff\x12(\n" +
|
||||
".pb.DiffOpH\x00R\x04diff\x125\n" +
|
||||
"\vpassthrough\x18\b \x01(\v2\x11.pb.PassthroughOpH\x00R\vpassthrough\x12(\n" +
|
||||
"\bplatform\x18\n" +
|
||||
" \x01(\v2\f.pb.PlatformR\bplatform\x127\n" +
|
||||
"\vconstraints\x18\v \x01(\v2\x15.pb.WorkerConstraintsR\vconstraintsB\x04\n" +
|
||||
@@ -3515,14 +3690,15 @@ const file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc = "" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\"\n" +
|
||||
"\n" +
|
||||
"BuildInput\x12\x14\n" +
|
||||
"\x05input\x18\x01 \x01(\x03R\x05input\"\x87\x03\n" +
|
||||
"\x05input\x18\x01 \x01(\x03R\x05input\"\xc4\x03\n" +
|
||||
"\n" +
|
||||
"OpMetadata\x12!\n" +
|
||||
"\fignore_cache\x18\x01 \x01(\bR\vignoreCache\x12A\n" +
|
||||
"\vdescription\x18\x02 \x03(\v2\x1f.pb.OpMetadata.DescriptionEntryR\vdescription\x122\n" +
|
||||
"\fexport_cache\x18\x04 \x01(\v2\x0f.pb.ExportCacheR\vexportCache\x12,\n" +
|
||||
"\x04caps\x18\x05 \x03(\v2\x18.pb.OpMetadata.CapsEntryR\x04caps\x128\n" +
|
||||
"\x0eprogress_group\x18\x06 \x01(\v2\x11.pb.ProgressGroupR\rprogressGroup\x1a>\n" +
|
||||
"\x0eprogress_group\x18\x06 \x01(\v2\x11.pb.ProgressGroupR\rprogressGroup\x12;\n" +
|
||||
"\x0flinux_resources\x18\a \x01(\v2\x12.pb.LinuxResourcesR\x0elinuxResources\x1a>\n" +
|
||||
"\x10DescriptionEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a7\n" +
|
||||
@@ -3559,7 +3735,21 @@ const file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc = "" +
|
||||
"\rProgressGroup\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
|
||||
"\x04weak\x18\x03 \x01(\bR\x04weak\"\x9f\x01\n" +
|
||||
"\x04weak\x18\x03 \x01(\bR\x04weak\"\xe0\x01\n" +
|
||||
"\x0eLinuxResources\x12\x16\n" +
|
||||
"\x06memory\x18\x01 \x01(\x03R\x06memory\x12\x1e\n" +
|
||||
"\n" +
|
||||
"memorySwap\x18\x02 \x01(\x03R\n" +
|
||||
"memorySwap\x12\x1c\n" +
|
||||
"\tcpuShares\x18\x03 \x01(\x04R\tcpuShares\x12\x1c\n" +
|
||||
"\tcpuPeriod\x18\x04 \x01(\x04R\tcpuPeriod\x12\x1a\n" +
|
||||
"\bcpuQuota\x18\x05 \x01(\x03R\bcpuQuota\x12\x1e\n" +
|
||||
"\n" +
|
||||
"cpusetCpus\x18\x06 \x01(\tR\n" +
|
||||
"cpusetCpus\x12\x1e\n" +
|
||||
"\n" +
|
||||
"cpusetMems\x18\a \x01(\tR\n" +
|
||||
"cpusetMems\"\x9f\x01\n" +
|
||||
"\bProxyEnv\x12\x1d\n" +
|
||||
"\n" +
|
||||
"http_proxy\x18\x01 \x01(\tR\thttpProxy\x12\x1f\n" +
|
||||
@@ -3652,11 +3842,15 @@ const file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc = "" +
|
||||
"\x05input\x18\x01 \x01(\x03R\x05input\"\\\n" +
|
||||
"\x06DiffOp\x12(\n" +
|
||||
"\x05lower\x18\x01 \x01(\v2\x12.pb.LowerDiffInputR\x05lower\x12(\n" +
|
||||
"\x05upper\x18\x02 \x01(\v2\x12.pb.UpperDiffInputR\x05upper*(\n" +
|
||||
"\x05upper\x18\x02 \x01(\v2\x12.pb.UpperDiffInputR\x05upper\"9\n" +
|
||||
"\rPassthroughOp\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" +
|
||||
"\aoutputs\x18\x02 \x03(\x03R\aoutputs*3\n" +
|
||||
"\aNetMode\x12\t\n" +
|
||||
"\x05UNSET\x10\x00\x12\b\n" +
|
||||
"\x04HOST\x10\x01\x12\b\n" +
|
||||
"\x04NONE\x10\x02*)\n" +
|
||||
"\x04NONE\x10\x02\x12\t\n" +
|
||||
"\x05PROXY\x10\x03*)\n" +
|
||||
"\fSecurityMode\x12\v\n" +
|
||||
"\aSANDBOX\x10\x00\x12\f\n" +
|
||||
"\bINSECURE\x10\x01*@\n" +
|
||||
@@ -3691,7 +3885,7 @@ func file_github_com_moby_buildkit_solver_pb_ops_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_github_com_moby_buildkit_solver_pb_ops_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
|
||||
var file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes = make([]protoimpl.MessageInfo, 51)
|
||||
var file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes = make([]protoimpl.MessageInfo, 53)
|
||||
var file_github_com_moby_buildkit_solver_pb_ops_proto_goTypes = []any{
|
||||
(NetMode)(0), // 0: pb.NetMode
|
||||
(SecurityMode)(0), // 1: pb.SecurityMode
|
||||
@@ -3724,99 +3918,103 @@ var file_github_com_moby_buildkit_solver_pb_ops_proto_goTypes = []any{
|
||||
(*Position)(nil), // 28: pb.Position
|
||||
(*ExportCache)(nil), // 29: pb.ExportCache
|
||||
(*ProgressGroup)(nil), // 30: pb.ProgressGroup
|
||||
(*ProxyEnv)(nil), // 31: pb.ProxyEnv
|
||||
(*WorkerConstraints)(nil), // 32: pb.WorkerConstraints
|
||||
(*Definition)(nil), // 33: pb.Definition
|
||||
(*FileOp)(nil), // 34: pb.FileOp
|
||||
(*FileAction)(nil), // 35: pb.FileAction
|
||||
(*FileActionCopy)(nil), // 36: pb.FileActionCopy
|
||||
(*FileActionMkFile)(nil), // 37: pb.FileActionMkFile
|
||||
(*FileActionSymlink)(nil), // 38: pb.FileActionSymlink
|
||||
(*FileActionMkDir)(nil), // 39: pb.FileActionMkDir
|
||||
(*FileActionRm)(nil), // 40: pb.FileActionRm
|
||||
(*ChownOpt)(nil), // 41: pb.ChownOpt
|
||||
(*UserOpt)(nil), // 42: pb.UserOpt
|
||||
(*NamedUserOpt)(nil), // 43: pb.NamedUserOpt
|
||||
(*MergeInput)(nil), // 44: pb.MergeInput
|
||||
(*MergeOp)(nil), // 45: pb.MergeOp
|
||||
(*LowerDiffInput)(nil), // 46: pb.LowerDiffInput
|
||||
(*UpperDiffInput)(nil), // 47: pb.UpperDiffInput
|
||||
(*DiffOp)(nil), // 48: pb.DiffOp
|
||||
nil, // 49: pb.SourceOp.AttrsEntry
|
||||
nil, // 50: pb.BuildOp.InputsEntry
|
||||
nil, // 51: pb.BuildOp.AttrsEntry
|
||||
nil, // 52: pb.OpMetadata.DescriptionEntry
|
||||
nil, // 53: pb.OpMetadata.CapsEntry
|
||||
nil, // 54: pb.Source.LocationsEntry
|
||||
nil, // 55: pb.Definition.MetadataEntry
|
||||
(*LinuxResources)(nil), // 31: pb.LinuxResources
|
||||
(*ProxyEnv)(nil), // 32: pb.ProxyEnv
|
||||
(*WorkerConstraints)(nil), // 33: pb.WorkerConstraints
|
||||
(*Definition)(nil), // 34: pb.Definition
|
||||
(*FileOp)(nil), // 35: pb.FileOp
|
||||
(*FileAction)(nil), // 36: pb.FileAction
|
||||
(*FileActionCopy)(nil), // 37: pb.FileActionCopy
|
||||
(*FileActionMkFile)(nil), // 38: pb.FileActionMkFile
|
||||
(*FileActionSymlink)(nil), // 39: pb.FileActionSymlink
|
||||
(*FileActionMkDir)(nil), // 40: pb.FileActionMkDir
|
||||
(*FileActionRm)(nil), // 41: pb.FileActionRm
|
||||
(*ChownOpt)(nil), // 42: pb.ChownOpt
|
||||
(*UserOpt)(nil), // 43: pb.UserOpt
|
||||
(*NamedUserOpt)(nil), // 44: pb.NamedUserOpt
|
||||
(*MergeInput)(nil), // 45: pb.MergeInput
|
||||
(*MergeOp)(nil), // 46: pb.MergeOp
|
||||
(*LowerDiffInput)(nil), // 47: pb.LowerDiffInput
|
||||
(*UpperDiffInput)(nil), // 48: pb.UpperDiffInput
|
||||
(*DiffOp)(nil), // 49: pb.DiffOp
|
||||
(*PassthroughOp)(nil), // 50: pb.PassthroughOp
|
||||
nil, // 51: pb.SourceOp.AttrsEntry
|
||||
nil, // 52: pb.BuildOp.InputsEntry
|
||||
nil, // 53: pb.BuildOp.AttrsEntry
|
||||
nil, // 54: pb.OpMetadata.DescriptionEntry
|
||||
nil, // 55: pb.OpMetadata.CapsEntry
|
||||
nil, // 56: pb.Source.LocationsEntry
|
||||
nil, // 57: pb.Definition.MetadataEntry
|
||||
}
|
||||
var file_github_com_moby_buildkit_solver_pb_ops_proto_depIdxs = []int32{
|
||||
7, // 0: pb.Op.inputs:type_name -> pb.Input
|
||||
8, // 1: pb.Op.exec:type_name -> pb.ExecOp
|
||||
19, // 2: pb.Op.source:type_name -> pb.SourceOp
|
||||
34, // 3: pb.Op.file:type_name -> pb.FileOp
|
||||
35, // 3: pb.Op.file:type_name -> pb.FileOp
|
||||
20, // 4: pb.Op.build:type_name -> pb.BuildOp
|
||||
45, // 5: pb.Op.merge:type_name -> pb.MergeOp
|
||||
48, // 6: pb.Op.diff:type_name -> pb.DiffOp
|
||||
6, // 7: pb.Op.platform:type_name -> pb.Platform
|
||||
32, // 8: pb.Op.constraints:type_name -> pb.WorkerConstraints
|
||||
9, // 9: pb.ExecOp.meta:type_name -> pb.Meta
|
||||
14, // 10: pb.ExecOp.mounts:type_name -> pb.Mount
|
||||
0, // 11: pb.ExecOp.network:type_name -> pb.NetMode
|
||||
1, // 12: pb.ExecOp.security:type_name -> pb.SecurityMode
|
||||
12, // 13: pb.ExecOp.secretenv:type_name -> pb.SecretEnv
|
||||
13, // 14: pb.ExecOp.cdiDevices:type_name -> pb.CDIDevice
|
||||
31, // 15: pb.Meta.proxy_env:type_name -> pb.ProxyEnv
|
||||
10, // 16: pb.Meta.extraHosts:type_name -> pb.HostIP
|
||||
11, // 17: pb.Meta.ulimit:type_name -> pb.Ulimit
|
||||
2, // 18: pb.Mount.mountType:type_name -> pb.MountType
|
||||
15, // 19: pb.Mount.TmpfsOpt:type_name -> pb.TmpfsOpt
|
||||
16, // 20: pb.Mount.cacheOpt:type_name -> pb.CacheOpt
|
||||
17, // 21: pb.Mount.secretOpt:type_name -> pb.SecretOpt
|
||||
18, // 22: pb.Mount.SSHOpt:type_name -> pb.SSHOpt
|
||||
3, // 23: pb.Mount.contentCache:type_name -> pb.MountContentCache
|
||||
4, // 24: pb.CacheOpt.sharing:type_name -> pb.CacheSharingOpt
|
||||
49, // 25: pb.SourceOp.attrs:type_name -> pb.SourceOp.AttrsEntry
|
||||
50, // 26: pb.BuildOp.inputs:type_name -> pb.BuildOp.InputsEntry
|
||||
33, // 27: pb.BuildOp.def:type_name -> pb.Definition
|
||||
51, // 28: pb.BuildOp.attrs:type_name -> pb.BuildOp.AttrsEntry
|
||||
52, // 29: pb.OpMetadata.description:type_name -> pb.OpMetadata.DescriptionEntry
|
||||
29, // 30: pb.OpMetadata.export_cache:type_name -> pb.ExportCache
|
||||
53, // 31: pb.OpMetadata.caps:type_name -> pb.OpMetadata.CapsEntry
|
||||
30, // 32: pb.OpMetadata.progress_group:type_name -> pb.ProgressGroup
|
||||
54, // 33: pb.Source.locations:type_name -> pb.Source.LocationsEntry
|
||||
25, // 34: pb.Source.infos:type_name -> pb.SourceInfo
|
||||
26, // 35: pb.Locations.locations:type_name -> pb.Location
|
||||
33, // 36: pb.SourceInfo.definition:type_name -> pb.Definition
|
||||
27, // 37: pb.Location.ranges:type_name -> pb.Range
|
||||
28, // 38: pb.Range.start:type_name -> pb.Position
|
||||
28, // 39: pb.Range.end:type_name -> pb.Position
|
||||
55, // 40: pb.Definition.metadata:type_name -> pb.Definition.MetadataEntry
|
||||
23, // 41: pb.Definition.Source:type_name -> pb.Source
|
||||
35, // 42: pb.FileOp.actions:type_name -> pb.FileAction
|
||||
36, // 43: pb.FileAction.copy:type_name -> pb.FileActionCopy
|
||||
37, // 44: pb.FileAction.mkfile:type_name -> pb.FileActionMkFile
|
||||
39, // 45: pb.FileAction.mkdir:type_name -> pb.FileActionMkDir
|
||||
40, // 46: pb.FileAction.rm:type_name -> pb.FileActionRm
|
||||
38, // 47: pb.FileAction.symlink:type_name -> pb.FileActionSymlink
|
||||
41, // 48: pb.FileActionCopy.owner:type_name -> pb.ChownOpt
|
||||
41, // 49: pb.FileActionMkFile.owner:type_name -> pb.ChownOpt
|
||||
41, // 50: pb.FileActionSymlink.owner:type_name -> pb.ChownOpt
|
||||
41, // 51: pb.FileActionMkDir.owner:type_name -> pb.ChownOpt
|
||||
42, // 52: pb.ChownOpt.user:type_name -> pb.UserOpt
|
||||
42, // 53: pb.ChownOpt.group:type_name -> pb.UserOpt
|
||||
43, // 54: pb.UserOpt.byName:type_name -> pb.NamedUserOpt
|
||||
44, // 55: pb.MergeOp.inputs:type_name -> pb.MergeInput
|
||||
46, // 56: pb.DiffOp.lower:type_name -> pb.LowerDiffInput
|
||||
47, // 57: pb.DiffOp.upper:type_name -> pb.UpperDiffInput
|
||||
21, // 58: pb.BuildOp.InputsEntry.value:type_name -> pb.BuildInput
|
||||
24, // 59: pb.Source.LocationsEntry.value:type_name -> pb.Locations
|
||||
22, // 60: pb.Definition.MetadataEntry.value:type_name -> pb.OpMetadata
|
||||
61, // [61:61] is the sub-list for method output_type
|
||||
61, // [61:61] is the sub-list for method input_type
|
||||
61, // [61:61] is the sub-list for extension type_name
|
||||
61, // [61:61] is the sub-list for extension extendee
|
||||
0, // [0:61] is the sub-list for field type_name
|
||||
46, // 5: pb.Op.merge:type_name -> pb.MergeOp
|
||||
49, // 6: pb.Op.diff:type_name -> pb.DiffOp
|
||||
50, // 7: pb.Op.passthrough:type_name -> pb.PassthroughOp
|
||||
6, // 8: pb.Op.platform:type_name -> pb.Platform
|
||||
33, // 9: pb.Op.constraints:type_name -> pb.WorkerConstraints
|
||||
9, // 10: pb.ExecOp.meta:type_name -> pb.Meta
|
||||
14, // 11: pb.ExecOp.mounts:type_name -> pb.Mount
|
||||
0, // 12: pb.ExecOp.network:type_name -> pb.NetMode
|
||||
1, // 13: pb.ExecOp.security:type_name -> pb.SecurityMode
|
||||
12, // 14: pb.ExecOp.secretenv:type_name -> pb.SecretEnv
|
||||
13, // 15: pb.ExecOp.cdiDevices:type_name -> pb.CDIDevice
|
||||
32, // 16: pb.Meta.proxy_env:type_name -> pb.ProxyEnv
|
||||
10, // 17: pb.Meta.extraHosts:type_name -> pb.HostIP
|
||||
11, // 18: pb.Meta.ulimit:type_name -> pb.Ulimit
|
||||
2, // 19: pb.Mount.mountType:type_name -> pb.MountType
|
||||
15, // 20: pb.Mount.TmpfsOpt:type_name -> pb.TmpfsOpt
|
||||
16, // 21: pb.Mount.cacheOpt:type_name -> pb.CacheOpt
|
||||
17, // 22: pb.Mount.secretOpt:type_name -> pb.SecretOpt
|
||||
18, // 23: pb.Mount.SSHOpt:type_name -> pb.SSHOpt
|
||||
3, // 24: pb.Mount.contentCache:type_name -> pb.MountContentCache
|
||||
4, // 25: pb.CacheOpt.sharing:type_name -> pb.CacheSharingOpt
|
||||
51, // 26: pb.SourceOp.attrs:type_name -> pb.SourceOp.AttrsEntry
|
||||
52, // 27: pb.BuildOp.inputs:type_name -> pb.BuildOp.InputsEntry
|
||||
34, // 28: pb.BuildOp.def:type_name -> pb.Definition
|
||||
53, // 29: pb.BuildOp.attrs:type_name -> pb.BuildOp.AttrsEntry
|
||||
54, // 30: pb.OpMetadata.description:type_name -> pb.OpMetadata.DescriptionEntry
|
||||
29, // 31: pb.OpMetadata.export_cache:type_name -> pb.ExportCache
|
||||
55, // 32: pb.OpMetadata.caps:type_name -> pb.OpMetadata.CapsEntry
|
||||
30, // 33: pb.OpMetadata.progress_group:type_name -> pb.ProgressGroup
|
||||
31, // 34: pb.OpMetadata.linux_resources:type_name -> pb.LinuxResources
|
||||
56, // 35: pb.Source.locations:type_name -> pb.Source.LocationsEntry
|
||||
25, // 36: pb.Source.infos:type_name -> pb.SourceInfo
|
||||
26, // 37: pb.Locations.locations:type_name -> pb.Location
|
||||
34, // 38: pb.SourceInfo.definition:type_name -> pb.Definition
|
||||
27, // 39: pb.Location.ranges:type_name -> pb.Range
|
||||
28, // 40: pb.Range.start:type_name -> pb.Position
|
||||
28, // 41: pb.Range.end:type_name -> pb.Position
|
||||
57, // 42: pb.Definition.metadata:type_name -> pb.Definition.MetadataEntry
|
||||
23, // 43: pb.Definition.Source:type_name -> pb.Source
|
||||
36, // 44: pb.FileOp.actions:type_name -> pb.FileAction
|
||||
37, // 45: pb.FileAction.copy:type_name -> pb.FileActionCopy
|
||||
38, // 46: pb.FileAction.mkfile:type_name -> pb.FileActionMkFile
|
||||
40, // 47: pb.FileAction.mkdir:type_name -> pb.FileActionMkDir
|
||||
41, // 48: pb.FileAction.rm:type_name -> pb.FileActionRm
|
||||
39, // 49: pb.FileAction.symlink:type_name -> pb.FileActionSymlink
|
||||
42, // 50: pb.FileActionCopy.owner:type_name -> pb.ChownOpt
|
||||
42, // 51: pb.FileActionMkFile.owner:type_name -> pb.ChownOpt
|
||||
42, // 52: pb.FileActionSymlink.owner:type_name -> pb.ChownOpt
|
||||
42, // 53: pb.FileActionMkDir.owner:type_name -> pb.ChownOpt
|
||||
43, // 54: pb.ChownOpt.user:type_name -> pb.UserOpt
|
||||
43, // 55: pb.ChownOpt.group:type_name -> pb.UserOpt
|
||||
44, // 56: pb.UserOpt.byName:type_name -> pb.NamedUserOpt
|
||||
45, // 57: pb.MergeOp.inputs:type_name -> pb.MergeInput
|
||||
47, // 58: pb.DiffOp.lower:type_name -> pb.LowerDiffInput
|
||||
48, // 59: pb.DiffOp.upper:type_name -> pb.UpperDiffInput
|
||||
21, // 60: pb.BuildOp.InputsEntry.value:type_name -> pb.BuildInput
|
||||
24, // 61: pb.Source.LocationsEntry.value:type_name -> pb.Locations
|
||||
22, // 62: pb.Definition.MetadataEntry.value:type_name -> pb.OpMetadata
|
||||
63, // [63:63] is the sub-list for method output_type
|
||||
63, // [63:63] is the sub-list for method input_type
|
||||
63, // [63:63] is the sub-list for extension type_name
|
||||
63, // [63:63] is the sub-list for extension extendee
|
||||
0, // [0:63] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_github_com_moby_buildkit_solver_pb_ops_proto_init() }
|
||||
@@ -3831,15 +4029,16 @@ func file_github_com_moby_buildkit_solver_pb_ops_proto_init() {
|
||||
(*Op_Build)(nil),
|
||||
(*Op_Merge)(nil),
|
||||
(*Op_Diff)(nil),
|
||||
(*Op_Passthrough)(nil),
|
||||
}
|
||||
file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[30].OneofWrappers = []any{
|
||||
file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[31].OneofWrappers = []any{
|
||||
(*FileAction_Copy)(nil),
|
||||
(*FileAction_Mkfile)(nil),
|
||||
(*FileAction_Mkdir)(nil),
|
||||
(*FileAction_Rm)(nil),
|
||||
(*FileAction_Symlink)(nil),
|
||||
}
|
||||
file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[37].OneofWrappers = []any{
|
||||
file_github_com_moby_buildkit_solver_pb_ops_proto_msgTypes[38].OneofWrappers = []any{
|
||||
(*UserOpt_ByName)(nil),
|
||||
(*UserOpt_ByID)(nil),
|
||||
}
|
||||
@@ -3849,7 +4048,7 @@ func file_github_com_moby_buildkit_solver_pb_ops_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc), len(file_github_com_moby_buildkit_solver_pb_ops_proto_rawDesc)),
|
||||
NumEnums: 5,
|
||||
NumMessages: 51,
|
||||
NumMessages: 53,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
+22
@@ -18,6 +18,7 @@ message Op {
|
||||
BuildOp build = 5;
|
||||
MergeOp merge = 6;
|
||||
DiffOp diff = 7;
|
||||
PassthroughOp passthrough = 8;
|
||||
}
|
||||
Platform platform = 10;
|
||||
WorkerConstraints constraints = 11;
|
||||
@@ -82,6 +83,7 @@ enum NetMode {
|
||||
UNSET = 0; // sandbox
|
||||
HOST = 1;
|
||||
NONE = 2;
|
||||
PROXY = 3;
|
||||
}
|
||||
|
||||
enum SecurityMode {
|
||||
@@ -228,6 +230,8 @@ message OpMetadata {
|
||||
map<string, bool> caps = 5;
|
||||
|
||||
ProgressGroup progress_group = 6;
|
||||
|
||||
LinuxResources linux_resources = 7;
|
||||
}
|
||||
|
||||
// Source is a source mapping description for a file
|
||||
@@ -277,6 +281,19 @@ message ProgressGroup {
|
||||
bool weak = 3;
|
||||
}
|
||||
|
||||
// LinuxResources specifies cgroup resource limits for containers.
|
||||
// Used in OpMetadata to set per-step resource constraints without
|
||||
// affecting the cache key.
|
||||
message LinuxResources {
|
||||
int64 memory = 1; // memory limit in bytes
|
||||
int64 memorySwap = 2; // memory+swap limit in bytes
|
||||
uint64 cpuShares = 3; // relative CPU weight
|
||||
uint64 cpuPeriod = 4; // CFS period in microseconds
|
||||
int64 cpuQuota = 5; // CFS quota in microseconds
|
||||
string cpusetCpus = 6; // CPU affinity (e.g., "0-3")
|
||||
string cpusetMems = 7; // memory node affinity (e.g., "0,1")
|
||||
}
|
||||
|
||||
message ProxyEnv {
|
||||
string http_proxy = 1;
|
||||
string https_proxy = 2;
|
||||
@@ -444,3 +461,8 @@ message DiffOp {
|
||||
LowerDiffInput lower = 1;
|
||||
UpperDiffInput upper = 2;
|
||||
}
|
||||
|
||||
message PassthroughOp {
|
||||
string id = 1;
|
||||
repeated int64 outputs = 2;
|
||||
}
|
||||
|
||||
+832
@@ -101,6 +101,15 @@ func (m *Op_Diff) CloneVT() isOp_Op {
|
||||
return r
|
||||
}
|
||||
|
||||
func (m *Op_Passthrough) CloneVT() isOp_Op {
|
||||
if m == nil {
|
||||
return (*Op_Passthrough)(nil)
|
||||
}
|
||||
r := new(Op_Passthrough)
|
||||
r.Passthrough = m.Passthrough.CloneVT()
|
||||
return r
|
||||
}
|
||||
|
||||
func (m *Platform) CloneVT() *Platform {
|
||||
if m == nil {
|
||||
return (*Platform)(nil)
|
||||
@@ -495,6 +504,7 @@ func (m *OpMetadata) CloneVT() *OpMetadata {
|
||||
r.IgnoreCache = m.IgnoreCache
|
||||
r.ExportCache = m.ExportCache.CloneVT()
|
||||
r.ProgressGroup = m.ProgressGroup.CloneVT()
|
||||
r.LinuxResources = m.LinuxResources.CloneVT()
|
||||
if rhs := m.Description; rhs != nil {
|
||||
tmpContainer := make(map[string]string, len(rhs))
|
||||
for k, v := range rhs {
|
||||
@@ -693,6 +703,29 @@ func (m *ProgressGroup) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (m *LinuxResources) CloneVT() *LinuxResources {
|
||||
if m == nil {
|
||||
return (*LinuxResources)(nil)
|
||||
}
|
||||
r := new(LinuxResources)
|
||||
r.Memory = m.Memory
|
||||
r.MemorySwap = m.MemorySwap
|
||||
r.CpuShares = m.CpuShares
|
||||
r.CpuPeriod = m.CpuPeriod
|
||||
r.CpuQuota = m.CpuQuota
|
||||
r.CpusetCpus = m.CpusetCpus
|
||||
r.CpusetMems = m.CpusetMems
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
copy(r.unknownFields, m.unknownFields)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func (m *LinuxResources) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (m *ProxyEnv) CloneVT() *ProxyEnv {
|
||||
if m == nil {
|
||||
return (*ProxyEnv)(nil)
|
||||
@@ -1152,6 +1185,28 @@ func (m *DiffOp) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (m *PassthroughOp) CloneVT() *PassthroughOp {
|
||||
if m == nil {
|
||||
return (*PassthroughOp)(nil)
|
||||
}
|
||||
r := new(PassthroughOp)
|
||||
r.Id = m.Id
|
||||
if rhs := m.Outputs; rhs != nil {
|
||||
tmpContainer := make([]int64, len(rhs))
|
||||
copy(tmpContainer, rhs)
|
||||
r.Outputs = tmpContainer
|
||||
}
|
||||
if len(m.unknownFields) > 0 {
|
||||
r.unknownFields = make([]byte, len(m.unknownFields))
|
||||
copy(r.unknownFields, m.unknownFields)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func (m *PassthroughOp) CloneMessageVT() proto.Message {
|
||||
return m.CloneVT()
|
||||
}
|
||||
|
||||
func (this *Op) EqualVT(that *Op) bool {
|
||||
if this == that {
|
||||
return true
|
||||
@@ -1351,6 +1406,31 @@ func (this *Op_Diff) EqualVT(thatIface isOp_Op) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Op_Passthrough) EqualVT(thatIface isOp_Op) bool {
|
||||
that, ok := thatIface.(*Op_Passthrough)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if this == that {
|
||||
return true
|
||||
}
|
||||
if this == nil && that != nil || this != nil && that == nil {
|
||||
return false
|
||||
}
|
||||
if p, q := this.Passthrough, that.Passthrough; p != q {
|
||||
if p == nil {
|
||||
p = &PassthroughOp{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &PassthroughOp{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Platform) EqualVT(that *Platform) bool {
|
||||
if this == that {
|
||||
return true
|
||||
@@ -1973,6 +2053,9 @@ func (this *OpMetadata) EqualVT(that *OpMetadata) bool {
|
||||
if !this.ProgressGroup.EqualVT(that.ProgressGroup) {
|
||||
return false
|
||||
}
|
||||
if !this.LinuxResources.EqualVT(that.LinuxResources) {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
@@ -2221,6 +2304,43 @@ func (this *ProgressGroup) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *LinuxResources) EqualVT(that *LinuxResources) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Memory != that.Memory {
|
||||
return false
|
||||
}
|
||||
if this.MemorySwap != that.MemorySwap {
|
||||
return false
|
||||
}
|
||||
if this.CpuShares != that.CpuShares {
|
||||
return false
|
||||
}
|
||||
if this.CpuPeriod != that.CpuPeriod {
|
||||
return false
|
||||
}
|
||||
if this.CpuQuota != that.CpuQuota {
|
||||
return false
|
||||
}
|
||||
if this.CpusetCpus != that.CpusetCpus {
|
||||
return false
|
||||
}
|
||||
if this.CpusetMems != that.CpusetMems {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *LinuxResources) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*LinuxResources)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ProxyEnv) EqualVT(that *ProxyEnv) bool {
|
||||
if this == that {
|
||||
return true
|
||||
@@ -2941,6 +3061,34 @@ func (this *DiffOp) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *PassthroughOp) EqualVT(that *PassthroughOp) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Id != that.Id {
|
||||
return false
|
||||
}
|
||||
if len(this.Outputs) != len(that.Outputs) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Outputs {
|
||||
vy := that.Outputs[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *PassthroughOp) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*PassthroughOp)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (m *Op) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
@@ -3153,6 +3301,29 @@ func (m *Op_Diff) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
func (m *Op_Passthrough) MarshalToVT(dAtA []byte) (int, error) {
|
||||
size := m.SizeVT()
|
||||
return m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Op_Passthrough) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
if m.Passthrough != nil {
|
||||
size, err := m.Passthrough.MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
} else {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, 0)
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
func (m *Platform) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
@@ -4270,6 +4441,16 @@ func (m *OpMetadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if m.LinuxResources != nil {
|
||||
size, err := m.LinuxResources.MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.ProgressGroup != nil {
|
||||
size, err := m.ProgressGroup.MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
@@ -4766,6 +4947,78 @@ func (m *ProgressGroup) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *LinuxResources) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
size := m.SizeVT()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *LinuxResources) MarshalToVT(dAtA []byte) (int, error) {
|
||||
size := m.SizeVT()
|
||||
return m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *LinuxResources) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
if m == nil {
|
||||
return 0, nil
|
||||
}
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.unknownFields != nil {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if len(m.CpusetMems) > 0 {
|
||||
i -= len(m.CpusetMems)
|
||||
copy(dAtA[i:], m.CpusetMems)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CpusetMems)))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if len(m.CpusetCpus) > 0 {
|
||||
i -= len(m.CpusetCpus)
|
||||
copy(dAtA[i:], m.CpusetCpus)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CpusetCpus)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if m.CpuQuota != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CpuQuota))
|
||||
i--
|
||||
dAtA[i] = 0x28
|
||||
}
|
||||
if m.CpuPeriod != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CpuPeriod))
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if m.CpuShares != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CpuShares))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.MemorySwap != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemorySwap))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if m.Memory != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Memory))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ProxyEnv) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
@@ -5986,6 +6239,67 @@ func (m *DiffOp) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *PassthroughOp) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
size := m.SizeVT()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *PassthroughOp) MarshalToVT(dAtA []byte) (int, error) {
|
||||
size := m.SizeVT()
|
||||
return m.MarshalToSizedBufferVT(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *PassthroughOp) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
if m == nil {
|
||||
return 0, nil
|
||||
}
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.unknownFields != nil {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if len(m.Outputs) > 0 {
|
||||
var pksize2 int
|
||||
for _, num := range m.Outputs {
|
||||
pksize2 += protohelpers.SizeOfVarint(uint64(num))
|
||||
}
|
||||
i -= pksize2
|
||||
j1 := i
|
||||
for _, num1 := range m.Outputs {
|
||||
num := uint64(num1)
|
||||
for num >= 1<<7 {
|
||||
dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
|
||||
num >>= 7
|
||||
j1++
|
||||
}
|
||||
dAtA[j1] = uint8(num)
|
||||
j1++
|
||||
}
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Id) > 0 {
|
||||
i -= len(m.Id)
|
||||
copy(dAtA[i:], m.Id)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *Op) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -6097,6 +6411,20 @@ func (m *Op_Diff) SizeVT() (n int) {
|
||||
}
|
||||
return n
|
||||
}
|
||||
func (m *Op_Passthrough) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Passthrough != nil {
|
||||
l = m.Passthrough.SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
} else {
|
||||
n += 3
|
||||
}
|
||||
return n
|
||||
}
|
||||
func (m *Platform) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -6565,6 +6893,10 @@ func (m *OpMetadata) SizeVT() (n int) {
|
||||
l = m.ProgressGroup.SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if m.LinuxResources != nil {
|
||||
l = m.LinuxResources.SizeVT()
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
@@ -6727,6 +7059,39 @@ func (m *ProgressGroup) SizeVT() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *LinuxResources) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Memory != 0 {
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(m.Memory))
|
||||
}
|
||||
if m.MemorySwap != 0 {
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(m.MemorySwap))
|
||||
}
|
||||
if m.CpuShares != 0 {
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(m.CpuShares))
|
||||
}
|
||||
if m.CpuPeriod != 0 {
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(m.CpuPeriod))
|
||||
}
|
||||
if m.CpuQuota != 0 {
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(m.CpuQuota))
|
||||
}
|
||||
l = len(m.CpusetCpus)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
l = len(m.CpusetMems)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ProxyEnv) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -7229,6 +7594,27 @@ func (m *DiffOp) SizeVT() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *PassthroughOp) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Id)
|
||||
if l > 0 {
|
||||
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
if len(m.Outputs) > 0 {
|
||||
l = 0
|
||||
for _, e := range m.Outputs {
|
||||
l += protohelpers.SizeOfVarint(uint64(e))
|
||||
}
|
||||
n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Op) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -7538,6 +7924,47 @@ func (m *Op) UnmarshalVT(dAtA []byte) error {
|
||||
m.Op = &Op_Diff{Diff: v}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Passthrough", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if oneof, ok := m.Op.(*Op_Passthrough); ok {
|
||||
if err := oneof.Passthrough.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
v := &PassthroughOp{}
|
||||
if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Op = &Op_Passthrough{Passthrough: v}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
|
||||
@@ -10973,6 +11400,42 @@ func (m *OpMetadata) UnmarshalVT(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LinuxResources", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.LinuxResources == nil {
|
||||
m.LinuxResources = &LinuxResources{}
|
||||
}
|
||||
if err := m.LinuxResources.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
@@ -12001,6 +12464,216 @@ func (m *ProgressGroup) UnmarshalVT(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *LinuxResources) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: LinuxResources: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: LinuxResources: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType)
|
||||
}
|
||||
m.Memory = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Memory |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MemorySwap", wireType)
|
||||
}
|
||||
m.MemorySwap = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.MemorySwap |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CpuShares", wireType)
|
||||
}
|
||||
m.CpuShares = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.CpuShares |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CpuPeriod", wireType)
|
||||
}
|
||||
m.CpuPeriod = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.CpuPeriod |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 5:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CpuQuota", wireType)
|
||||
}
|
||||
m.CpuQuota = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.CpuQuota |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CpusetCpus", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.CpusetCpus = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CpusetMems", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.CpusetMems = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ProxyEnv) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -14814,3 +15487,162 @@ func (m *DiffOp) UnmarshalVT(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *PassthroughOp) UnmarshalVT(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: PassthroughOp: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: PassthroughOp: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Id = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType == 0 {
|
||||
var v int64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Outputs = append(m.Outputs, v)
|
||||
} else if wireType == 2 {
|
||||
var packedLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
packedLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if packedLen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + packedLen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
var elementCount int
|
||||
var count int
|
||||
for _, integer := range dAtA[iNdEx:postIndex] {
|
||||
if integer < 128 {
|
||||
count++
|
||||
}
|
||||
}
|
||||
elementCount = count
|
||||
if elementCount != 0 && len(m.Outputs) == 0 {
|
||||
m.Outputs = make([]int64, 0, elementCount)
|
||||
}
|
||||
for iNdEx < postIndex {
|
||||
var v int64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Outputs = append(m.Outputs, v)
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType)
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/sourcepolicy/pb/policy.proto
|
||||
|
||||
package moby_buildkit_v1_sourcepolicy
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/sourcepolicy/policysession/policysession.proto
|
||||
|
||||
package policysession
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.11.4
|
||||
// - protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/sourcepolicy/policysession/policysession.proto
|
||||
|
||||
package policysession
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/util/apicaps/pb/caps.proto
|
||||
|
||||
package moby_buildkit_v1_apicaps
|
||||
|
||||
+36
-19
@@ -10,39 +10,56 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var appContextCache context.Context
|
||||
var appContextOnce sync.Once
|
||||
|
||||
// Context returns a static context that reacts to termination signals of the
|
||||
// running process. Useful in CLI tools.
|
||||
func Context() context.Context {
|
||||
appContextOnce.Do(func() {
|
||||
initContexts()
|
||||
return appContext
|
||||
}
|
||||
|
||||
// Shutdown returns a static context that closes when multiple interrupt signals
|
||||
// have been received to indicate a faster shutdown. Useful in CLI tools.
|
||||
func Shutdown() context.Context {
|
||||
initContexts()
|
||||
return shutdownContext
|
||||
}
|
||||
|
||||
var (
|
||||
appContext context.Context
|
||||
shutdownContext context.Context
|
||||
initContextsOnce sync.Once
|
||||
)
|
||||
|
||||
func initContexts() {
|
||||
initContextsOnce.Do(func() {
|
||||
signals := make(chan os.Signal, 2048)
|
||||
signal.Notify(signals, terminationSignals...)
|
||||
|
||||
const exitLimit = 3
|
||||
retries := 0
|
||||
|
||||
ctx := context.Background()
|
||||
for _, f := range inits {
|
||||
ctx = f(ctx) //nolint:fatcontext
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancelCause(ctx)
|
||||
appContextCache = ctx //nolint:fatcontext
|
||||
appContext = ctx //nolint:fatcontext
|
||||
|
||||
shutdownCtx, shutdownCancel := context.WithCancelCause(context.Background())
|
||||
shutdownContext = shutdownCtx
|
||||
|
||||
// We just allow this goroutine to be orphaned since program termination
|
||||
// will clean it up.
|
||||
go func() {
|
||||
for {
|
||||
<-signals
|
||||
retries++
|
||||
err := errors.Errorf("got %d SIGTERM/SIGINTs, forcing shutdown", retries)
|
||||
cancel(err)
|
||||
if retries >= exitLimit {
|
||||
bklog.G(ctx).Error(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
<-signals
|
||||
err := errors.New("got SIGTERM/SIGINT, forcing shutdown")
|
||||
cancel(err)
|
||||
|
||||
<-signals
|
||||
err = errors.New("got 2 SIGTERM/SIGINTs, skipping shutdown")
|
||||
shutdownCancel(err)
|
||||
|
||||
<-signals
|
||||
err = errors.New("got 3 SIGTERM/SIGINTs, forcibly terminating")
|
||||
bklog.G(ctx).Fatal(err.Error())
|
||||
}()
|
||||
})
|
||||
return appContextCache
|
||||
}
|
||||
|
||||
+7
-3
@@ -37,11 +37,15 @@ func EnsureUserAddressDir() error {
|
||||
xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR")
|
||||
if xdgRuntimeDir != "" {
|
||||
dirs := strings.Split(xdgRuntimeDir, ":")
|
||||
dir := filepath.Join(dirs[0], "buildkit")
|
||||
if err := os.MkdirAll(dir, 0700); err != nil {
|
||||
root, err := os.OpenRoot(dirs[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Chmod(dir, 0700|os.ModeSticky)
|
||||
defer root.Close()
|
||||
if err := root.MkdirAll("buildkit", 0700); err != nil {
|
||||
return err
|
||||
}
|
||||
return root.Chmod("buildkit", 0700|os.ModeSticky)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,6 +3,7 @@ package contentutil
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -117,8 +118,7 @@ func copyChain(ctx context.Context, ingester content.Ingester, provider content.
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
for i := len(manifestStack) - 1; i >= 0; i-- {
|
||||
desc := manifestStack[i]
|
||||
for _, desc := range slices.Backward(manifestStack) {
|
||||
if err := Copy(ctx, ingester, provider, desc, "", nil); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
// Package cpuset parses and formats cpuset strings like "0-3,5,7-9".
|
||||
package cpuset
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// MaxCPU is the largest CPU/memory-node index Parse accepts. It bounds the set
|
||||
// Parse allocates so an untrusted value like "0-999999999" cannot exhaust memory.
|
||||
const MaxCPU = 8192
|
||||
|
||||
// Parse parses a cpuset string into a set of integers. An empty input returns
|
||||
// an empty set with no error. Elements must be in the range [0, MaxCPU].
|
||||
func Parse(s string) (map[int]struct{}, error) {
|
||||
out := make(map[int]struct{})
|
||||
for part := range strings.SplitSeq(s, ",") {
|
||||
part = strings.TrimSpace(part)
|
||||
if part == "" {
|
||||
continue
|
||||
}
|
||||
lo, hi, found := strings.Cut(part, "-")
|
||||
if !found {
|
||||
n, err := strconv.Atoi(part)
|
||||
if err != nil || n < 0 {
|
||||
return nil, errors.Errorf("invalid cpuset element %q", part)
|
||||
}
|
||||
if n > MaxCPU {
|
||||
return nil, errors.Errorf("cpuset element %q exceeds maximum %d", part, MaxCPU)
|
||||
}
|
||||
out[n] = struct{}{}
|
||||
continue
|
||||
}
|
||||
loN, err1 := strconv.Atoi(strings.TrimSpace(lo))
|
||||
hiN, err2 := strconv.Atoi(strings.TrimSpace(hi))
|
||||
if err1 != nil || err2 != nil || loN < 0 || hiN < loN {
|
||||
return nil, errors.Errorf("invalid cpuset range %q", part)
|
||||
}
|
||||
if hiN > MaxCPU {
|
||||
return nil, errors.Errorf("cpuset range %q exceeds maximum %d", part, MaxCPU)
|
||||
}
|
||||
for i := loN; i <= hiN; i++ {
|
||||
out[i] = struct{}{}
|
||||
}
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Validate returns an error if s is not a syntactically valid cpuset string.
|
||||
// An empty string is valid (means "unset").
|
||||
func Validate(s string) error {
|
||||
_, err := Parse(s)
|
||||
return err
|
||||
}
|
||||
|
||||
// Format emits a sorted, range-collapsed cpuset string from a set.
|
||||
func Format(set map[int]struct{}) string {
|
||||
if len(set) == 0 {
|
||||
return ""
|
||||
}
|
||||
vals := make([]int, 0, len(set))
|
||||
for v := range set {
|
||||
vals = append(vals, v)
|
||||
}
|
||||
slices.Sort(vals)
|
||||
|
||||
var sb strings.Builder
|
||||
i := 0
|
||||
for i < len(vals) {
|
||||
j := i
|
||||
for j+1 < len(vals) && vals[j+1] == vals[j]+1 {
|
||||
j++
|
||||
}
|
||||
if sb.Len() > 0 {
|
||||
sb.WriteByte(',')
|
||||
}
|
||||
if i == j {
|
||||
sb.WriteString(strconv.Itoa(vals[i]))
|
||||
} else {
|
||||
sb.WriteString(strconv.Itoa(vals[i]))
|
||||
sb.WriteByte('-')
|
||||
sb.WriteString(strconv.Itoa(vals[j]))
|
||||
}
|
||||
i = j + 1
|
||||
}
|
||||
return sb.String()
|
||||
}
|
||||
+2
-2
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
|
||||
"github.com/containerd/typeurl/v2"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/moby/buildkit/errdefs"
|
||||
"github.com/moby/buildkit/util/bklog"
|
||||
"github.com/moby/buildkit/util/stack"
|
||||
@@ -14,6 +13,7 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
)
|
||||
|
||||
type TypedError interface {
|
||||
@@ -102,7 +102,7 @@ func withDetails(ctx context.Context, s *status.Status, details ...proto.Message
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.Details = append(p.Details, &any.Any{TypeUrl: url, Value: dt})
|
||||
p.Details = append(p.Details, &anypb.Any{TypeUrl: url, Value: dt})
|
||||
}
|
||||
return status.FromProto(p), nil
|
||||
}
|
||||
|
||||
+4
-4
@@ -47,8 +47,8 @@ type LeaseRef struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func (l *LeaseRef) Discard() error {
|
||||
return l.lm.Delete(context.Background(), l.l)
|
||||
func (l *LeaseRef) Discard(ctx context.Context) error {
|
||||
return l.lm.Delete(context.WithoutCancel(ctx), l.l)
|
||||
}
|
||||
|
||||
func (l *LeaseRef) Adopt(ctx context.Context) error {
|
||||
@@ -73,10 +73,10 @@ func (l *LeaseRef) Adopt(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
if len(l.resources) == 0 {
|
||||
l.Discard()
|
||||
l.Discard(ctx)
|
||||
return nil
|
||||
}
|
||||
go l.Discard()
|
||||
go l.Discard(ctx)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -100,16 +100,16 @@ func (mr *MultiReader) Reader(ctx context.Context) Reader {
|
||||
}()
|
||||
|
||||
if !mr.initialized {
|
||||
go mr.handle()
|
||||
go mr.handle(context.WithoutCancel(ctx))
|
||||
mr.initialized = true
|
||||
}
|
||||
|
||||
return pr
|
||||
}
|
||||
|
||||
func (mr *MultiReader) handle() error {
|
||||
func (mr *MultiReader) handle(ctx context.Context) error {
|
||||
for {
|
||||
p, err := mr.main.Read(context.TODO())
|
||||
p, err := mr.main.Read(ctx)
|
||||
if err != nil {
|
||||
if errors.Is(err, io.EOF) {
|
||||
mr.mu.Lock()
|
||||
|
||||
+21
-10
@@ -46,16 +46,7 @@ func (r *req) acquire(ctx context.Context, desc ocispecs.Descriptor) (context.Co
|
||||
// json request get one additional connection
|
||||
highPriority := strings.HasSuffix(desc.MediaType, "+json")
|
||||
|
||||
r.g.mu.Lock()
|
||||
s, ok := r.g.sem[r.ref]
|
||||
if !ok {
|
||||
s = [2]*semaphore.Weighted{
|
||||
semaphore.NewWeighted(int64(r.g.size)),
|
||||
semaphore.NewWeighted(int64(r.g.size + 1)),
|
||||
}
|
||||
r.g.sem[r.ref] = s
|
||||
}
|
||||
r.g.mu.Unlock()
|
||||
s := r.g.getOrInit(r.ref)
|
||||
if !highPriority {
|
||||
if err := s[0].Acquire(ctx, 1); err != nil {
|
||||
return ctx, nil, err
|
||||
@@ -86,6 +77,26 @@ func (g *Group) req(ref string) *req {
|
||||
return &req{g: g, ref: domain(ref)}
|
||||
}
|
||||
|
||||
func (g *Group) getOrInit(domain string) [2]*semaphore.Weighted {
|
||||
g.mu.Lock()
|
||||
defer g.mu.Unlock()
|
||||
|
||||
s, ok := g.sem[domain]
|
||||
if !ok {
|
||||
s = [2]*semaphore.Weighted{
|
||||
semaphore.NewWeighted(int64(g.size)),
|
||||
semaphore.NewWeighted(int64(g.size + 1)),
|
||||
}
|
||||
g.sem[domain] = s
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// SetMaxConcurrency sets the default maximum concurrency for the default group.
|
||||
func SetMaxConcurrency(size int) {
|
||||
Default = New(size)
|
||||
}
|
||||
|
||||
func (g *Group) WrapFetcher(f remotes.Fetcher, ref string) remotes.Fetcher {
|
||||
return &fetcher{Fetcher: f, req: g.req(ref)}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.11.4
|
||||
// protoc v3.14.0
|
||||
// source: github.com/moby/buildkit/util/stack/stack.proto
|
||||
|
||||
package stack
|
||||
|
||||
+8
-2
@@ -38,7 +38,13 @@ func NewRegistry(dir string) (url string, cl func() error, err error) {
|
||||
dir = tmpdir
|
||||
}
|
||||
|
||||
if _, err := os.Stat(filepath.Join(dir, "config.yaml")); err != nil {
|
||||
root, err := os.OpenRoot(dir)
|
||||
if err != nil {
|
||||
return "", nil, errors.WithStack(err)
|
||||
}
|
||||
defer root.Close()
|
||||
|
||||
if _, err := root.Stat("config.yaml"); err != nil {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
return "", nil, err
|
||||
}
|
||||
@@ -51,7 +57,7 @@ http:
|
||||
addr: 127.0.0.1:0
|
||||
`, filepath.Join(dir, "data"))
|
||||
|
||||
if err := os.WriteFile(filepath.Join(dir, "config.yaml"), []byte(template), 0600); err != nil {
|
||||
if err := root.WriteFile("config.yaml", []byte(template), 0600); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ func resolveDefaultPlatform(ctx context.Context, provider content.Provider, desc
|
||||
if err != nil {
|
||||
return ocispecs.Descriptor{}, err
|
||||
}
|
||||
matcher := platforms.Default()
|
||||
matcher := platforms.OnlyStrict(platforms.DefaultSpec())
|
||||
for _, c := range children {
|
||||
if c.Platform != nil && matcher.Match(*c.Platform) {
|
||||
return c, nil
|
||||
|
||||
+18
-4
@@ -68,18 +68,20 @@ func StartCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) (func() error, error
|
||||
setCmdLogs(cmd, logs)
|
||||
}
|
||||
|
||||
fmt.Fprintf(cmd.Stderr, "> StartCmd %v %+v\n", time.Now(), cmd.String())
|
||||
started := time.Now()
|
||||
fmt.Fprintf(cmd.Stderr, "> StartCmd %v %+v\n", started, cmd.String())
|
||||
|
||||
if err := cmd.Start(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Fprintf(cmd.Stderr, "> started pid=%d %v %+v\n", cmd.Process.Pid, time.Now(), cmd.String())
|
||||
eg, ctx := errgroup.WithContext(context.TODO())
|
||||
|
||||
stopped := make(chan struct{})
|
||||
stop := make(chan struct{})
|
||||
eg.Go(func() error {
|
||||
err := cmd.Wait()
|
||||
fmt.Fprintf(cmd.Stderr, "> stopped %v %+v %v\n", time.Now(), cmd.ProcessState, cmd.ProcessState.ExitCode())
|
||||
fmt.Fprintf(cmd.Stderr, "> stopped %v runtime=%s %+v %v\n", time.Now(), time.Since(started), cmd.ProcessState, cmd.ProcessState.ExitCode())
|
||||
close(stopped)
|
||||
select {
|
||||
case <-stop:
|
||||
@@ -97,6 +99,7 @@ func StartCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) (func() error, error
|
||||
// windows processes not responding to SIGTERM
|
||||
signal := UnixOrWindows(syscall.SIGTERM, syscall.SIGKILL)
|
||||
signalStr := UnixOrWindows("SIGTERM", "SIGKILL")
|
||||
fmt.Fprintf(cmd.Stderr, "> stop requested %v runtime=%s %+v\n", time.Now(), time.Since(started), cmd.String())
|
||||
fmt.Fprintf(cmd.Stderr, "> sending sigterm %v\n", time.Now())
|
||||
fmt.Fprintf(cmd.Stderr, "> sending %s %v\n", signalStr, time.Now())
|
||||
cmd.Process.Signal(signal)
|
||||
@@ -104,6 +107,7 @@ func StartCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) (func() error, error
|
||||
select {
|
||||
case <-stopped:
|
||||
case <-time.After(20 * time.Second):
|
||||
fmt.Fprintf(cmd.Stderr, "> sending SIGKILL %v runtime=%s %+v\n", time.Now(), time.Since(started), cmd.String())
|
||||
cmd.Process.Kill()
|
||||
}
|
||||
}()
|
||||
@@ -123,19 +127,29 @@ func StartCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) (func() error, error
|
||||
func WaitSocket(address string, d time.Duration, cmd *exec.Cmd) error {
|
||||
address = strings.TrimPrefix(address, socketScheme)
|
||||
step := 50 * time.Millisecond
|
||||
started := time.Now()
|
||||
if cmd != nil {
|
||||
fmt.Fprintf(cmd.Stderr, "> waiting for socket %s timeout=%s %v %+v\n", address, d, started, cmd.String())
|
||||
}
|
||||
i := 0
|
||||
var lastErr error
|
||||
for {
|
||||
if cmd != nil && cmd.ProcessState != nil {
|
||||
return errors.Errorf("process exited: %s", cmd.String())
|
||||
return errors.Errorf("process exited while waiting for socket %s after %s: %s", address, time.Since(started), cmd.String())
|
||||
}
|
||||
|
||||
if conn, err := dialPipe(address); err == nil {
|
||||
conn.Close()
|
||||
if cmd != nil {
|
||||
fmt.Fprintf(cmd.Stderr, "> socket ready %s after=%s %v %+v\n", address, time.Since(started), time.Now(), cmd.String())
|
||||
}
|
||||
break
|
||||
} else {
|
||||
lastErr = err
|
||||
}
|
||||
i++
|
||||
if time.Duration(i)*step > d {
|
||||
return errors.Errorf("failed dialing: %s", address)
|
||||
return errors.Errorf("failed dialing socket %s after %s: %v", address, time.Since(started), lastErr)
|
||||
}
|
||||
time.Sleep(step)
|
||||
}
|
||||
|
||||
+7
-5
@@ -8,6 +8,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -102,6 +103,7 @@ func (c *Containerd) New(ctx context.Context, cfg *integration.BackendConfig) (b
|
||||
if err := requireRoot(); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
extraEnv := slices.Clone(c.ExtraEnv)
|
||||
|
||||
deferF := &integration.MultiCloser{}
|
||||
cl = deferF.F()
|
||||
@@ -188,11 +190,11 @@ disabled_plugins = ["io.containerd.grpc.v1.cri"]
|
||||
"CONTAINERD_ROOTLESS_ROOTLESSKIT_NET=host",
|
||||
"CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=none",
|
||||
"CONTAINERD_ROOTLESS_ROOTLESSKIT_FLAGS=--mtu=0",
|
||||
}, c.ExtraEnv...), "containerd-rootless.sh", "-c", configFile)
|
||||
}, extraEnv...), "containerd-rootless.sh", "-c", configFile)
|
||||
}
|
||||
|
||||
cmd := exec.CommandContext(context.TODO(), containerdArgs[0], containerdArgs[1:]...) //nolint:gosec // test utility
|
||||
cmd.Env = append(os.Environ(), c.ExtraEnv...)
|
||||
cmd.Env = append(os.Environ(), extraEnv...)
|
||||
|
||||
ctdStop, err := integration.StartCmd(cmd, cfg.Logs)
|
||||
if err != nil {
|
||||
@@ -217,7 +219,7 @@ disabled_plugins = ["io.containerd.grpc.v1.cri"]
|
||||
buildkitdArgs = append(buildkitdArgs, snBuildkitdArgs...)
|
||||
|
||||
if runtime.GOOS != "windows" && c.Snapshotter != "native" {
|
||||
c.ExtraEnv = append(c.ExtraEnv, "BUILDKIT_DEBUG_FORCE_OVERLAY_DIFF=true")
|
||||
extraEnv = append(extraEnv, "BUILDKIT_DEBUG_FORCE_OVERLAY_DIFF=true")
|
||||
}
|
||||
if rootless {
|
||||
pidStr, err := os.ReadFile(filepath.Join(rootlessKitState, "child_pid"))
|
||||
@@ -232,7 +234,7 @@ disabled_plugins = ["io.containerd.grpc.v1.cri"]
|
||||
"nsenter", "-U", "--preserve-credentials", "-m", "-t", fmt.Sprintf("%d", pid)},
|
||||
append(buildkitdArgs, "--containerd-worker-snapshotter=native")...)
|
||||
}
|
||||
buildkitdSock, debugSock, stop, err := runBuildkitd(cfg, buildkitdArgs, cfg.Logs, c.UID, c.GID, c.ExtraEnv)
|
||||
buildkitdSock, debugSock, stop, err := runBuildkitd(cfg, buildkitdArgs, cfg.Logs, c.UID, c.GID, extraEnv)
|
||||
if err != nil {
|
||||
integration.PrintLogs(cfg.Logs, log.Println)
|
||||
return nil, nil, err
|
||||
@@ -246,7 +248,7 @@ disabled_plugins = ["io.containerd.grpc.v1.cri"]
|
||||
rootless: rootless,
|
||||
netnsDetached: false,
|
||||
snapshotter: c.Snapshotter,
|
||||
extraEnv: c.ExtraEnv,
|
||||
extraEnv: extraEnv,
|
||||
}, cl, nil
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package sequential
|
||||
|
||||
|
||||
+16
-87
@@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package sequential
|
||||
|
||||
import (
|
||||
@@ -6,108 +8,36 @@ import (
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// Create is a copy of [os.Create], modified to use sequential file access.
|
||||
//
|
||||
// It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL]
|
||||
// as implemented in golang. Refer to the [Win32 API documentation] for details
|
||||
// on sequential file access.
|
||||
// It uses the Windows sequential scan file flag. Refer to the [Win32 API
|
||||
// documentation] for details on sequential file access.
|
||||
//
|
||||
// [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN
|
||||
func Create(name string) (*os.File, error) {
|
||||
return openFileSequential(name, windows.O_RDWR|windows.O_CREAT|windows.O_TRUNC)
|
||||
return openFileSequential(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o666)
|
||||
}
|
||||
|
||||
// Open is a copy of [os.Open], modified to use sequential file access.
|
||||
//
|
||||
// It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL]
|
||||
// as implemented in golang. Refer to the [Win32 API documentation] for details
|
||||
// on sequential file access.
|
||||
// It uses the Windows sequential scan file flag. Refer to the [Win32 API
|
||||
// documentation] for details on sequential file access.
|
||||
//
|
||||
// [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN
|
||||
func Open(name string) (*os.File, error) {
|
||||
return openFileSequential(name, windows.O_RDONLY)
|
||||
return openFileSequential(name, os.O_RDONLY, 0)
|
||||
}
|
||||
|
||||
// OpenFile is a copy of [os.OpenFile], modified to use sequential file access.
|
||||
//
|
||||
// It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL]
|
||||
// as implemented in golang. Refer to the [Win32 API documentation] for details
|
||||
// on sequential file access.
|
||||
// It uses the Windows sequential scan file flag. Refer to the [Win32 API
|
||||
// documentation] for details on sequential file access.
|
||||
//
|
||||
// [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN
|
||||
func OpenFile(name string, flag int, _ os.FileMode) (*os.File, error) {
|
||||
return openFileSequential(name, flag)
|
||||
}
|
||||
|
||||
func openFileSequential(name string, flag int) (file *os.File, err error) {
|
||||
if name == "" {
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: windows.ERROR_FILE_NOT_FOUND}
|
||||
}
|
||||
r, e := openSequential(name, flag|windows.O_CLOEXEC)
|
||||
if e != nil {
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: e}
|
||||
}
|
||||
return os.NewFile(uintptr(r), name), nil
|
||||
}
|
||||
|
||||
func makeInheritSa() *windows.SecurityAttributes {
|
||||
var sa windows.SecurityAttributes
|
||||
sa.Length = uint32(unsafe.Sizeof(sa))
|
||||
sa.InheritHandle = 1
|
||||
return &sa
|
||||
}
|
||||
|
||||
func openSequential(path string, mode int) (fd windows.Handle, err error) {
|
||||
if len(path) == 0 {
|
||||
return windows.InvalidHandle, windows.ERROR_FILE_NOT_FOUND
|
||||
}
|
||||
pathp, err := windows.UTF16PtrFromString(path)
|
||||
if err != nil {
|
||||
return windows.InvalidHandle, err
|
||||
}
|
||||
var access uint32
|
||||
switch mode & (windows.O_RDONLY | windows.O_WRONLY | windows.O_RDWR) {
|
||||
case windows.O_RDONLY:
|
||||
access = windows.GENERIC_READ
|
||||
case windows.O_WRONLY:
|
||||
access = windows.GENERIC_WRITE
|
||||
case windows.O_RDWR:
|
||||
access = windows.GENERIC_READ | windows.GENERIC_WRITE
|
||||
}
|
||||
if mode&windows.O_CREAT != 0 {
|
||||
access |= windows.GENERIC_WRITE
|
||||
}
|
||||
if mode&windows.O_APPEND != 0 {
|
||||
access &^= windows.GENERIC_WRITE
|
||||
access |= windows.FILE_APPEND_DATA
|
||||
}
|
||||
sharemode := uint32(windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE)
|
||||
var sa *windows.SecurityAttributes
|
||||
if mode&windows.O_CLOEXEC == 0 {
|
||||
sa = makeInheritSa()
|
||||
}
|
||||
var createmode uint32
|
||||
switch {
|
||||
case mode&(windows.O_CREAT|windows.O_EXCL) == (windows.O_CREAT | windows.O_EXCL):
|
||||
createmode = windows.CREATE_NEW
|
||||
case mode&(windows.O_CREAT|windows.O_TRUNC) == (windows.O_CREAT | windows.O_TRUNC):
|
||||
createmode = windows.CREATE_ALWAYS
|
||||
case mode&windows.O_CREAT == windows.O_CREAT:
|
||||
createmode = windows.OPEN_ALWAYS
|
||||
case mode&windows.O_TRUNC == windows.O_TRUNC:
|
||||
createmode = windows.TRUNCATE_EXISTING
|
||||
default:
|
||||
createmode = windows.OPEN_EXISTING
|
||||
}
|
||||
// Use FILE_FLAG_SEQUENTIAL_SCAN rather than FILE_ATTRIBUTE_NORMAL as implemented in golang.
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN
|
||||
h, e := windows.CreateFile(pathp, access, sharemode, sa, createmode, windows.FILE_FLAG_SEQUENTIAL_SCAN, 0)
|
||||
return h, e
|
||||
func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return openFileSequential(name, flag, perm)
|
||||
}
|
||||
|
||||
// Helpers for CreateTemp
|
||||
@@ -134,9 +64,8 @@ func nextSuffix() string {
|
||||
|
||||
// CreateTemp is a copy of [os.CreateTemp], modified to use sequential file access.
|
||||
//
|
||||
// It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL]
|
||||
// as implemented in golang. Refer to the [Win32 API documentation] for details
|
||||
// on sequential file access.
|
||||
// It uses the Windows sequential scan file flag. Refer to the [Win32 API
|
||||
// documentation] for details on sequential file access.
|
||||
//
|
||||
// [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN
|
||||
func CreateTemp(dir, prefix string) (f *os.File, err error) {
|
||||
@@ -145,9 +74,9 @@ func CreateTemp(dir, prefix string) (f *os.File, err error) {
|
||||
}
|
||||
|
||||
nconflict := 0
|
||||
for i := 0; i < 10000; i++ {
|
||||
for range 10000 {
|
||||
name := filepath.Join(dir, prefix+nextSuffix())
|
||||
f, err = openFileSequential(name, windows.O_RDWR|windows.O_CREAT|windows.O_EXCL)
|
||||
f, err = openFileSequential(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0o600)
|
||||
if os.IsExist(err) {
|
||||
if nconflict++; nconflict > 10 {
|
||||
randmu.Lock()
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//go:build windows && go1.26
|
||||
|
||||
package sequential
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func openFileSequential(name string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return os.OpenFile(name, flag|windows.O_FILE_FLAG_SEQUENTIAL_SCAN, perm)
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
//go:build windows && !go1.26
|
||||
|
||||
package sequential
|
||||
|
||||
import (
|
||||
"os"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func openFileSequential(name string, flag int, _ os.FileMode) (file *os.File, err error) {
|
||||
if name == "" {
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: windows.ERROR_FILE_NOT_FOUND}
|
||||
}
|
||||
r, e := openSequential(name, flag|windows.O_CLOEXEC)
|
||||
if e != nil {
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: e}
|
||||
}
|
||||
return os.NewFile(uintptr(r), name), nil
|
||||
}
|
||||
|
||||
func makeInheritSa() *windows.SecurityAttributes {
|
||||
var sa windows.SecurityAttributes
|
||||
sa.Length = uint32(unsafe.Sizeof(sa))
|
||||
sa.InheritHandle = 1
|
||||
return &sa
|
||||
}
|
||||
|
||||
func openSequential(path string, mode int) (fd windows.Handle, err error) {
|
||||
if len(path) == 0 {
|
||||
return windows.InvalidHandle, windows.ERROR_FILE_NOT_FOUND
|
||||
}
|
||||
pathp, err := windows.UTF16PtrFromString(path)
|
||||
if err != nil {
|
||||
return windows.InvalidHandle, err
|
||||
}
|
||||
var access uint32
|
||||
switch mode & (windows.O_RDONLY | windows.O_WRONLY | windows.O_RDWR) {
|
||||
case windows.O_RDONLY:
|
||||
access = windows.GENERIC_READ
|
||||
case windows.O_WRONLY:
|
||||
access = windows.GENERIC_WRITE
|
||||
case windows.O_RDWR:
|
||||
access = windows.GENERIC_READ | windows.GENERIC_WRITE
|
||||
}
|
||||
if mode&windows.O_CREAT != 0 {
|
||||
access |= windows.GENERIC_WRITE
|
||||
}
|
||||
if mode&windows.O_APPEND != 0 {
|
||||
access &^= windows.GENERIC_WRITE
|
||||
access |= windows.FILE_APPEND_DATA
|
||||
}
|
||||
sharemode := uint32(windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE)
|
||||
var sa *windows.SecurityAttributes
|
||||
if mode&windows.O_CLOEXEC == 0 {
|
||||
sa = makeInheritSa()
|
||||
}
|
||||
var createmode uint32
|
||||
switch {
|
||||
case mode&(windows.O_CREAT|windows.O_EXCL) == (windows.O_CREAT | windows.O_EXCL):
|
||||
createmode = windows.CREATE_NEW
|
||||
case mode&(windows.O_CREAT|windows.O_TRUNC) == (windows.O_CREAT | windows.O_TRUNC):
|
||||
createmode = windows.CREATE_ALWAYS
|
||||
case mode&windows.O_CREAT == windows.O_CREAT:
|
||||
createmode = windows.OPEN_ALWAYS
|
||||
case mode&windows.O_TRUNC == windows.O_TRUNC:
|
||||
createmode = windows.TRUNCATE_EXISTING
|
||||
default:
|
||||
createmode = windows.OPEN_EXISTING
|
||||
}
|
||||
// Use FILE_FLAG_SEQUENTIAL_SCAN rather than FILE_ATTRIBUTE_NORMAL as implemented in golang.
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN
|
||||
h, e := windows.CreateFile(pathp, access, sharemode, sa, createmode, windows.FILE_FLAG_SEQUENTIAL_SCAN, 0)
|
||||
return h, e
|
||||
}
|
||||
Reference in New Issue
Block a user