process-compose icon indicating copy to clipboard operation
process-compose copied to clipboard

depends_on: process_completed_successfully is not checked if dependency is disabled

Open teto opened this issue 1 year ago • 0 comments

Defect

Make sure that these boxes are checked before submitting your issue -- thank you!

  • [x] Included the relevant configuration snippet
  • [x] Included the relevant process-compose log (log location: process-compose info)
  • [x] Included a [Minimal, Complete, and Verifiable example] (https://stackoverflow.com/help/mcve)

Version of process-compose:

0.88

OS environment:

nixos

Steps or code to reproduce the issue:

# doc at https://f1bonacc1.github.io/process-compose/configuration/
#
is_strict: true

processes:
  test:
    command: |
      echo "TOTO"
      sleep 40
    depends_on:
      runtrial:
        # condition: toto # this is accepted and doesn't trigger any error even though
        condition: process_completed_successfully

  # one shot task, hence why we disable it now
  runtrial:
    namespace: task
    disabled: true
    command:
      echo "TRIAL DONE"

Expected result:

All process stopped, not started yet. But "test" starts anyway, even though "runtrial" is manual and not started.

Also it seems I can pass any value in condition even under strict mode without PC complaining, which was surprising. I would much prefer an error than silent discard of the condition.

Actual result:

"test" starts rightaway, it doesn't wait for runtriall. Even with condition: toto it starts rightaway.

Logs (process-compose is not talkative):

➜ cat /tmp/process-compose-teto.log
24-03-22 18:04:04.335 INF Process Compose v0.88.0

teto avatar Mar 22 '24 17:03 teto