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

Artifacts upload results in error 500 #25590

Closed
Fratee opened this issue Jun 29, 2023 · 3 comments
Closed

Artifacts upload results in error 500 #25590

Fratee opened this issue Jun 29, 2023 · 3 comments
Labels

Comments

@Fratee
Copy link

Fratee commented Jun 29, 2023

Description

When running the following pipeline on act_runner, the artifacts are not uploaded due to error 500.

build.yaml
name: Runner
run-name: ${{ gitea.actor }} is building
on: [push]

defaults:
  run:
    shell: powershell

jobs:
  Build:
    runs-on: [windows, gprbuild]
    steps:
      - uses: actions/checkout@v3
        with:
        ref: gitea
      - name: Prepare folders
        run: |
          mkdir bin -ErrorAction ignore
      - name: Build
        run: echo test > file.txt
      - name: 'Upload Artifact'
        uses: actions/upload-artifact@v3
        with:
          path: |
            file.txt
Runner Log
[Runner/Build] [DEBUG] Removing C:\Users\usp00bo\.cache\act/actions-upload-artifact@v3/.gitignore before docker cp
[Runner/Build] [DEBUG] C:\Users\usp00bo\.cache\act\286b80907b4f225f\act/actions/actions-upload-artifact@v3
[Runner/Build] [DEBUG] Stripping prefix:C:\Users\usp00bo\.cache\act\actions-upload-artifact@v3\ src:C:\Users\usp00bo\.cache\act/actions-upload-artifact@v3/
[Runner/Build] [DEBUG] executing remote job container: [node C:\Users\usp00bo\.cache\act\286b80907b4f225f\act/actions/actions-upload-artifact@v3/dist/index.js]
[Runner/Build] [DEBUG] Failed to setup Pty Unsupported
[Runner/Build]   💬  ::debug::followSymbolicLinks 'true'
| ::debug::followSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::implicitDescendants 'true'
| ::debug::implicitDescendants 'true'
[Runner/Build]   💬  ::debug::omitBrokenSymbolicLinks 'true'
| ::debug::omitBrokenSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::followSymbolicLinks 'true'
| ::debug::followSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::implicitDescendants 'true'
| ::debug::implicitDescendants 'true'
[Runner/Build]   💬  ::debug::matchDirectories 'true'
| ::debug::matchDirectories 'true'
[Runner/Build]   💬  ::debug::omitBrokenSymbolicLinks 'true'
| ::debug::omitBrokenSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::Search path 'C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt'
| ::debug::Search path 'C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt'
[Runner/Build]   💬  ::debug::File:C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt was found using the provided searchPath
| ::debug::File:C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt was found using the provided searchPath
| With the provided path, there will be 1 file uploaded
[Runner/Build]   💬  ::debug::Root artifact directory is C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor
| ::debug::Root artifact directory is C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor
| 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!
[Runner/Build]   💬  ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
| ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
[Runner/Build]   💬  ::debug::Upload Resource URL: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload
| ::debug::Upload Resource URL: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload
| Container for artifact "artifact" successfully created. Starting upload of file(s)
[Runner/Build]   💬  ::debug::File Concurrency: 2, and Chunk Size: 8388608
| ::debug::File Concurrency: 2, and Chunk Size: 8388608
[Runner/Build]   💬  ::debug::C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size
| ::debug::C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size
[Runner/Build]   💬  ::debug::The gzip file created for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt did not help with reducing the size of the file. The original file will be uploaded as-is
| ::debug::The gzip file created for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt did not help with reducing the size of the file. The original file will be uploaded as-is
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #1. Waiting for 4594 milliseconds before continuing the upload at offset 0
| Finished backoff for retry #1, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #2. Waiting for 9357 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #2, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #3. Waiting for 18916 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #3, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #4. Waiting for 25252 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #4, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #5. Waiting for 33373 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #5, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| ##### Begin Diagnostic HTTP information #####
| Status Code: 500
| Status Message: Internal Server Error
| Header Information: {
|   "cache-control": "max-age=0, private, must-revalidate, no-transform",
|   "content-type": "text/html; charset=utf-8",
|   "x-frame-options": "SAMEORIGIN",
|   "date": "Thu, 29 Jun 2023 11:23:53 GMT",
|   "transfer-encoding": "chunked"
| }
| ###### End Diagnostic HTTP information ######
| Retry limit has been reached for chunk at offset 0 to http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload?itemPath=artifact%5Cfile.txt
[Runner/Build]   🚧  ::warning::Aborting upload for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt due to failure
| ::warning::Aborting upload for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt due to failure
[Runner/Build]   ❗  ::error::aborting artifact upload
| ::error::aborting artifact upload
| Total size of all the files uploaded is 0 bytes
| File upload process has finished. Finalizing the artifact upload
[Runner/Build]   💬  ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
| ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
[Runner/Build]   💬  ::debug::URL is http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview&artifactName=artifact
| ::debug::URL is http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview&artifactName=artifact
| Finalize artifact upload - Attempt 1 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 2 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 3 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 4 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 5 of 5 failed with error: Artifact service responded with 500

Gitea log

Gitea Version

1.20.0-rc0

Can you reproduce the bug on the Gitea demo site?

No (actions are unavailable)

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Windows 10

How are you running Gitea?

Self hosted on windows 10

Database

SQLite

@lunny
Copy link
Member

lunny commented Jun 29, 2023

I think this should be fixed by #24874

@myrqs
Copy link

myrqs commented Jul 17, 2023

I have a similar problem and if it's the same it's related to a wrong path separator in the artifact URL when running on windows host runner instead of #24874 i think.

from my gitea logs i get:
...actions/artifacts.go:310:uploadArtifact() [E] Error checking artifact name contains invalid character
routing/logger.go:78:func1() [W] router: failed PUT /api/actions_pipeline/_apis/pipelines/workflows/185/artifacts/12/upload?itemPath=test-artifact-windows%5Ctest-artifact

i guess that %5c or '\' in the url is wrong and will be filtered by uploadArtifact. instead it should be changed to '/' probably before uploading in the upload-artifact action.

@lunny
Copy link
Member

lunny commented Jul 26, 2023

I think this has been resolved by #24874. And if @myrqs 's problem is not the same, a new issue could be created since it's not the same as this one I think.

@lunny lunny closed this as completed Jul 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants