]> source.dussan.org Git - gitea.git/commit
fix: allow actions artifacts storage migration to complete succesfully (#31251) ...
authorGiteabot <teabot@gitea.io>
Wed, 5 Jun 2024 08:25:48 +0000 (16:25 +0800)
committerGitHub <noreply@github.com>
Wed, 5 Jun 2024 08:25:48 +0000 (11:25 +0300)
commit7cb67cfd7fac71353b5dfa495642024630684b83
tree90c4e594da5dcdfc0462ebf3e331be81db920d18
parent1c1c2d36e85f017ce509929c79379fa026b823ee
fix: allow actions artifacts storage migration to complete succesfully (#31251) (#31257)

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.

Co-authored-by: Rowan Bohde <rowan.bohde@gmail.com>
cmd/migrate_storage.go