Health check is disabled by default #2802

Closed
opened 2025-11-02 04:48:58 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @michaelkuhn on GitHub (Jan 23, 2019).

  • Gitea version (or commit ref): 1.6.4 and 1.7.0+dev-75-g6ad834e23
  • Operating system: Ubuntu 18.04 and 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (missing admin rights)
    • Not relevant

Description

If I create a new repository, the health check is disabled by default, even though it should be enabled.

This seems to be due to the fact that the IsFsckEnabled member is not explicitly initialized in CreateRepository. I have confirmed that the column defaults to true in the database. However, Gitea's INSERT statement explicitly sets it to false:

2019/01/23 17:12:12 [I] [SQL] INSERT INTO `repository` (`owner_id`,`lower_name`,`name`,`description`,`website`,`default_branch`,`num_watches`,`num_stars`,`num_forks`,`num_issues`,`num_closed_issues`,`num_pulls`,`num_closed_pulls`,`num_milestones`,`num_closed_milestones`,`is_private`,`is_empty`,`is_mirror`,`is_fork`,`fork_id`,`size`,`is_fsck_enabled`,`topics`,`created_unix`,`updated_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{1, "test", "test", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0, true, false, false, false, 0, 0, false, "null", 1548259932, 1548259932}
Originally created by @michaelkuhn on GitHub (Jan 23, 2019). - Gitea version (or commit ref): 1.6.4 and 1.7.0+dev-75-g6ad834e23 - Operating system: Ubuntu 18.04 and 16.04 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No (missing admin rights) - [ ] Not relevant ## Description If I create a new repository, the health check is disabled by default, even though it should be enabled. This seems to be due to the fact that the `IsFsckEnabled` member is not explicitly initialized in `CreateRepository`. I have confirmed that the column defaults to `true` in the database. However, Gitea's `INSERT` statement explicitly sets it to `false`: ``` 2019/01/23 17:12:12 [I] [SQL] INSERT INTO `repository` (`owner_id`,`lower_name`,`name`,`description`,`website`,`default_branch`,`num_watches`,`num_stars`,`num_forks`,`num_issues`,`num_closed_issues`,`num_pulls`,`num_closed_pulls`,`num_milestones`,`num_closed_milestones`,`is_private`,`is_empty`,`is_mirror`,`is_fork`,`fork_id`,`size`,`is_fsck_enabled`,`topics`,`created_unix`,`updated_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{1, "test", "test", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0, true, false, false, false, 0, 0, false, "null", 1548259932, 1548259932} ```
GiteaMirror added the type/bug label 2025-11-02 04:48:58 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2802