You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Volumes of jobs and pre_start hooks are not checked: undefined named volumes and duplicate targets load silently #982
This issue was filed by an AI agent on a human's behalf. The human submitter may not have independently verified the report.
Problem
The consistency checks of the loader on the volumes of a service are not applied to the volumes of the jobs and of the pre_start hooks, which are containers with the same volumes attribute.
services:
a:
image: alpinevolumes: [nope:/d] # rejected: service "a" refers to undefined volume nopepre_start:
- image: alpinevolumes: [nope:/d] # loads without errorjobs:
j:
image: alpinetriggers: {manual: true}volumes: [nope:/d] # loads without error
The same goes for two entries with the same target in the volumes of a hook: the project loads, with both entries, whereas the "target already mounted" check of loader/validate.go rejects it for a service (the engine then fails at container creation instead).
Where
loader/validate.go, checkConsistency: the undefined volume and the duplicate target checks only run in the project.Services loop.
Expected
The same checks for the volumes of jobs and hooks, so that an invalid configuration is rejected when it is loaded. The mounts attribute proposed in #979 follows volumes here, and would benefit from the same fix.
Activity