[x]
):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.
For anyone looking in to it, this is the line referenced.
@jolheiser are you a bot? :smile: (because of the instant reaction)
Thanks for the information!
It might be possible that not all branches are migrated or the data is broken, so ctx.Data["Branches"]
don't exist?
To add some more color, this log line (also referenced in the gist) indicates that gh throttled API calls, fetched data may or may not be truncated or incomplete:
modules/task/task.go:51:handle() [E] Run task failed: GET https://api.github.com/repos/NixOS/nixpkgs: 403 API rate limit of 5000 still exceeded until 2020-10-21 16:33:28 +0200 CEST, not making remote request. [rate reset in 34m49s]
(fwiw there was no log line reporting API request errors or timeouts).
@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.
And nixpkgs is way bigger. It has 100,000 issues and pull requests. Probably the second most on GitHub (1. is vscode).
Even if API limits are hit, migration should not fail but get throttled, too? Ideally with some estimate of ETA?
It seems we do have some code for sleeping if we hit a rate limit.
Do you have any logs surrounding that rate limit error that may indicate where in the migration process it was?
Dumping to disk may not help if we are hitting a rate limit anyways.
We got this trace 3 times without seeing the api limit message, so it is not related to this issue. We got the limit after trying too often and waited.
Even if API limits are hit, migration should not fail but get throttled, too? Ideally with some estimate of ETA?
That's a separate issue (https://github.com/go-gitea/gitea/issues/13243).
@davidak I dont know how expencive it is, but if one of NixOS maintainers buy a GitHub enterprice account for the periode of migration, it would be faster in genera ... (higher api rate limit)
@6543 do you mean GitHub Pro (https://github.com/account/upgrade) or where can you buy it?
That seem like a useful information that should be part of documentation.
But you should not have to buy your data free in general.
@davidak He's referring to https://github.com/enterprise which is basically self-hosted GitHub.
@jolheiser no i thought I saw something for github itseve to icrease api request limit ...
... was searching in the docs but could not find it anymore
a other trick we could to: allow multible tokens for github migrator ... to switch token when one got ratelimited?
@davidak what do you think?
@davidak also as suggested on https://stackoverflow.com/questions/16732103/increase-github-api-limit just contact github directly?
Combine your tokens to free the code :fist_raised:
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.
Do you have any logs surrounding that rate limit error that may indicate where in the migration process it was?
Could not see anything in the log; is some special app.ini config needed to enable this logging?
could be related to #13230
If you are migrating multiple projects at the same time, there are some chances to encounter the rate limit. The rate limit is per github acccount I think.
I can confirm this issue. This is a MASSIVE problem.
I encounter this issue even if I mirror 1 project at a time.
I even encounter this issue with a brand new Github account.
The instance tested are all running 1.12.5. (edit: also an issue on 1.13.0+rc1)
From what I discovered Codeberg doesn't seem to be affected by this, but every instance where I tried (including my own) is affected.
@Codeberg-org do you guys have any specific settings for migrations? I couldn't find anything special in this config file https://codeberg.org/Codeberg/build-deploy-gitea/src/branch/master/etc/gitea/conf/app.ini
Most helpful comment
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.