gitea: Migration of big GitHub repo fails
- Gitea version (or commit ref): 1.13.0+rc1
- Git version: 2.20.1
- Operating system: debian stable 10.6
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Log gist: https://gist.github.com/Codeberg-org/a4e32102e761c857ecf46e3fb6f22237
Description
When i try to migrate nixpkgs to the Codeberg test server, it always fails. We have increased the migration timeouts x100.
When we wait or open https://codeberg-test.org/NixOS/nixpkgs/settings/branches, we get a trace with error in setting_protected_branch.go:34.
It is not a hardware limitation.
Screenshots



About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 2
- Comments: 22 (13 by maintainers)
I really hope not! 🤖
Also, for what it’s worth I believe this would benefit from https://github.com/go-gitea/gitea/pull/12244 as well.Dumping to disk may not help if we are hitting a rate limit anyways.
For anyone looking in to it, this is the line referenced.
https://github.com/go-gitea/gitea/blob/ba97c0e98bc97957d6fd9bfd3db5768813c58ff3/routers/repo/setting_protected_branch.go#L34
Combine your tokens to free the code ✊
Might not be a good idea to give someone else your token…
Asking github would be an option, but it would be best if it just don’t fail and respect the API limit.
But this issue here has to be fixed first before we can try again.
It seems we do have some code for sleeping if we hit a rate limit.
https://github.com/go-gitea/gitea/blob/f0fe5683feb2799e3ca467bc75fd77871b65452b/modules/migrations/github.go#L113-L128
Do you have any logs surrounding that rate limit error that may indicate where in the migration process it was?