gitea: Migration of big GitHub repo fails

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

Screenshot from 2020-10-21 15-14-34

Screenshot from 2020-10-21 15-23-41

Screenshot from 2020-10-21 19-03-50 Screenshot from 2020-10-21 19-08-58

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 2
  • Comments: 22 (13 by maintainers)

Most upvoted comments

@jolheiser are you a bot?

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.

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?