actions / actions/toolkit

Getting UnsupportedHeader code while trying to upload artifact

Open
#1,910 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Getting UnsupportedHeader code while trying to upload artifact

To Reproduce
Steps to reproduce the behavior:

  1. We noticed UnsupportedHeader error coming in x-ms-error-code in version 2.1.8 @action/artifact

  2. We upgraded @actions/artifact to 2.2.0 in our package.json

  3. We have made call to uploadArtifact(artifactName, files, root directory, {retentionDays} of DefaultArtifactClient of @actions/artifact from our js file.

  4. We observed below behaviour:
    upload-artifact.js makes call to uploadZipToBlobStorage under blob-upload.js where it makes a call to uploadStream method present in storage-blob and error occurs at uploadStream method where error says : RestError: One of the HTTP headers specified in the request is not supported.

  5. When we look at the request header it is as below :
    IMG_20241219_204149

Expected behavior
Requested Artifact Should get uploaded to workflow .

Screenshots
Attached request header in point 5 above.

Response header looks like below :

IMG_20241219_205034

Additional context
My first guess would be if x-ms-version 2025-01-05 is able to support the header being passed from @action/artifact ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with @actions/artifact 2.2.0 and trace upload-artifact.js through blob-upload.js to storage-blob's uploadStream method. Inspect the request headers and the x-ms-error-code response, especially the reported x-ms-version 2025-01-05. Done means the artifact uploads successfully without the UnsupportedHeader error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.