vendor: update buildkit to 93b40706a007

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2022-12-13 11:03:53 +00:00
parent 5f4d463780
commit 163712a23b
26 changed files with 934 additions and 471 deletions

View File

@ -6,7 +6,7 @@ import (
"github.com/pkg/errors"
)
func AttestationToPB(a *result.Attestation) (*pb.Attestation, error) {
func AttestationToPB[T any](a *result.Attestation[T]) (*pb.Attestation, error) {
if a.ContentFunc != nil {
return nil, errors.Errorf("attestation callback cannot be sent through gateway")
}
@ -22,14 +22,14 @@ func AttestationToPB(a *result.Attestation) (*pb.Attestation, error) {
return &pb.Attestation{
Kind: a.Kind,
Metadata: a.Metadata,
Path: a.Path,
Ref: a.Ref,
InTotoPredicateType: a.InToto.PredicateType,
InTotoSubjects: subjects,
}, nil
}
func AttestationFromPB(a *pb.Attestation) (*result.Attestation, error) {
func AttestationFromPB[T any](a *pb.Attestation) (*result.Attestation[T], error) {
subjects := make([]result.InTotoSubject, len(a.InTotoSubjects))
for i, subject := range a.InTotoSubjects {
subjects[i] = result.InTotoSubject{
@ -39,10 +39,10 @@ func AttestationFromPB(a *pb.Attestation) (*result.Attestation, error) {
}
}
return &result.Attestation{
Kind: a.Kind,
Path: a.Path,
Ref: a.Ref,
return &result.Attestation[T]{
Kind: a.Kind,
Metadata: a.Metadata,
Path: a.Path,
InToto: result.InTotoAttestation{
PredicateType: a.InTotoPredicateType,
Subjects: subjects,

View File

@ -16,6 +16,8 @@ import (
type Result = result.Result[Reference]
type Attestation = result.Attestation[Reference]
type BuildFunc func(context.Context, Client) (*Result, error)
func NewResult() *Result {
@ -73,6 +75,8 @@ type StartRequest struct {
Stdin io.ReadCloser
Stdout, Stderr io.WriteCloser
SecurityMode pb.SecurityMode
RemoveMountStubsRecursive bool
}
// WinSize is same as executor.WinSize, copied here to prevent circular package