gitea/cmd
Giteabot 7cb67cfd7f
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>
2024-06-05 11:25:48 +03:00
..
actions.go
admin.go
admin_auth.go
admin_auth_ldap.go
admin_auth_ldap_test.go
admin_auth_oauth.go
admin_auth_stmp.go
admin_regenerate.go
admin_user.go
admin_user_change_password.go
admin_user_create.go
admin_user_create_test.go
admin_user_delete.go
admin_user_generate_access_token.go
admin_user_list.go
admin_user_must_change_password.go
cert.go
cmd.go
docs.go
doctor.go
doctor_convert.go
doctor_test.go
dump.go
dump_repo.go
embedded.go
generate.go
hook.go
hook_test.go
keys.go
mailer.go
main.go
main_test.go
manager.go
manager_logging.go
migrate.go
migrate_storage.go fix: allow actions artifacts storage migration to complete succesfully (#31251) (#31257) 2024-06-05 11:25:48 +03:00
migrate_storage_test.go
restore_repo.go
serv.go
web.go
web_acme.go
web_graceful.go
web_https.go