Skip to content
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

Builds for Helix Dockerfiles are all failing setting up virtual environment #1090

Open
mthalman opened this issue Jun 12, 2024 · 10 comments
Open

Comments

@mthalman
Copy link
Member

This command is failing: RUN python3 -m virtualenv /home/helixbot/.vsts-env

#9 0.494 RuntimeError: failed to build image pip, setuptools, wheel because:
#9 0.494 Traceback (most recent call last):
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 54, in _install
#9 0.494     with parent.non_reentrant_lock_for_key(wheel_img.name):
#9 0.494   File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
#9 0.494     return next(self.gen)
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 147, in non_reentrant_lock_for_key
#9 0.494     with _CountedFileLock(str(self.path / "{}.lock".format(name))):
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 24, in __init__
#9 0.494     super(_CountedFileLock, self).__init__(lock_file)
#9 0.494 TypeError: object.__init__() takes exactly one argument (the instance to initialize)
#9 0.494 
#9 0.494 Traceback (most recent call last):
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 54, in _install
#9 0.494     with parent.non_reentrant_lock_for_key(wheel_img.name):
#9 0.494   File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
#9 0.494     return next(self.gen)
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 147, in non_reentrant_lock_for_key
#9 0.494     with _CountedFileLock(str(self.path / "{}.lock".format(name))):
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 24, in __init__
#9 0.494     super(_CountedFileLock, self).__init__(lock_file)
#9 0.494 TypeError: object.__init__() takes exactly one argument (the instance to initialize)
#9 0.494 
#9 0.494 Traceback (most recent call last):
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 54, in _install
#9 0.494     with parent.non_reentrant_lock_for_key(wheel_img.name):
#9 0.494   File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
#9 0.494     return next(self.gen)
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 147, in non_reentrant_lock_for_key
#9 0.494     with _CountedFileLock(str(self.path / "{}.lock".format(name))):
#9 0.494   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 24, in __init__
#9 0.494     super(_CountedFileLock, self).__init__(lock_file)
#9 0.494 TypeError: object.__init__() takes exactly one argument (the instance to initialize)
#9 0.494 
#9 0.519 Exception ignored in: <function BaseFileLock.__del__ at 0xf097375f3ac0>
#9 0.521 Traceback (most recent call last):
#9 0.521   File "/usr/local/lib/python3.10/dist-packages/filelock/_api.py", line 365, in __del__
#9 0.521     self.release(force=True)
#9 0.521   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 35, in release
#9 0.522     with self.thread_safe:
#9 0.522 AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
#9 0.522 Exception ignored in: <function BaseFileLock.__del__ at 0xf097375f3ac0>
#9 0.522 Traceback (most recent call last):
#9 0.522   File "/usr/local/lib/python3.10/dist-packages/filelock/_api.py", line 365, in __del__
#9 0.522     self.release(force=True)
#9 0.522   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 35, in release
#9 0.522     with self.thread_safe:
#9 0.522 AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
#9 0.522 Exception ignored in: <function BaseFileLock.__del__ at 0xf097375f3ac0>
#9 0.522 Traceback (most recent call last):
#9 0.522   File "/usr/local/lib/python3.10/dist-packages/filelock/_api.py", line 365, in __del__
#9 0.522     self.release(force=True)
#9 0.523   File "/usr/local/lib/python3.10/dist-packages/virtualenv/util/lock.py", line 35, in release
#9 0.523     with self.thread_safe:
#9 0.523 AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
#9 ERROR: process "/bin/sh -c python -m virtualenv /home/helixbot/.vsts-env" did not complete successfully: exit code: 1

Example build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=705519&view=results

@lbussell
Copy link
Contributor

[Triage] @garath Helix python setup is failing in Helix Docker images.

Is this related to yesterday's Helix rollout?

@garath
Copy link
Member

garath commented Jun 13, 2024

Is this related to yesterday's Helix rollout?

Possibly... I'm not sure how to debug this. Do you have any pointers? What is this pipeline doing?

@mthalman
Copy link
Member Author

It's just building Dockerfiles. You can repro by building this Dockerfile, for example.

@garath
Copy link
Member

garath commented Jun 13, 2024

So you suspect there was a change dnceng made that was deployed in the last rollout that broke this? (Sorry for being pedantic, I'm not seeing anything familiar or anything obviously connecting it to the rollout so I'm trying to find some touchpoints.)

@mthalman
Copy link
Member Author

Nobody on our team is very knowledgeable on Python so we're just guessing here. But this is what might be the cause:

pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \

So if something recently rolled out there it could impact the behavior in the build here.

@mthalman
Copy link
Member Author

It also might be purely in the realm of a Python change, unrelated to Helix. We're not sure yet.

@garath
Copy link
Member

garath commented Jun 13, 2024

Looking at the change history... I see no changes related to either the helix client or the version of Python we install on machines. Hmm...

@lbussell
Copy link
Contributor

Nobody on our team is very knowledgeable on Python

... or Helix

@richlander
Copy link
Member

Related: #1093

@richlander
Copy link
Member

When helix images are launched, what does that look like? Does anyone have a link to the script that does that? That would be super useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Tracking
Development

No branches or pull requests

4 participants