mirror of
https://github.com/docker/compose.git
synced 2026-11-18 06:07:53 +00:00
materializeJobClosure walked job-typed depends_on edges without re-checking triggers.manual: false on anything but the top-level run target, so `docker compose run A` where A depends_on job B (manual: false) silently ran B anyway. manual: false declares a job harmful to trigger outside its schedule; depends_on doesn't change who caused the execution or when -- pulling B in to satisfy A's dependency is still the run command causing that out-of-schedule execution, one hop removed. Refuse it the same way the top-level check already does, before anything in the closure is created. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
23 lines
463 B
YAML
23 lines
463 B
YAML
services:
|
|
db:
|
|
image: alpine
|
|
init: true
|
|
command: sleep infinity
|
|
jobs:
|
|
sensitive:
|
|
image: alpine
|
|
command: sh -c 'echo "sensitive ran"'
|
|
triggers:
|
|
manual: false
|
|
schedule:
|
|
- cron: "0 3 * * *"
|
|
deploy:
|
|
image: alpine
|
|
command: sh -c 'echo "deploy done"'
|
|
triggers:
|
|
manual: true
|
|
depends_on:
|
|
db:
|
|
condition: service_started
|
|
sensitive:
|
|
condition: service_completed_successfully
|