New branches no longer sync to DB after upgrading from 1.20.4 to 1.21.5. #12436

Closed
opened 2025-11-02 10:09:46 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @seeplusplus on GitHub (Feb 4, 2024).

Description

Edit:

I'm leaving the original description below, in case it matters later, but I've done more testing and concluded this isn't an issue with the upgrade per se. I am running gitea on a Linux box with one disk mounted on / and a raid5 mdadm array mounted on /data. Normally, my gitea's docker-compose and the data and config dirs are on /data (I am using the exact docker-compose listed here). The "branch sync" issue does start showing up after the 1.21.5 upgrade, but I have confirmed that this behavior happens on even fresh instances of 1.21.5 when those dirs are on /data. Curiously, if I move to a dir on / everything works fine. 1.20 works on /data, that is, without sync issues on pushing new branches, but if upgraded to 1.21 I get sync issues again. Any clues as to why the disk that's running gitea would affect synchronization?

Original post

After upgrading from 1.20.5 to 1.21.5 pushing a new branch to any repo (created before or after the upgrade) doesn't get synced to DB without manually triggering a sync on the admin dashboard. I am able to confirm that the branch does push successfully and does show up on disk, but it's just not showing up in the branch table in my DB.

On two repositories that existed before upgrade:

  • Locally create new branch based on existing branch and push to origin
  • Branch doesn't show up in branch list

On new repository created after upgrade:

  1. Create repo locally and push with fresh main branch.
  2. main shows up in the web UI after push.
  3. Create new branch based on main and push.
  4. Branch does not show up in web UI.
  5. Can repeat 3 as many times as I want, branch never shows up, and if
  6. I add new commits to any number of branches created in steps 3-5, and push they still don't show up.

I thought perhaps this issue:
https://github.com/go-gitea/gitea/issues/28056

and the linked fixes:
https://github.com/go-gitea/gitea/pull/28361
https://github.com/go-gitea/gitea/pull/28403

Would fix it, but these both to have been included in 1.21.5.

I am unable to reproduce this on the Gitea demo site or on a fresh install of Gitea 1.21+

Gitea Version

1.21.5 and 1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

I first created a branch in repo "saboteur" and pushed it (with no commits) at 2024/02/04 17:23:27. After some time I made a commit adding an empty file and pushed it around 17.25.25. Neither time did the new branch show up in the web UI.

https://gist.github.com/seeplusplus/29aafc7e4eb62c01ca84ed26bd4d4d61

Screenshots

No response

Git Version

2.40.1

Operating System

debian 12.4 kernel 6.1.38

How are you running Gitea?

Docker image: gitea/gitea:1.21-rootless, also tested with gitea/gitea:1.21.0-rootless. I am unable to downgrade back to 1.20 to confirm that this issue started in 1.21 because it's impossible to downgrade databases and I made no backup before upgrading. I have tested that gitea:1.21-rooteless works fine on a fresh install however.

Database

SQLite

Originally created by @seeplusplus on GitHub (Feb 4, 2024). ### Description **Edit:** I'm leaving the original description below, in case it matters later, but I've done more testing and concluded this isn't an issue with the upgrade per se. I am running gitea on a Linux box with one disk mounted on `/` and a raid5 mdadm array mounted on `/data`. Normally, my gitea's docker-compose and the data and config dirs are on `/data` (I am using the exact docker-compose listed [here](https://docs.gitea.com/installation/install-with-docker-rootless)). The "branch sync" issue does start showing up after the 1.21.5 upgrade, but I have confirmed that this behavior happens on even fresh instances of 1.21.5 when those dirs are on `/data`. Curiously, if I move to a dir on `/` everything works fine. 1.20 works on `/data`, that is, without sync issues on pushing new branches, but if upgraded to 1.21 I get sync issues again. Any clues as to why the disk that's running gitea would affect synchronization? **Original post** After upgrading from 1.20.5 to 1.21.5 pushing a new branch to any repo (created before or after the upgrade) doesn't get synced to DB without manually triggering a sync on the admin dashboard. I am able to confirm that the branch does push successfully and does show up on disk, but it's just not showing up in the `branch` table in my DB. On two repositories that existed before upgrade: - Locally create new branch based on existing branch and push to origin - Branch doesn't show up in branch list On new repository created after upgrade: 1. Create repo locally and push with fresh `main` branch. 2. `main` shows up in the web UI after push. 3. Create new branch based on main and push. 4. Branch does not show up in web UI. 5. Can repeat 3 as many times as I want, branch never shows up, and if 6. I add new commits to any number of branches created in steps 3-5, and push they still don't show up. I thought perhaps this issue: https://github.com/go-gitea/gitea/issues/28056 and the linked fixes: https://github.com/go-gitea/gitea/pull/28361 https://github.com/go-gitea/gitea/pull/28403 Would fix it, but these both to have been included in 1.21.5. I am unable to reproduce this on the Gitea demo site or on a fresh install of Gitea 1.21+ ### Gitea Version 1.21.5 and 1.21.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist I first created a branch in repo "saboteur" and pushed it (with no commits) at 2024/02/04 17:23:27. After some time I made a commit adding an empty file and pushed it around 17.25.25. Neither time did the new branch show up in the web UI. https://gist.github.com/seeplusplus/29aafc7e4eb62c01ca84ed26bd4d4d61 ### Screenshots _No response_ ### Git Version 2.40.1 ### Operating System debian 12.4 kernel 6.1.38 ### How are you running Gitea? Docker image: `gitea/gitea:1.21-rootless`, also tested with `gitea/gitea:1.21.0-rootless`. I am unable to downgrade back to 1.20 to confirm that this issue started in 1.21 because it's impossible to downgrade databases and I made no backup before upgrading. I have tested that `gitea:1.21-rooteless` works fine on a fresh install however. ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 10:09:46 -06:00
Author
Owner

@lunny commented on GitHub (Feb 19, 2024):

Have you tried to sync hooks on admin panel? And you can manually sync branches after sync hooks.

@lunny commented on GitHub (Feb 19, 2024): Have you tried to sync hooks on admin panel? And you can manually sync branches after sync hooks.
Author
Owner

@seeplusplus commented on GitHub (Feb 19, 2024):

I tried sync hooks, doesn't change anything.

@seeplusplus commented on GitHub (Feb 19, 2024): I tried sync hooks, doesn't change anything.
Author
Owner

@lunny commented on GitHub (Feb 27, 2024):

Have you tried to sync hooks on admin panel? And you can manually sync branches after sync hooks.

And have you also tried to run sync branches?

@lunny commented on GitHub (Feb 27, 2024): > Have you tried to sync hooks on admin panel? And you can manually sync branches after sync hooks. And have you also tried to run `sync branches`?
Author
Owner

@seeplusplus commented on GitHub (Mar 1, 2024):

I actually found the solution to this while trying to get Actions to work. I was running into an issue where workflows weren't running and it turns out there's another issue on he act_runner repo where OP was running on a noexec filesystem. That ended up being true for me as well and it seems that since making the filesystem that runs gitea exec this issue has also been resolved.

Thanks for your help @lunny

@seeplusplus commented on GitHub (Mar 1, 2024): I actually found the solution to this while trying to get Actions to work. I was running into an issue where workflows weren't running and it turns out there's another issue on he act_runner repo where OP was running on a `noexec` filesystem. That ended up being true for me as well and it seems that since making the filesystem that runs gitea `exec` this issue has also been resolved. Thanks for your help @lunny
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12436