mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 13:37:08 +08:00
hack: generate vtproto files for buildx
Integrates vtproto into buildx. The generated files dockerfile has been modified to copy the buildkit equivalent file to ensure files are laid out in the appropriate way for imports. An import has also been included to change the grpc codec to the version in buildkit that supports vtproto. This will allow buildx to utilize the speed and memory improvements from that. Also updates the gc control options for prune. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
10
vendor/github.com/moby/buildkit/solver/pb/caps.go
generated
vendored
10
vendor/github.com/moby/buildkit/solver/pb/caps.go
generated
vendored
@ -67,6 +67,7 @@ const (
|
||||
CapFileCopyIncludeExcludePatterns apicaps.CapID = "file.copy.includeexcludepatterns"
|
||||
CapFileRmNoFollowSymlink apicaps.CapID = "file.rm.nofollowsymlink"
|
||||
CapFileCopyAlwaysReplaceExistingDestPaths apicaps.CapID = "file.copy.alwaysreplaceexistingdestpaths"
|
||||
CapFileCopyModeStringFormat apicaps.CapID = "file.copy.modestring"
|
||||
|
||||
CapConstraints apicaps.CapID = "constraints"
|
||||
CapPlatform apicaps.CapID = "platform"
|
||||
@ -91,6 +92,9 @@ const (
|
||||
CapMultipleExporters apicaps.CapID = "exporter.multiple"
|
||||
|
||||
CapSourcePolicy apicaps.CapID = "source.policy"
|
||||
|
||||
// GC/Prune controls allow MinFreeSpace and MaxUsedSpace to be set
|
||||
CapGCFreeSpaceFilter apicaps.CapID = "gc.freespacefilter"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -488,4 +492,10 @@ func init() {
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapGCFreeSpaceFilter,
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
}
|
||||
|
3
vendor/github.com/moby/buildkit/solver/pb/generate.go
generated
vendored
3
vendor/github.com/moby/buildkit/solver/pb/generate.go
generated
vendored
@ -1,3 +0,0 @@
|
||||
package pb
|
||||
|
||||
//go:generate protoc -I=. -I=../../vendor/ --go_out=paths=source_relative:. ops.proto
|
10
vendor/github.com/moby/buildkit/solver/pb/ops.go
generated
vendored
10
vendor/github.com/moby/buildkit/solver/pb/ops.go
generated
vendored
@ -1,23 +1,21 @@
|
||||
package pb
|
||||
|
||||
import proto "google.golang.org/protobuf/proto"
|
||||
|
||||
func (m *Definition) IsNil() bool {
|
||||
return m == nil || m.Metadata == nil
|
||||
}
|
||||
|
||||
func (m *Definition) Marshal() ([]byte, error) {
|
||||
return proto.Marshal(m)
|
||||
return m.MarshalVT()
|
||||
}
|
||||
|
||||
func (m *Definition) Unmarshal(dAtA []byte) error {
|
||||
return proto.Unmarshal(dAtA, m)
|
||||
return m.UnmarshalVT(dAtA)
|
||||
}
|
||||
|
||||
func (m *Op) Marshal() ([]byte, error) {
|
||||
return proto.Marshal(m)
|
||||
return m.MarshalVT()
|
||||
}
|
||||
|
||||
func (m *Op) Unmarshal(dAtA []byte) error {
|
||||
return proto.Unmarshal(dAtA, m)
|
||||
return m.UnmarshalVT(dAtA)
|
||||
}
|
||||
|
1214
vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
generated
vendored
1214
vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/github.com/moby/buildkit/solver/pb/ops.proto
generated
vendored
2
vendor/github.com/moby/buildkit/solver/pb/ops.proto
generated
vendored
@ -341,6 +341,8 @@ message FileActionCopy {
|
||||
repeated string exclude_patterns = 13;
|
||||
// alwaysReplaceExistingDestPaths results in an existing dest path that differs in type from the src path being replaced rather than the default of returning an error
|
||||
bool alwaysReplaceExistingDestPaths = 14;
|
||||
// mode in non-octal format
|
||||
string modeStr = 15;
|
||||
}
|
||||
|
||||
message FileActionMkFile {
|
||||
|
14050
vendor/github.com/moby/buildkit/solver/pb/ops_vtproto.pb.go
generated
vendored
Normal file
14050
vendor/github.com/moby/buildkit/solver/pb/ops_vtproto.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user