Job Shows Failed But Completed
Your job shows "failed" in expanso-cli job list, but the logs show it completed successfully.
Symptoms
expanso-cli job logs j-abc123
# Shows: "Pipeline processed all 10 messages successfully"
expanso-cli job list
# Output: j-abc123 my-batch-job failed
Why This Happens
Pipelines are treated as long-running daemons. When a pipeline with finite input (like generate with count: N or file inputs) finishes processing and exits, the system marks it as "failed" instead of "completed."
This affects any pipeline designed to process a fixed amount of data and exit—batch jobs using generate with a count, file processors, etc.
Verify Actual Success
Check the job logs for successful completion:
expanso-cli job logs <job-id>
Look for messages like "Pipeline processed N messages" or "Input exhausted, shutting down gracefully" with no errors at the end. If the logs show clean completion, your job succeeded despite the status.
This will be addressed in a future release to properly distinguish between batch jobs (finite input) and daemon jobs (long-running).