Skip to content

Multi-line recipes run under bash -c with no set -e, so a mid-recipe failure can be recorded as success #206

Description

@cailmdaley

lc executes a recipe as bash -c <recipe> with no set -e (worker.py:56, boundary.py:168-170), so a multi-line command: | block returns the exit status of its last line:

recipe:
  command: |
    python scripts/compute.py --out {output}
    rm -rf $SCRATCH/tmp

If the compute step crashes but the cleanup succeeds, the recipe exits 0. The declared-output existence check catches most such cases, but a file created and then truncated by the crash (e.g. an interrupted np.savez) is committed as a valid artifact with no error anywhere.

This was written by Claude on behalf of Cail.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions