go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.25k stars 5.43k forks source link

Upgrade to 1.21 Broke Repo - Branches Missing #28096

Closed NotGovernor closed 10 months ago

NotGovernor commented 10 months ago

Description

I have a server on docker compose pinned and updated daily to gitea:latest

The recent upgrade to version 1.21 has broken sever repo's in the following way:

image

  1. There are several branches in this repo, but it's only showing a count of 1 (the feature branch I pushed before realizing there was an issue with the server).
  2. Clicking on Branch on the bar takes you to a 500 error (because it seems to be looking for the master branch it has lost)
An error occurred:

LoadBranches, branch does not exist [repo_id: 3 name: master]

So it appears to have forgotten all the branches, even though the home page for the repo shows the master branch.

Pushing anything to the lost branches seems to restore them. Pushing something new to the master branch has resolved the branches list page error -- though the forgotten branches are tragically still missing. Anything people didn't have locally seems to be unreachable.

Quite the jump scare for the team today. :D

Gitea Version

1.21

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.40.1, Wire Protocol Version 2 Enabled

Operating System

docker image gitea:latest (1.21)

How are you running Gitea?

docker compose

Database

MySQL/MariaDB

yp05327 commented 10 months ago

Maybe this can fix this issue. https://github.com/go-gitea/gitea/issues/28056#issuecomment-1811664310

lunny commented 10 months ago

duplicated #28056