Closed jakubgs closed 2 years ago
Bumping the timeout worked, but then I found out that it times out on the Gitea side due to size of nixpkgs
repo:
Traceback (most recent call last):
File "/usr/local/bin/gitea_mirror.py", line 75, in create_update_repo
self.get_repo(repo)
File "/usr/local/bin/gitea_mirror.py", line 107, in get_repo
return self._request('GET', 'repos/%s/%s' % (repo.owner.login, repo.name))
File "/usr/local/bin/gitea_mirror.py", line 36, in _request
result.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:3000/api/v1/repos/status-im/nixpkgs
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/gitea_mirror.py", line 190, in <module>
main()
File "/usr/local/bin/gitea_mirror.py", line 175, in main
resp = ga.create_update_repo(repo)
File "/usr/local/bin/gitea_mirror.py", line 78, in create_update_repo
return self.create_repo(repo)
File "/usr/local/bin/gitea_mirror.py", line 110, in create_repo
return self._request('POST', 'repos/migrate', self._parse_gh_repo(repo))
File "/usr/local/bin/gitea_mirror.py", line 36, in _request
result.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://127.0.0.1:3000/api/v1/repos/migrate
Since the default migration timeout is 600 seconds: https://docs.gitea.io/en-us/config-cheat-sheet/#git---timeout-settings-gittimeout
Changes:
It works now:
systemd[1]: Starting Gitea/GitHub Repo Mirroring...
gitea_mirror.py[70640]: INFO - Gitea URL: http://127.0.0.1:3000/api/v1/
gitea_mirror.py[70640]: INFO - Gitea Version: 1.15.5
gitea_mirror.py[70640]: INFO - Org: dap-ps
gitea_mirror.py[70640]: INFO - Created: 0, Updated: 4
gitea_mirror.py[70640]: INFO - Org: embarklabs
gitea_mirror.py[70640]: INFO - Created: 0, Updated: 55
gitea_mirror.py[70640]: INFO - Org: status-im
gitea_mirror.py[70640]: WARNING - [status-im/qt5]: SKIPPING
gitea_mirror.py[70640]: WARNING - [status-im/nixpkgs]: SKIPPING
gitea_mirror.py[70640]: INFO - Created: 0, Updated: 539
systemd[1]: gitea-mirrors.service: Succeeded.
systemd[1]: Finished Gitea/GitHub Repo Mirroring.
Looks like our Gitea mirroring job is failing: