Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seeplusplus opened this issue Feb 4, 2024 · 4 comments
Closed
Labels

Comments

@seeplusplus
Copy link

seeplusplus commented 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:
#28056

and the linked fixes:
#28361
#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

@lunny
Copy link
Member

lunny commented Feb 19, 2024

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

@seeplusplus
Copy link
Author

I tried sync hooks, doesn't change anything.

@lunny
Copy link
Member

lunny commented 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?

@seeplusplus
Copy link
Author

seeplusplus commented 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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants