Skip to content

[bug] (v4) Unable to upload to same artifact name from multiple jobs #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DanTup opened this issue Dec 18, 2023 · 52 comments
Closed

[bug] (v4) Unable to upload to same artifact name from multiple jobs #478

DanTup opened this issue Dec 18, 2023 · 52 comments
Labels
bug Something isn't working

Comments

@DanTup
Copy link

DanTup commented Dec 18, 2023

(Edit: There are solutions posted in this thread such as at #478 (comment), #478 (comment), #478 (comment))


What happened?

The PR from dependabot to upgrade to v4 is failing on my project with this error:

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

It seems like this is a breaking change that wasn't mentioned in the changelog and I'm not sure if it was deliberate.

There's some discussion about this behaviour in #279 and it suggests that it was fine to do this and there wouldn't be issues as long as the filenames within the artifact are unique. This was convenient to bundle the logs from several shards together into a single artifact rather than having lots of individual zip files to download.

What did you expect to happen?

I expected everything to work the same as in v3 unless it was noted as a deliberate breaking change.

How can we reproduce it?

Create multiple jobs that upload artifacts with the same name (but the files from each job are uniquely named).

Anything else we need to know?

No response

What version of the action are you using?

v4.0.0

What are your runner environments?

linux, window, macos

Are you on GitHub Enterprise Server? If so, what version?

No response

@DanTup DanTup added the bug Something isn't working label Dec 18, 2023
@DanTup
Copy link
Author

DanTup commented Dec 18, 2023

Actually, it seems this is called out here:

https://github.com/actions/upload-artifact?tab=readme-ov-file#v4---whats-new:~:text=The%20contents%20of%20an%20Artifact%20are%20uploaded%20together%20into%20an%20immutable%20archive.%20They%20cannot%20be%20altered%20by%20subsequent%20jobs.%20Both%20of%20these%20factors%20help%20reduce%20the%20possibility%20of%20accidentally%20corrupting%20Artifact%20files.

The contents of an Artifact are uploaded together into an immutable archive. They cannot be altered by subsequent jobs. Both of these factors help reduce the possibility of accidentally corrupting Artifact files.

It just wasn't included in the "What's changed" section of the Dependabot release notes because it just has a summary saying "Lots has changed". I should've followed the link through.

Seems like this is certainly intended though.

@RobertoPrevato
Copy link

RobertoPrevato commented Dec 31, 2023

Well, this is a bad news for me. I find convenient to use the upload-artifact to write different files to the same folder in a build matrix. For example to compile custom C extensions for several combinations of Python versions and operating systems, and publishing to a single folder.

like in https://github.com/Neoteroi/BlackSheep/actions/runs/7370452109/job/20056867940

Now if I want to upgrade my workflow, I need to publish to different folders and download artifacts from multiple sources - making the workflow look like a mess compared to how clean it used to look like. For now I stay with v3 and I hope this will be reconsidered in a future version of these actions.

@DanTup
Copy link
Author

DanTup commented Dec 31, 2023

Yeah, I rolled back to v3 too. Until I'm forced to upgrade, the old way is much more convenient for me.

Kontinuation referenced this issue in apache/sedona Jan 2, 2024
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
syoyo added a commit to lighttransport/jagger-python that referenced this issue Jan 2, 2024
semenko added a commit to mcwdsi/bam2tensor that referenced this issue Jan 3, 2024
Rixxan added a commit to EDCD/EDMarketConnector that referenced this issue Jan 4, 2024
github-merge-queue bot pushed a commit to onnx/onnx that referenced this issue Jan 5, 2024
@seanvaleo
Copy link

I had to roll back also

@ptr727
Copy link

ptr727 commented Jan 6, 2024

Same here, I also use a matrix to build multi platform releases in the same directory, and then zipping them all together, rolling back to v3 :(

@DanTup
Copy link
Author

DanTup commented Jan 6, 2024

Seems like a lot of people have been bitten by this, so although it appears to have been deliberate I'm re-opening for better visibility to see if the authors want to chime in (of course, it's very possible it may just be closed as WAI).

@DanTup DanTup reopened this Jan 6, 2024
flozz added a commit to wanadev/yoga that referenced this issue Jan 6, 2024
dvarrazzo added a commit to psycopg/psycopg that referenced this issue Jan 7, 2024
@awhisler
Copy link

What is the solution? I have always had this:
Image

And v4 is throwing this error:
Image

But the name is not duplicated...
Image

@jsoref
Copy link

jsoref commented Jan 17, 2025

@awhisler: your matrix appears to have an overlap. That means that one of the other items in the matrix has the same value -- and that is the one that managed to produce an artifact. If you want help, you'd need to provide the workflow.

edegp pushed a commit to edegp/streamlit that referenced this issue Jan 19, 2025
## Describe your changes

Update our GitHub actions versions to fix the deprecation warning.

With `actions/upload-artifact@v4`, multiple jobs cannot upload to the
same folder anymore. Hence, I have updated the flows according to [this
migration
guide](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact).
See also this discussion:
actions/upload-artifact#478

The workflows for cypress are kept on `v3` according to [this
comment](streamlit#8689 (review))
to keep the usage of it simple until we retire it soonish.

## GitHub Issue Link (if applicable)

## Testing Plan

- if the CI workflows run through, we should be all good

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
tsutterley added a commit to pyTMD/pyTMD that referenced this issue Feb 1, 2025
ci: adjust coverage report name for v4 artifact bug

  actions/upload-artifact#478
tsutterley added a commit to pyTMD/pyTMD that referenced this issue Feb 1, 2025
ci: adjust coverage report name for v4 artifact bug

actions/upload-artifact#478
ZeroIntensity added a commit to ZeroIntensity/pyawaitable that referenced this issue Feb 10, 2025
For whatever reason, v4 breaks the upload job now. See
actions/upload-artifact#478. I'm just going to
roll it back for the time being and retry the 1.4.0 release.
PeterKnecht93 added a commit to FreshROMs/android_kernel_samsung_exynos9610_mint that referenced this issue Feb 15, 2025
Complete rework of our workflows to account for actions/upload-artifact#478.

Signed-off-by: Louis Poier <[email protected]>
tkralphs added a commit to lauracosgrove/homebrew-coinor that referenced this issue Feb 16, 2025
@abelbraaksma
Copy link

Unfortunately, we cannot use v3 anymore at all... See https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

You'd see the following error:

Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`.

xordspar0 added a commit to xordspar0/appimage-static-tools that referenced this issue Apr 9, 2025
This works around a breaking change introduced in
actions/upload-artifact@v4.

See actions/upload-artifact#478
probonopd pushed a commit to probonopd/static-tools that referenced this issue Apr 10, 2025
This works around a breaking change introduced in
actions/upload-artifact@v4.

See actions/upload-artifact#478
raharper added a commit to raharper/machine that referenced this issue Apr 16, 2025
Somehow can't write to the same folder:

actions/upload-artifact#478

Signed-off-by: Ryan Harper <[email protected]>
mlondschien added a commit to mlondschien/biosphere that referenced this issue Apr 26, 2025
mlondschien added a commit to mlondschien/biosphere that referenced this issue Apr 26, 2025
markmoraes added a commit to jonmacs/jove that referenced this issue May 13, 2025
…ique

names (which this did have, but one-level down in DIST)
actions/upload-artifact#478
markmoraes added a commit to jonmacs/jove that referenced this issue May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests