Skip to content

task run --wait exits 0 when a declared output fails to upload (output_delivery_error) #1143

Closed

Description

@scttfrdmn

Split from #1133.

Found in code while writing the tasks guide for spore-host/spore-host#585 part 3. 2 and 3 come from reading the code; none were run on AWS.

  1. task run --wait exits 0 when a declared output didn't upload.
    • On OUT_RC != 0 the wrapper sets STATE='failed' and RETRY_CLASS=output_delivery_error, but writes "exit_code": $rc, the command's 0 (wrapper.go:328-357).
    • cmd/task.go:658 exits only on rec.ExitCode != 0.
    • task status --check-complete checks the state correctly (:971).
    • So a script that trusts the exit code treats a task with missing outputs as a success.

Gate:

  • (2): for each failure RETRY_CLASS, --wait must exit non-zero.
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions