Skip to content

A directory input whose S3 prefix doesn't exist stages as an empty directory, silently masking a broken task dependency #1207

Closed

Description

@scttfrdmn

What happened (spawn 0.135.1): task B's TaskSpec had a directory input s3://…/runs-x86_64/zarr-dask-real/ncref/ (trailing /, so stage-in uses --recursive per pkg/taskproto/wrapper.go recursiveFlag, ~L626). That prefix is written by task A. Task A's launch had failed with InsufficientInstanceCapacity, so the prefix didn't exist yet.

Task B launched anyway. aws s3 cp --recursive of a non-existent prefix copies nothing and exits 0, so stage-in reported success and B started with an empty input directory. B died much later at open('ref.json'), after paying for boot and its other inputs. Nothing in the stage-in phase said an input was missing.

A single-object input that doesn't exist fails stage-in; a directory input doesn't. So a broken dependency chain (A failed, then B ran on nothing) surfaces as a confusing late error inside the user's command, or worse, as a green run if the command tolerates an empty directory.

Suggestion: when stage-in of a /-terminated input copies zero objects, fail the task in stage-in with a clear message (input s3://… is an empty or missing prefix). If an empty directory is legitimately wanted, an opt-in field such as allow_empty: true would cover it.

Found in scientific-codes-cookbook measurements/zarr-dask-real; the task's own check caught it this time.

Activity

  1. added a commit that references this issue on Oct 24, 2026
    e026fb1
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