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

fix: allow actions artifacts storage migration to complete succesfully (#31251) #31257

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

GiteaBot
Copy link
Collaborator

@GiteaBot GiteaBot commented Jun 5, 2024

Backport #31251 by @bohde

Change the copy to use ActionsArtifact.StoragePath instead of the ArtifactPath. Skip artifacts that are expired, and don't error if the file to copy does not exist.


When trying to migrate actions artifact storage from local to MinIO, we encountered errors that prevented the process from completing successfully:

  • The migration tries to copy the files using the per-run ArtifactPath, instead of the unique StoragePath.
  • Artifacts that have been marked expired and had their files deleted would throw an error
  • Artifacts that are pending, but don't have a file uploaded yet will throw an error.

This PR addresses these cases, and allow the process to complete successfully.

go-gitea#31251)

Change the copy to use `ActionsArtifact.StoragePath` instead of the
`ArtifactPath`. Skip artifacts that are expired, and don't error if the
file to copy does not exist.

---

When trying to migrate actions artifact storage from local to MinIO, we
encountered errors that prevented the process from completing
successfully:

* The migration tries to copy the files using the per-run
`ArtifactPath`, instead of the unique `StoragePath`.
* Artifacts that have been marked expired and had their files deleted
would throw an error
* Artifacts that are pending, but don't have a file uploaded yet will
throw an error.

This PR addresses these cases, and allow the process to complete
successfully.
@GiteaBot GiteaBot added modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/go Pull requests that update Go code labels Jun 5, 2024
@GiteaBot GiteaBot added this to the 1.22.1 milestone Jun 5, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 5, 2024
@GiteaBot GiteaBot requested review from a1012112796 and fuxiaohei June 5, 2024 04:01
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 5, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 5, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 5, 2024
@lafriks lafriks merged commit 7cb67cf into go-gitea:release/v1.22 Jun 5, 2024
26 checks passed
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/go Pull requests that update Go code size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants