You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spawn pipeline collect reads result_s3_bucket, which nothing writes, and collects only the first 1000 objects #989
Found while fixing #943/#944 (PRs #972, #980). Found by reading runCollectPipeline in cmd/pipeline.go on branch fix/956; not reproduced against AWS.
1. collect reads result_s3_bucket, which nothing writes.runCollectPipeline uses state.ResultS3Bucket/ResultS3Prefix when they are set, and falls back to the stage outputs (<s3_prefix>/stages, or the run's prefix after #943) only when they are empty. Nothing in the pipeline path writes to the result bucket:
grep -rn 'ResultS3' --include='*.go' finds it only in the record, the CLI's read, and two export SPAWN_RESULT_S3_* lines in the stage user data.
The stage runner uploads data_output to s3_bucket only.
The stage instance profile (pipeline.StageDataPolicy) grants s3_bucket/<s3_prefix>/* only, so a stage command could not write the result bucket even if it tried.
examples/pipelines/ml-training.json, fanout-fanin.json and video-streaming.json all set result_s3_bucket. So spawn pipeline collect <id> on any of them lists an empty location and prints "No results found", although the outputs are in s3_bucket.
2. Only the first 1000 objects are collected.runCollectPipeline makes one ListObjectsV2 call with no pagination. A pipeline with more outputs is truncated silently. The command still prints "✅ Downloaded N files".
Smaller, same function:
It downloads the COMPLETE/FAILED markers as if they were results.
It builds the local path as <output-dir>/<full S3 key>, without checking that the key stays inside the directory.
Suggested:
Either copy the final stages' outputs to result_s3_bucket/result_s3_prefix at the end of the run (the orchestrator, or the runner with a grant on that location), or have collect read the stage outputs and drop the field. Whichever is chosen, document it in examples/pipelines/README.md.
Paginate the listing (s3.NewListObjectsV2Paginator).
Activity
Collect the run's stage outputs, paginate, skip markers, refuse keys …
Collect the run's stage outputs, paginate, skip markers, refuse keys …
Collect the run's stage outputs, paginate, skip markers, refuse keys …