fix(safeoutputs): send Content-Range header for pipeline artifact uploads#467
Merged
jamesadevine merged 2 commits intoMay 8, 2026
Merged
Conversation
…oads Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/b0921baa-78d0-4d95-909b-fb91c604e2d6 Co-authored-by: jamesadevine <[email protected]>
Copilot
AI
changed the title
[WIP] Fix upload-pipeline-artifact safe output HTTP 400 error
fix(safeoutputs): send Content-Range header for pipeline artifact uploads
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Azure DevOps File Container API rejects every
upload-pipeline-artifactPUT withHTTP 400: Content-Range header not understood.because the header is required on all uploads — including single-chunk ones — and ado-aw wasn't sending it.Summary
Content-Range: bytes 0-{N-1}/{N}on the container PUT insrc/safeoutputs/upload_pipeline_artifact.rs(andbytes */0for zero-byte files, matching the form ADO's own clients send).format_content_range(file_size)helper to keep the upload site readable and unit-testable.Test plan
test_format_content_rangecovers 0, 1, 12, and 1024-byte payloads.cargo test --bin ado-aw upload_pipeline_artifact— all 26 tests pass.