-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
All releases lost upon upgrading from Gogs to Gitea-1.3.2 #3247
Comments
API method could be added as I don't see where could it be added in admin interface |
I'm doing an |
That command should be help and seems it's easy to implementation. |
@strk which version was your Gogs? Maybe you lost some migrations? |
You need to call models function that does not require engine or create one |
Gogs-0.9.99.0903, with database at version 14.
The "release" table, present, was empty.
Model functions are not what the migration (v39.go) calls.
The migration does make use of `x` (the engine) to get the
list of repositories to scan/sync.
|
Actually, I went looking logs and found the probable cause of loosing
all those releases:
2017/10/18 13:27:11 [I] Migration: add tags to releases and sync existing repositories
2017/10/18 13:27:12 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git
...
2017/10/18 13:27:12 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git
2017/10/18 13:27:12 [I] Migration: remove duplicate unit types
There seem to be some problem with the repository paths.
|
Working more on the PR adding an admin command to re-sync I found more problems: the function used by the migration supposed to synchronize repo tags with releases does not really work. Do you remember who changed the way releases were handled ? |
@lafriks can you check if things work for you ? Easy test:
For me, the final step does not add any new release record in the database, while I believe your migration 42 (from which code in this PR is taken) was meant to do exactly that ? |
@ethantkoenig @strk I fixed so that tags are actually displayed in release page and created that sync function but I was not one who broke displaying them in release page as before my PR tags would not be displayed in release page at all. I will try to reproduce your steps |
I don't understand the above two statements. What did you fix ? |
self-answering the last question: previous ticket was #2154 |
Will help recovering corrupted database, see go-gitea#3247
* Add repo-sync-releases admin command Will help recovering corrupted database, see #3247 * Load repos in chunks of 10, exit with error if unable to get a list, scan private repos, fix typo * Fix debug output about num releases * Introduce RepositoryListDefaultPageSize constant, set to 64 Use it from the new admin command * Use RepositoryListDefaultPageSize in more places * Document RepositoryListDefaultPageSize
@strk can this be closed than? |
I don't think so, we should try to reproduce the occurrence and
make the migration more tolerant. I was coming from Gogs 0.9.99.0903
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
I'll close this one. Please feel free to reopen it. |
[x]
):Description
Gogs used to show every tag in the Releases page, upon upgrade all those entries in Releases are gone. I've tried that removing all remote tags and re-pushing them is effective as a work-around, but it is crazy to do this for each and every repository we host.
@lafriks mentioned this synchronization should have happened at migration time but evidently it did not. How to fix now ? I think there should be an admin task to resynchronize those releases or we're stuck forever with this problem.
The problem may or may not be related to git version being < 1.8 - see #1133 (from #1133 (comment))
The text was updated successfully, but these errors were encountered: