Repos not showing properly under dashboard after migration from Gogs #5720

Closed
opened 2025-11-02 06:33:58 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @ryan77627 on GitHub (Jul 10, 2020).

  • Gitea version (or commit ref): 1.12.1
  • Git version: 2.26.0
  • Operating system: OpenSUSE Tumbleweed
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    tail -n 10 log/gitea.log
2020/07/10 15:44:14 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 [plugin] - 5.903063ms
2020/07/10 15:44:14 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0]
2020/07/10 15:44:14 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0]
2020/07/10 15:44:18 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1594395846 1594395856 1] - 7.720299ms
2020/07/10 15:44:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 [plugin] - 6.10551ms
2020/07/10 15:44:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 [plugin] - 6.494937ms
2020/07/10 15:44:24 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0]
2020/07/10 15:44:24 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0]
2020/07/10 15:44:28 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1594395856 1594395866 1] - 8.035351ms
2020/07/10 15:44:38 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1594395866 1594395876 1] - 6.482281ms

Description

I am in the process of migrating my Gogs instance to Gitea. I updated all of the relevant config files (I think) and started on Gitea 1.0.2 and once I made sure everything worked I ran every major version up to 1.12.1. Everything worked fine except one thing: On my dashboard on 1.12.1 my repo count is correct but they aren't showing. This issue isn't present on 1.11.6

Screenshots

1.11.6:
1.11.16 example

1.12.1:
1.12.1 example

Originally created by @ryan77627 on GitHub (Jul 10, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.12.1 - Git version: 2.26.0 - Operating system: OpenSUSE Tumbleweed - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: `tail -n 10 log/gitea.log` ``` 2020/07/10 15:44:14 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 [plugin] - 5.903063ms 2020/07/10 15:44:14 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0] 2020/07/10 15:44:14 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0] 2020/07/10 15:44:18 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1594395846 1594395856 1] - 7.720299ms 2020/07/10 15:44:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 [plugin] - 6.10551ms 2020/07/10 15:44:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `email_notifications_preference`, `passwd`, `passwd_hash_algo`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `is_restricted`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `repo_admin_change_team_access`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 [plugin] - 6.494937ms 2020/07/10 15:44:24 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0] 2020/07/10 15:44:24 routers/repo/http.go:104:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: plugin, keyid: 0] 2020/07/10 15:44:28 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1594395856 1594395866 1] - 8.035351ms 2020/07/10 15:44:38 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1594395866 1594395876 1] - 6.482281ms ``` ## Description I am in the process of migrating my Gogs instance to Gitea. I updated all of the relevant config files (I think) and started on Gitea 1.0.2 and once I made sure everything worked I ran every major version up to 1.12.1. Everything worked fine except one thing: On my dashboard on 1.12.1 my repo count is correct but they aren't showing. This issue isn't present on 1.11.6 ## Screenshots 1.11.6: ![1.11.16 example](https://i.ibb.co/TLXJ5Dk/Screenshot-20200710-113154.png) 1.12.1: ![1.12.1 example](https://i.ibb.co/WsTwvXF/Screenshot-20200710-113221.png)
Author
Owner

@awkspace commented on GitHub (Jul 11, 2020):

I actually just finished the same upgrade and I notice that toggling the “Archive” checkbox under the filter icon on and off works. Can’t get it to stay consistently though.

@awkspace commented on GitHub (Jul 11, 2020): I actually just finished the same upgrade and I notice that toggling the “Archive” checkbox under the filter icon on and off works. Can’t get it to stay consistently though.
Author
Owner

@lunny commented on GitHub (Jul 11, 2020):

@ryan77627 could you visit the repositories home page directly?

@lunny commented on GitHub (Jul 11, 2020): @ryan77627 could you visit the repositories home page directly?
Author
Owner

@awkspace commented on GitHub (Jul 11, 2020):

I was able to resolve the problem by running UPDATE repository SET is_archived=false;

@awkspace commented on GitHub (Jul 11, 2020): I was able to resolve the problem by running `UPDATE repository SET is_archived=false;`
Author
Owner

@ryan77627 commented on GitHub (Jul 12, 2020):

@lunny Do you mean the explore page with all the repos? In that case yes, that page works just fine, it's just what's shown in the screenshots above with the issue.

@awkspace I tried your solution and it did indeed work. I guess that flag isn't being set or migrated properly, because I made a new repo in the meantime before I did the fix and it was showing up just fine. I ran the query and got the following response:
New Image

So it's definitely a migration issue if 3 of 4 repos were affected (three were the old ones, the fourth was the new one made after the migration)

Thanks @awkspace for finding this!

@ryan77627 commented on GitHub (Jul 12, 2020): @lunny Do you mean the explore page with all the repos? In that case yes, that page works just fine, it's just what's shown in the screenshots above with the issue. @awkspace I tried your solution and it did indeed work. I guess that flag isn't being set or migrated properly, because I made a new repo in the meantime before I did the fix and it was showing up just fine. I ran the query and got the following response: ![New Image](https://i.ibb.co/QbnhTM1/Screenshot-20200712-020019.png) So it's definitely a migration issue if 3 of 4 repos were affected (three were the old ones, the fourth was the new one made after the migration) Thanks @awkspace for finding this!
Author
Owner

@Daedalus-code commented on GitHub (Aug 27, 2020):

Thank you!

MariaDB [(none)]> USE gitea;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [gitea]> UPDATE repository SET is_archived=false;
Query OK, 16 rows affected (0.070 sec)
Rows matched: 16  Changed: 16  Warnings: 0

MariaDB [gitea]>

Works now, finally. 🎉

@Daedalus-code commented on GitHub (Aug 27, 2020): Thank you! ``` MariaDB [(none)]> USE gitea; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [gitea]> UPDATE repository SET is_archived=false; Query OK, 16 rows affected (0.070 sec) Rows matched: 16 Changed: 16 Warnings: 0 MariaDB [gitea]> ``` Works now, finally. 🎉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5720