You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gitlab-artifact-cleanup script unable to delete some artifacts #217
The script worked fine on most projects but not this last one.
Here is the error we get.
powerserver7 / Worklist
Traceback (most recent call last):
File "/opt/gitlab-artifact-cleanup/gitlab-artifact-cleanup", line 181, in
main()
------ more logs-----
------ more logs-----
File "/usr/local/lib/python2.7/dist-packages/python_gitlab-0.15.1-py2.7.egg/gitlab/init.py", line 392, in _raw_list
results.extend(self.list(cls, **args))
File "/usr/local/lib/python2.7/dist-packages/python_gitlab-0.15.1-py2.7.egg/gitlab/init.py", line 468, in list
return self._raw_list(url, obj_class, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_gitlab-0.15.1-py2.7.egg/gitlab/init.py", line 392, in _raw_list
results.extend(self.list(cls, **args))
File "/usr/local/lib/python2.7/dist-packages/python_gitlab-0.15.1-py2.7.egg/gitlab/init.py", line 468, in list
return self._raw_list(url, obj_class, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_gitlab-0.15.1-py2.7.egg/gitlab/init.py", line 374, in _raw_list
r = self.raw_get(path, **params)
File "/usr/local/lib/python2.7/dist-packages/python_gitlab-0.15.1-py2.7.egg/gitlab/init.py", line 360, in _raw_get
"Can't connect to GitLab server (%s)" % e)
gitlab.exceptions.GitlabConnectionError: Can't connect to GitLab server (maximum recursion depth exceeded)
And this is our system info.
System information
System: Ubuntu 14.04
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.6
Rake Version: 10.5.0
Sidekiq Version:4.2.1
GitLab information
Version: 8.14.4
Revision: 3ea6c8d
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL:
HTTP Clone URL:
SSH Clone URL:
Using LDAP: yes
Using Omniauth: no
This is because gitlab-artifact-cleanup uses project.builds.list(all=True) which recursively populates a list of builds, eventually hitting the recursion limit on a large project.
Activity
gpocentek commentedon Feb 8, 2017
Could you check with the gitlab-artifact-cleanup project what could happen? https://github.com/JonathonReinhart/gitlab-artifact-cleanup
I can't be sure that your problem is related to python-gitlab. Thanks.
johanbrandhorst commentedon Mar 15, 2017
This is because
gitlab-artifact-cleanupusesproject.builds.list(all=True)which recursively populates a list of builds, eventually hitting the recursion limit on a large project.johanbrandhorst commentedon Mar 15, 2017
I've submitted a PR that fixes it.