compose/pkg/e2e/testdata/TestRunJobDependsOnManualFalseJob/compose.yaml
Nicolas De Loof 56bc854f37 fix(run): manual: false also blocks a job pulled in transitively
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>
2026-09-21 16:35:20 +02:00

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