Skip to content

Today after after this change poetry installs in Docker/Podman containers started to fail (it depends on filelock which was bumped from 3.10.0 to 3.10.12), from our CI log: #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gaborbernat opened this issue Mar 23, 2023 · 5 comments

Comments

@gaborbernat
Copy link
Member

          Today after after this change poetry installs in Docker/Podman containers started to fail (it depends on filelock which was bumped from 3.10.0 to 3.10.12), from our CI log:
$ pip install --user poetry

Successfully installed <...> filelock-3.10.2 <...>

$ $HOME/.local/bin/poetry env use python3.8
Creating virtualenv <...>-YGs9DcwD-py3.8 in /home/workspace/.cache/pypoetry/virtualenvs
failed to build image pip, wheel, setuptools because:
Traceback (most recent call last):
  File "/home/workspace/.local/lib/python3.10/site-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 52, in _install
    with parent.non_reentrant_lock_for_key(wheel_img.name):
  File "/usr/local/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/workspace/.local/lib/python3.10/site-packages/virtualenv/util/lock.py", line 146, in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
  File "/home/workspace/.local/lib/python3.10/site-packages/filelock/_api.py", line 227, in __enter__
    self.acquire()
  File "/home/workspace/.local/lib/python3.10/site-packages/virtualenv/util/lock.py", line 29, in acquire
    super().acquire(timeout, poll_interval)
  File "/home/workspace/.local/lib/python3.10/site-packages/filelock/_api.py", line 182, in acquire
    self._acquire()
  File "/home/workspace/.local/lib/python3.10/site-packages/filelock/_unix.py", line 36, in _acquire
    os.chmod(fd, self._mode)
PermissionError: [Errno 1] Operation not permitted: 3

The only w/a is after installing poetry forcefully downgrading filelock to <= 3.10.1

Originally posted by @xiormeesh in #206 (comment)

@gaborbernat
Copy link
Member Author

cc @jahrules perhaps we should put this change request in try/cache?

@gaborbernat
Copy link
Member Author

@xiormeesh can you post a docker image reproducing this?

@jahrules
Copy link
Contributor

cc @jahrules perhaps we should put this change request in try/cache?

Yep. I suspect what's happening is that now it's trying to modify permissions of files in doesn't own. Putting this in a try catch will resolve this quickly. I'll have the fix ready within an hour

@xiormeesh
Copy link

Image is https://quay.io/repository/ccxdev/ccx-builder-py?tab=tags&tag=latest, if fix @jahrules has in mind won't help I'll try to prepare a simpler reproducer tomorrow/next week, that image is indeed quite loaded (it's out multi-purpose CI image based on ubi8). If we are the only ones having this issue I'll dig deeper if something in our image is triggering that. But yeah, same image works if we force downgrading filelock to 3.10.0.

@gaborbernat
Copy link
Member Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants