W-23599683: Stop double-zipping single-file upload artifacts - #145
Merged
Conversation
actions/upload-artifact always wraps its payload in a .zip, so uploading an already-compressed file (the CLI distro .zip, the Python .whl, the Node .tgz) produced a .zip-containing-that-file — a redundant outer archive. v7.0.0 added an `archive: false` input that uploads a single file as-is. Bump all four upload steps to @v7.0.1 and set archive:false on the three single-file artifacts. Under archive:false the `name:` input is ignored and the file's own name becomes the artifact name, so: - CLI distro and Python wheel are already OS-unique (script_name / platform tag in the filename) — `name:` dropped, no collision. - npm pack emits an identical dataweave-native-0.0.1.tgz on every OS, which would collide across the matrix; a staging step copies it to an OS-qualified name first. The dwlib step uploads multiple files (archive:false allows only one), so it stays archived — bumped to v7.0.1 for version consistency, behavior unchanged. Release assets (release.yml, svenstaro/upload-release-action) are a separate path and unaffected. No download-artifact consumers depend on the old artifact names; the only visible change is the artifact labels in the Actions UI now match the uploaded file names. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
martincousido
approved these changes
Jul 28, 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.
Problem
actions/upload-artifactalways wraps whatever you give it in a.zip. Three of our upload steps hand it a file that's already an archive — the CLI distro.zip, the Python.whl, and the Node.tgz— so the downloaded artifact is a.zipcontaining that file. A consumer has to unzip once just to reach the real distributable (and the outer zip adds no compression on already-compressed input).Fix
actions/upload-artifact@v7.0.0added anarchive: falseinput that uploads a single file as-is. This PR:main.yml+ci.yml) from@v4→@v7.0.1.archive: falseon the three single-file artifacts (CLI distro, Python wheel, Node package)..dylib/.so/.dll/.h) andarchive: falsepermits only one. It's bumped to@v7.0.1for version consistency; behavior is unchanged (v7 defaults toarchive: true).Naming caveat handled
Under
archive: falsethename:input is ignored — the uploaded file's own name becomes the artifact name. That's fine for two of the three because their filenames are already OS-unique:${matrix.script_name}(…-linux.zip/…-windows.zip).manylinux2014_*/win_amd64).But
npm packemits an identicaldataweave-native-0.0.1.tgzon every OS, which would collide across the matrix (v4+ artifacts are immutable — the second upload errors). A small staging step copies it to an OS-qualified name (dataweave-native-0.0.1-${{ runner.os }}.tgz) before upload.The now-ignored
name:inputs on the two safe steps were removed so the config isn't misleading.Blast radius
release.ymlusessvenstaro/upload-release-action(a different mechanism with honoredasset_name:and no zipping) — notupload-artifact.download-artifactconsumers depend on the olddw-…artifact names (grepped.github/).native-cli-100.100.100-native-distro-linux.zipinstead ofdw-100.100.100-Linux).Testing
main.ymlandci.ymlvalidated as well-formed YAML. This is CI-runner-only behavior, so it can't be exercised locally — worth watching the first master run to confirm the new artifact shapes and that no immutability/name error fires.Note on the v4→v7 bump
This crosses breaking changes (artifact immutability landed in v4, other changes through v5–v7). Our artifact names are already unique per OS/version, so no known conflict — but flagging it since it's a 3-major jump. Pinned to
@v7.0.1rather than a floating@v7.🤖 Generated with Claude Code