vendor: docker v20.10.3-0.20220826112928-d2590dc3cd4f (22.06 branch)

- moby: a60b458179...d2590dc3cd
- swarmkit: 6068d1894d...48dd89375d

The .Parent field for buildcache entries was deprecated, and replaced with a
.Parents (plural) field. This patch updates the code accordingly. Unlike the
change in buildx
9c3be32bc9
we continue to fall back to the old field (which will be set on older API
versions).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-08-20 17:11:54 +02:00
parent b105b22f1e
commit 948482b778
13 changed files with 531 additions and 442 deletions

View File

@ -124,10 +124,16 @@ func (c *buildCacheContext) ID() string {
}
func (c *buildCacheContext) Parent() string {
if c.trunc {
return stringid.TruncateID(c.v.Parent)
var parent string
if len(c.v.Parents) > 0 {
parent = strings.Join(c.v.Parents, ", ")
} else {
parent = c.v.Parent //nolint:staticcheck // Ignore SA1019: Field was deprecated in API v1.42, but kept for backward compatibility
}
return c.v.Parent
if c.trunc {
return stringid.TruncateID(parent)
}
return parent
}
func (c *buildCacheContext) CacheType() string {