vendor: update compose to v2.4.1

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2024-10-28 17:26:28 -07:00
parent 181348397c
commit a585faf3d2
25 changed files with 907 additions and 379 deletions

View File

@ -30,6 +30,8 @@ var checks = map[tree.Path]checkerFunc{
"configs.*": checkFileObject("file", "environment", "content"),
"secrets.*": checkFileObject("file", "environment"),
"services.*.develop.watch.*.path": checkPath,
"services.*.deploy.resources.reservations.devices.*": checkDeviceRequest,
"services.*.gpus.*": checkDeviceRequest,
}
func Validate(dict map[string]any) error {
@ -94,3 +96,13 @@ func checkPath(value any, p tree.Path) error {
}
return nil
}
func checkDeviceRequest(value any, p tree.Path) error {
v := value.(map[string]any)
_, hasCount := v["count"]
_, hasIds := v["device_ids"]
if hasCount && hasIds {
return fmt.Errorf(`%s: "count" and "device_ids" attributes are exclusive`, p)
}
return nil
}