-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Gitea upgrade from 1.9.6 to 1.11.1 drops release attachments #10526
Comments
A deeper check showed that the files were also deleted from the disk. |
There are two migrations related with release attachments, https://github.com/go-gitea/gitea/blob/master/models/migrations/v96.go and https://github.com/go-gitea/gitea/blob/master/models/migrations/v112.go, but it should only clean up the attachmens which missed repositories. |
I just tracked this down also. I suspect the migration step v96.go to be responsible for this as we had a try at upgrading from 1.9.6 to 1.10.0 and rolled back because of this. We upload attachments through the api in our build pipeline. All the files were visible in the web ui before the upgrade. The attachments were in some cases attached to tags without using the api to create a release as the tag was already there. Maybe this is cause of the "dangling" attachments. I just put a script together to restore all the attachments on our server. Therefore, we solved the issue on our side, but it might be wise to investigate this ... |
@teajay-fr Could you paste that migration logs ? |
Hmm I wonder do you have an external issue tracker? |
We have no external issue tracker. |
Here is the part of the migration log where the deletion of attachments is visible: 2020/02/26 12:14:18 routers/init.go:59:initDBEngine() [I] Beginning ORM engine initialization. |
Not the list of attachment deletions is much longer, but not further relevant for this issue. |
I still have a backup of the database before the migration, so I could do some inspections if necessary. |
I believe the bug is in v96.go which released on 1.10.0. It's so serious that I think maybe we should send a release/v1.10 so that users could upgrade step by step from 1.9.6 -> 1.10.5 -> 1.11.2 . I will send a PR very soon. |
@teajay-fr Please confirm that #10572 will fix your problem. And you can download version v1.10 from dl.gitea.io after the build time is not 2020/2/16 any more. |
I can confirm that the submitted patch fixed the issue. Thank you for your support ! |
[x]
):Description
We just upgraded our gitea instance from version 1.9.6 to 1.11.1 and found that release attachments disappeared from the download links during the upgrade.
Not all files disappeared, only some, but we didn't see any pattern regarding which files were discarded.
The text was updated successfully, but these errors were encountered: