Skip to content

Commit ab4de41

Browse files
committed
Address comments from Daniel, move the schema change to v3.4.
Signed-off-by: Liping Xue <lipingxue@gmail.com>
1 parent 0272f21 commit ab4de41

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

cli/compose/loader/full-example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "3.3"
1+
version: "3.4"
22

33
services:
44
foo:

cli/compose/loader/loader.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,11 @@ func LoadVolumes(source map[string]interface{}) (map[string]types.VolumeConfig,
445445
volume.External.Name = name
446446
volumes[name] = volume
447447
} else {
448-
logrus.Warnf("invalid to specify name for external volume: %s", volume.External.Name)
448+
logrus.Warnf("volume %s: volume.external.name is deprecated, please use volume.name", name)
449+
450+
if volume.Name != "" {
451+
return nil, errors.Errorf("volume %s: volume.external.name and volume.name conflict, only use volume.name", name)
452+
}
449453
}
450454
}
451455
}

0 commit comments

Comments
 (0)