Skip to content

Health check is disabled by default #5810

@michaelkuhn

Description

@michaelkuhn
  • 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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions