c8d/history: Fill ID for parents without the label
When choosing the next image, don't reject images without the classic builder parent label. The intention was to *prefer* images them instead of making that a condition. This fixes the ID not being filled for parent images that weren't built with the classic builder. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
29d863d451
commit
cdb44010c9
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ func (i *ImageService) ImageHistory(ctx context.Context, name string) ([]*imaget
|
|||
|
||||
foundNext := false
|
||||
for _, img := range parents {
|
||||
if _, ok := img.Labels[imageLabelClassicBuilderParent]; ok {
|
||||
_, hasLabel := img.Labels[imageLabelClassicBuilderParent]
|
||||
if !foundNext || hasLabel {
|
||||
currentImg = img
|
||||
foundNext = true
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue