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

[bug] Upload fails intermittently with 400 artifact name not valid error #410

Closed
kishaningithub opened this issue Jun 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@kishaningithub
Copy link

What happened?

The upload action fails intermittently with a 400 status with message The artifact name is not valid. The file definitely exists for this action to perform the upload

Logs

Run actions/upload-artifact@v3
With the provided path, there will be 1 file uploaded
Starting artifact upload
For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging
Artifact name is valid!
Create Artifact Container - Error is not retryable
##### Begin Diagnostic HTTP information #####
Status Code: 400
Status Message: Bad Request
Header Information: {
  "cache-control": "no-store,no-cache",
  "pragma": "no-cache",
  "content-length": "209",
  "content-type": "application/json; charset=utf-8",
  "strict-transport-security": "max-age=2592000",
  "x-tfs-processid": "cff44373-8b80-4cce-acbe-643b6e3d5dfb",
  "activityid": "2f6017b6-e0db-42eb-97f8-d7dc96d2e488",
  "x-tfs-session": "2f6017b6-e0db-42eb-97f8-d7dc96d2e488",
  "x-vss-e2eid": "2f6017b6-e0db-42eb-97f8-d7dc96d2e488",
  "x-vss-senderdeploymentid": "f7faf8cf-7ae4-3f62-0792-ce64b15bce23",
  "x-frame-options": "SAMEORIGIN",
  "x-cache": "CONFIG_NOCACHE",
  "x-msedge-ref": "Ref A: 26FDABB677554CD8AFB8E8E4362FB3B0 Ref B: BY3EDGE0205 Ref C: 2023-06-26T20:17:26Z",
  "date": "Mon, 26 Jun 2023 20:17:26 GMT",
  "connection": "close"
}
###### End Diagnostic HTTP information ######
##### Begin Diagnostic HTTP information #####
Status Code: 400
Status Message: Bad Request
Header Information: {
  "cache-control": "no-store,no-cache",
  "pragma": "no-cache",
  "content-length": "209",
  "content-type": "application/json; charset=utf-8",
  "strict-transport-security": "max-age=2592000",
  "x-tfs-processid": "cff44373-8b80-4cce-acbe-643b6e3d5dfb",
  "activityid": "2f6017b6-e0db-42eb-97f8-d7dc96d2e488",
  "x-tfs-session": "2f6017b6-e0db-42eb-97f8-d7dc96d2e488",
  "x-vss-e2eid": "2f6017b6-e0db-42eb-97f8-d7dc96d2e488",
  "x-vss-senderdeploymentid": "f7faf8cf-7ae4-3f62-0792-ce64b15bce23",
  "x-frame-options": "SAMEORIGIN",
  "x-cache": "CONFIG_NOCACHE",
  "x-msedge-ref": "Ref A: 26FDABB677554CD8AFB8E8E4362FB3B0 Ref B: BY3EDGE0205 Ref C: 2023-06-26T20:17:26Z",
  "date": "Mon, 26 Jun 2023 20:17:26 GMT",
  "connection": "close"
}
###### End Diagnostic HTTP information ######
Error: Create Artifact Container failed: The artifact name tfplan is not valid. Request URL https://pipelines.actions.githubusercontent.com/fVfkSMTc7sZjVQkJsOk6FB59FieriHI0QZLhvYcifqX7U5B7vl/_apis/pipelines/workflows/5350316710/artifacts?api-version=6.0-preview

What did you expect to happen?

I expected no intermittent errors like above and upload to succeed

How can we reproduce it?

Its a bit tricky as this happens intermittenly but this was the step config

- name: Publish Terraform Plan
  uses: actions/upload-artifact@v3
  with:
    name: tfplan
    path: tfplan

Anything else we need to know?

Re-running the pipeline fixes this issue. But this keeps happening now and then.

What version of the action are you using?

v3

What are your runner environments?

linux

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

No response

@kishaningithub kishaningithub added the bug Something isn't working label Jun 28, 2023
@hzerip
Copy link

hzerip commented Jul 18, 2023

I'm having the same problem, @kishaningithub have you found a solution for this?

@kishaningithub
Copy link
Author

@hzerip Well.. My solution was to ditch this and use s3 directly..

If the maintainers can give a direction i am willing to contribute to this repo

@alesnovak-s1
Copy link

@hzerip
In my case the error was caused by uploading two files with the same name at the same time from two different jobs.

@konradpabjan
Copy link
Collaborator

v4 has shipped today https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/

I recommend switching over as these classes of issues should no longer happen with the release

Godsmith added a commit to Ericsson/PlantUML-Interactive-Editor that referenced this issue Feb 4, 2025
Got "Create Artifact Container failed: The artifact name SARIF file is not valid." According to actions/upload-artifact#410, upgrading to v4 might be a solution, so testing this.
samuelhwilliams added a commit to communitiesuk/funding-service-design-workflows that referenced this issue Feb 5, 2025
We've started seeing failures from this action that might be related to
an older version of the upload-artifact action.

This is a bit of a punt.

actions/upload-artifact#410
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

5 participants
@kishaningithub @konradpabjan @hzerip @alesnovak-s1 and others