Skip to content

W-23599683: Stop double-zipping single-file upload artifacts - #145

Merged
mlischetti merged 1 commit into
masterfrom
ci/upload-artifact-no-double-zip
Jul 28, 2026
Merged

W-23599683: Stop double-zipping single-file upload artifacts#145
mlischetti merged 1 commit into
masterfrom
ci/upload-artifact-no-double-zip

Conversation

@mlischetti

Copy link
Copy Markdown
Contributor

Problem

actions/upload-artifact always 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 .zip containing 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.0 added an archive: false input that uploads a single file as-is. This PR:

  • Bumps all four upload steps (main.yml + ci.yml) from @v4@v7.0.1.
  • Sets archive: false on the three single-file artifacts (CLI distro, Python wheel, Node package).
  • Leaves the dwlib step archived — it uploads 4 files (.dylib/.so/.dll/.h) and archive: false permits only one. It's bumped to @v7.0.1 for version consistency; behavior is unchanged (v7 defaults to archive: true).

Naming caveat handled

Under archive: false the name: 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:

  • CLI distro — filename carries ${matrix.script_name} (…-linux.zip / …-windows.zip).
  • Python wheel — filename carries the platform tag (manylinux2014_* / win_amd64).

But npm pack emits an identical dataweave-native-0.0.1.tgz on 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 assets are unaffected. release.yml uses svenstaro/upload-release-action (a different mechanism with honored asset_name: and no zipping) — not upload-artifact.
  • No download-artifact consumers depend on the old dw-… artifact names (grepped .github/).
  • Only visible change: artifact labels in the Actions UI now match the uploaded file names (e.g. native-cli-100.100.100-native-distro-linux.zip instead of dw-100.100.100-Linux).

Testing

main.yml and ci.yml validated 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.1 rather than a floating @v7.

🤖 Generated with Claude Code

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>
@mlischetti
mlischetti requested a review from a team as a code owner July 28, 2026 19:21
@mlischetti mlischetti changed the title ci: stop double-zipping single-file upload artifacts W-23599683: Stop double-zipping single-file upload artifacts Jul 28, 2026
@mlischetti
mlischetti merged commit 6c9cf45 into master Jul 28, 2026
3 checks passed
@mlischetti
mlischetti deleted the ci/upload-artifact-no-double-zip branch July 28, 2026 19:42
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.

2 participants