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

Actions upload-artifact fails when using MinIO storage #28279

Closed
CEnnis91 opened this issue Nov 29, 2023 · 2 comments
Closed

Actions upload-artifact fails when using MinIO storage #28279

CEnnis91 opened this issue Nov 29, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@CEnnis91
Copy link
Contributor

Description

The following action with upload-artifact@v3 works fine when artifact storage is set to local, but fails when set to minio on v.1.21. The file is successfully uploaded to the MinIO storage, but fails on confirmUploadChunk.

Might be related: #26400.

on: [push]

jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Example"
      - uses: actions/checkout@v3
      - run: echo "foo" > /tmp/test.txt

      - uses: actions/upload-artifact@v3
        with:
          name: test.txt
          path: /tmp/test.txt

On success:

.../artifacts_chunks.go:45:saveUploadChunk() [I] [artifact] check chunk md5, sum: 07BzhNET7exJ6qYjitX/AA==, header: 07BzhNET7exJ6qYjitX/AA==
.../artifacts_chunks.go:53:saveUploadChunk() [I] [artifact] save chunk tmp51/8-0-3.chunk, size: 4, artifact id: 8, start: 0, end: 3

On failure:

.../artifacts_chunks.go:45:saveUploadChunk() [I] [artifact] check chunk md5, sum: 07BzhNET7exJ6qYjitX/AA==, header: 07BzhNET7exJ6qYjitX/AA==
.../artifacts_chunks.go:53:saveUploadChunk() [I] [artifact] save chunk tmp51/8-0-3.chunk, size: 4, artifact id: 8, start: 0, end: 3
...actions/artifacts.go:291:comfirmUploadArtifact() [E] Error merge chunks: parse content range error: input does not match format

Gitea Version

v1.21.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker: gitea/gitea:1.21.1

Database

None

@fuxiaohei
Copy link
Contributor

@CEnnis91 Can you provide your minio storage settings ? I find something wrong when MINIO_BASE_PATH is set.

@lunny lunny added this to the 1.21.3 milestone Dec 15, 2023
@CEnnis91
Copy link
Contributor Author

@fuxiaohei my MINIO_BASE_PATH is changed from default (I use a subdirectory). For the artifacts it is gitea/actions_artifacts.

lunny pushed a commit that referenced this issue Dec 21, 2023
…28555)

Related to  #28279

When merging artifact chunks, it lists chunks from storage. When storage
is minio, chunk's path contains `MINIO_BASE_PATH` that makes merging
break.

<del>So trim the `MINIO_BASE_PATH` when handle chunks.</del>

Update the chunk file's basename to retain necessary information. It
ensures that the directory in the chunk's path remains unaffected.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Dec 21, 2023
…o-gitea#28555)

Related to  go-gitea#28279

When merging artifact chunks, it lists chunks from storage. When storage
is minio, chunk's path contains `MINIO_BASE_PATH` that makes merging
break.

<del>So trim the `MINIO_BASE_PATH` when handle chunks.</del>

Update the chunk file's basename to retain necessary information. It
ensures that the directory in the chunk's path remains unaffected.
lunny pushed a commit that referenced this issue Dec 21, 2023
…28555) (#28568)

Backport #28555 by @fuxiaohei

Related to  #28279

When merging artifact chunks, it lists chunks from storage. When storage
is minio, chunk's path contains `MINIO_BASE_PATH` that makes merging
break.

<del>So trim the `MINIO_BASE_PATH` when handle chunks.</del>

Update the chunk file's basename to retain necessary information. It
ensures that the directory in the chunk's path remains unaffected.

Co-authored-by: FuXiaoHei <fuxiaohei@vip.qq.com>
@lunny lunny closed this as completed Dec 21, 2023
fuxiaohei added a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
…o-gitea#28555)

Related to  go-gitea#28279

When merging artifact chunks, it lists chunks from storage. When storage
is minio, chunk's path contains `MINIO_BASE_PATH` that makes merging
break.

<del>So trim the `MINIO_BASE_PATH` when handle chunks.</del>

Update the chunk file's basename to retain necessary information. It
ensures that the directory in the chunk's path remains unaffected.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
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