vendor: update buildkit to master@9624ab4

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-12-05 17:01:03 +01:00
parent b06eaffeeb
commit f451b455c4
106 changed files with 6025 additions and 861 deletions

View File

@ -41,16 +41,18 @@ func (r *Result[T]) AddRef(k string, ref T) {
func (r *Result[T]) AddAttestation(k string, v Attestation, ref T) {
r.mu.Lock()
if r.Refs == nil {
r.Refs = map[string]T{}
if reflect.ValueOf(ref).IsValid() {
if r.Refs == nil {
r.Refs = map[string]T{}
}
if !strings.HasPrefix(v.Ref, attestationRefPrefix) {
v.Ref = attestationRefPrefix + identity.NewID()
r.Refs[v.Ref] = ref
}
}
if r.Attestations == nil {
r.Attestations = map[string][]Attestation{}
}
if v.ContentFunc == nil && !strings.HasPrefix(v.Ref, attestationRefPrefix) {
v.Ref = "attestation:" + identity.NewID()
r.Refs[v.Ref] = ref
}
r.Attestations[k] = append(r.Attestations[k], v)
r.mu.Unlock()
}