plone / buildout.coredev

Plone Core Development Buildout
http://docs.plone.org/develop/coredev/docs/
74 stars 75 forks source link

gh-actions: Windows buildout fails on z3c.relationfield #819

Closed mauritsvanrees closed 2 years ago

mauritsvanrees commented 2 years ago

This error first occurred after commit 3a1040920e37ff28ebd06188f45bedc54741ac3d three days ago, but that should really have no influence: it replaces a checkout of plone.namedfile with a new version. The error is:

While:
  Installing instance.
  Getting distribution for 'z3c.relationfield==0.9.0'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\buildout.py", line 2250, in main
    getattr(buildout, command)(args)
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\buildout.py", line 855, in install
    installed_files = self[part]._call(recipe.install)
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\buildout.py", line 1651, in _call
    return f()
  File "d:\a\buildout.coredev\buildout.coredev\eggs\plone.recipe.zope2instance-6.11.0-py3.10.egg\plone\recipe\zope2instance\recipe.py", line 148, in install
    self.build_zope_conf()
  File "d:\a\buildout.coredev\buildout.coredev\eggs\plone.recipe.zope2instance-6.11.0-py3.10.egg\plone\recipe\zope2instance\recipe.py", line 707, in build_zope_conf
    requirements, ws = self.egg.working_set(["plone.recipe.zope2instance"])
  File "d:\a\buildout.coredev\buildout.coredev\eggs\zc.recipe.egg-2.0.7-py3.10-win-amd64.egg\zc\recipe\egg\egg.py", line 78, in working_set
    ws = self._working_set(
  File "d:\a\buildout.coredev\buildout.coredev\eggs\zc.recipe.egg-2.0.7-py3.10-win-amd64.egg\zc\recipe\egg\egg.py", line 161, in _working_set
    ws = zc.buildout.easy_install.install(
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\easy_install.py", line 971, in install
    return installer.install(specs, working_set)
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\easy_install.py", line 744, in install
    for dist in self._get_dist(req, ws):
  File "d:\a\buildout.coredev\buildout.coredev\eggs\plone.versioncheck-1.7.0-py3.10.egg\plone\versioncheck\tracking.py", line 24, in get_dist
    dists = old_get_dist(self, requirement, *ags, **kw)
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\easy_install.py", line 581, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "C:\hostedtoolcache\windows\Python\3.10.7\x64\lib\site-packages\zc\buildout\easy_install.py", line 1922, in _move_to_eggs_dir_and_compile
    os.rename(tmp_loc, newloc)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'd:\\a\\buildout.coredev\\buildout.coredev\\eggs\\tmpuyxno54j\\z3c.relationfield-0.9.0-py3.10.egg' -> 'd:\\a\\buildout.coredev\\buildout.coredev\\eggs\\z3c.relationfield-0.9.0-py3.10.egg'

The action runs after this commit all fail with the same error: Windows tries to move the z3c.relationfield egg to a place where this egg already exists, which makes no sense. Any idea?

I suppose I could make a release of that package in the hopes that this magically fixes the build. In the past three years no real code changes were done. The package could use gh-actions instead of Travis, and run tests on Python 3.9 and 3.10. Volunteers are welcome.

davisagli commented 2 years ago

@mauritsvanrees I cleared the github caches and now the build passed. I don't understand the root cause yet, so maybe it will happen again.

mauritsvanrees commented 2 years ago

Weird. Thanks!