Skip to content

Stop giving pipeline stage commands the deprecated result_s3_bucket location (#1013) - #1016

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/1013
Oct 17, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/1013

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes #1013

Stacked on #1012 (fix/989), itself on #988 → #980 → #972 → #957 → #942 → #931. Review and merge after #1012; the diff here is only the commit on top of it.

What

The orchestrator's stage user data no longer exports SPAWN_RESULT_S3_BUCKET and SPAWN_RESULT_S3_PREFIX. They carried the deprecated result_s3_bucket/result_s3_prefix (#989). The stage's instance profile (pipeline.StageDataPolicy) grants only s3_bucket/<s3_prefix>/*, so a command that wrote there got AccessDenied, and spawn pipeline collect no longer reads them anyway.

I removed them rather than exporting them empty. Nothing in the repo reads them: not the stage runner (pkg/pipeline/stage_runner.go passes os.Environ() plus SPAWN_PIPELINE_ID/STAGE_ID/STAGE_INDEX), not the examples, not the docs. They were never documented as part of the stage environment. validate, launch and collect already warn when a definition sets the fields (#1012). ResultS3Bucket/ResultS3Prefix stay on PipelineState so records in flight still decode.

Test

TestStageCommandIsNotGivenTheDeprecatedResultLocation runs the real user data under the existing fakes, with a state that sets result_s3_bucket/prefix. Its fake spored dumps the environment that the real runner hands to the command, and the test asserts that no SPAWN_RESULT_S3_* assignment appears. SPAWN_S3_BUCKET=bkt is checked as a control, which shows the dump itself works. With the old exports restored (a revert that compiles), the test fails with ["SPAWN_RESULT_S3_BUCKET=results-bkt" "SPAWN_RESULT_S3_PREFIX=results/pfx"].

make check: everything passes except TestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker, which is the known Docker-only failure (no Docker on this machine). make check-nested: all 9 modules clean. Semgrep (--config=auto) on the changed files: 0 findings.

Deploy

The spawn-pipeline-orchestrator Lambda has to be redeployed for this to take effect. The user data is generated in the Lambda, so stages launched by the deployed function keep getting the variables until then. No AWS resources were touched for this PR.

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 9235434 into main Oct 17, 2026
8 checks passed
@scttfrdmn
scttfrdmn deleted the fix/1013 branch October 17, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipeline stage user data still exports SPAWN_RESULT_S3_BUCKET/PREFIX, a location the stage cannot write

1 participant