Repository listing filter broken after upgrading from gogs 0.11.91 to gitea 1.12.0-rc2 #5524

Closed
opened 2025-11-02 06:27:48 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @moepman on GitHub (Jun 9, 2020).

  • Gitea version (or commit ref): 0.12.0-rc2
  • Git version: 2.20.1
  • Gogs version: 0.11.91
  • Operating system: Debian Buster (stable with all current updaes installed)
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant
  • Log gist:

Description

After migrating from gogs 0.11.91 to gitea 1.12.0-rc2 the "Repositories" list to the right is broken. It was still working with 1.11.6. It seems to be a filtering issue: if I select archived (✓) or not archived (-) it works - with the empty checkbox (which should list both archived and non-archived) I get an empty list as per the attached screenshot.

Steps taken for the migration:

  • stop gogs
  • create a new minimal app.ini
  • set DB version to 13 as per #5318
  • start gitea 1.6.4 (since #5318 seems to imply this is supported without going through previous versions)
  • sop gitea
  • start gitea 1.11.6 (with #10026 dropping migrations from before 1.6.x in current code that to me implies going from 1.6.4 to 1.11.6 should be safe)
  • Run "Reinitialize all missing Git repositories for which records exist"
  • Remove gogs hooks: find $REPO_DIR -path *-receive.d/*-receive -delete (see #3558 for Details)
  • Run "Resynchronize pre-receive, update and post-receive hooks of all repositories" (or PRs will break #8208)
  • stop gitea
  • start gitea 1.12.0-rc2

Screenshots

gitea-repositories-empty

Originally created by @moepman on GitHub (Jun 9, 2020). - Gitea version (or commit ref): 0.12.0-rc2 - Git version: 2.20.1 - Gogs version: 0.11.91 - Operating system: Debian Buster (stable with all current updaes installed) - Database: - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes - [ ] No - [x] Not relevant - Log gist: ## Description After migrating from gogs 0.11.91 to gitea 1.12.0-rc2 the "Repositories" list to the right is broken. It was still working with 1.11.6. It seems to be a filtering issue: if I select archived (✓) or not archived (-) it works - with the empty checkbox (which should list both archived and non-archived) I get an empty list as per the attached screenshot. Steps taken for the migration: * stop gogs * create a new minimal app.ini * set DB version to 13 as per #5318 * start gitea 1.6.4 (since #5318 seems to imply this is supported without going through previous versions) * sop gitea * start gitea 1.11.6 (with #10026 dropping migrations from before 1.6.x in current code that to me implies going from 1.6.4 to 1.11.6 should be safe) * Run "Reinitialize all missing Git repositories for which records exist" * Remove gogs hooks: find $REPO_DIR -path \*-receive.d/\*-receive -delete (see #3558 for Details) * Run "Resynchronize pre-receive, update and post-receive hooks of all repositories" (or PRs will break #8208) * stop gitea * start gitea 1.12.0-rc2 ## Screenshots ![gitea-repositories-empty](https://user-images.githubusercontent.com/619759/84180624-1bfc1180-aa88-11ea-93c4-171a78b5daaa.png)
Author
Owner

@moepman commented on GitHub (Jun 10, 2020):

I am not sure when the is_archived column was introduced to the repository table, it got added with a migration step but existing repositories did not get a default value of false.

The following SQL statement will fix the problem.

UPDAtE repository SET is_archived = false WHERE is_archived IS NULL;
@moepman commented on GitHub (Jun 10, 2020): I am not sure when the `is_archived` column was introduced to the `repository` table, it got added with a migration step but existing repositories did not get a default value of false. The following SQL statement will fix the problem. ```SQL UPDAtE repository SET is_archived = false WHERE is_archived IS NULL; ```
Author
Owner

@zeripath commented on GitHub (Jun 11, 2020):

OK it looks like we could add another migration v142.go which does this step.

Probably reasonable to do it as we never really want is_archived to be NULL

@zeripath commented on GitHub (Jun 11, 2020): OK it looks like we could add another migration v142.go which does this step. Probably reasonable to do it as we never really want is_archived to be NULL
Author
Owner

@zeripath commented on GitHub (Jun 11, 2020):

For 1.12 unfortunately we can't backport the auto-migration but the gitea doctor command could be used to fix this.

@zeripath commented on GitHub (Jun 11, 2020): For 1.12 unfortunately we can't backport the auto-migration but the gitea doctor command could be used to fix this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5524