Skip to content
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

GitHub Action Error - Artifact Upload Conflict #199

Open
vchendrix opened this issue Sep 13, 2024 · 6 comments · Fixed by #200
Open

GitHub Action Error - Artifact Upload Conflict #199

vchendrix opened this issue Sep 13, 2024 · 6 comments · Fixed by #200
Assignees
Labels
BASIN-3D bug Something isn't working github-actions

Comments

@vchendrix
Copy link
Contributor

The GitHub Action actions/upload-artifact@v4 encountered an error during the artifact upload process. The error indicates that an artifact with the specified name already exists in the current workflow run, causing a conflict.

Error Message:

Run actions/upload-artifact@v4

With the provided path, there will be 30 files uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

Steps to Reproduce:

  1. Trigger the GitHub Action workflow that includes the actions/upload-artifact@v4 step.
  2. Ensure that the artifact name specified in the upload step is the same as an existing artifact in the current workflow run.

Expected Behavior:
The artifact should be uploaded successfully without any conflicts.

Actual Behavior:
The upload process fails with a 409 Conflict error because an artifact with the same name already exists.

Possible Solutions:

  1. Rename the Artifact: Modify the artifact name to ensure it is unique for each workflow run.
  2. Conditional Upload: Implement a check to see if an artifact with the same name already exists before attempting to upload.
  3. Cleanup Previous Artifacts: Ensure that previous artifacts are cleaned up or overwritten if they are no longer needed.
@vchendrix vchendrix added bug Something isn't working BASIN-3D github-actions labels Sep 13, 2024
@vchendrix vchendrix self-assigned this Sep 13, 2024
vchendrix added a commit that referenced this issue Sep 13, 2024
Uses the github run_id for the artifact output directory

Closes #199
vchendrix added a commit that referenced this issue Sep 13, 2024
Uses the github run_id for the artifact output directory

Closes #199
vchendrix added a commit that referenced this issue Sep 13, 2024
Uses the github run_id for the artifact output directory

Closes #199
vchendrix added a commit that referenced this issue Sep 13, 2024
Uses the github run_id for the artifact output directory

Closes #199
vchendrix added a commit that referenced this issue Sep 13, 2024
Uses the github run_id for the artifact output directory

Closes #199
vchendrix added a commit that referenced this issue Sep 13, 2024
sets overwrite to true for upload-artifact github action.

Closes #199
@dschristianson
Copy link
Contributor

This error is happening again. PR #206

@dschristianson
Copy link
Contributor

I was able to get by this error by running each version individually. This makes me think maybe there is a collision happening, e.g., 2 versions (say 3.9 and 3.10) are trying to write artifacts at the same time??

@vchendrix
Copy link
Contributor Author

I was able to get by this error by running each version individually. This makes me think maybe there is a collision happening, e.g., 2 versions (say 3.9 and 3.10) are trying to write artifacts at the same time??

Interesting, I thought I fixed that with overwrite: true

@vchendrix
Copy link
Contributor Author

I was able to get by this error by running each version individually. This makes me think maybe there is a collision happening, e.g., 2 versions (say 3.9 and 3.10) are trying to write artifacts at the same time??

Interesting, I thought I fixed that with overwrite: true

I wonder if we can change these to run serially.

@vchendrix
Copy link
Contributor Author

I was able to get by this error by running each version individually. This makes me think maybe there is a collision happening, e.g., 2 versions (say 3.9 and 3.10) are trying to write artifacts at the same time??

Interesting, I thought I fixed that with overwrite: true

I wonder if we can change these to run serially.

Here is the documentation for the gh action https://github.com/actions/upload-artifact

@vchendrix
Copy link
Contributor Author

@dschristianson this might be a solution actions/upload-artifact#480 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BASIN-3D bug Something isn't working github-actions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants