Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

OSX job fails because unable to delete the venv folder #85

Closed
mikaelarguedas opened this issue Feb 15, 2018 · 3 comments
Closed

OSX job fails because unable to delete the venv folder #85

mikaelarguedas opened this issue Feb 15, 2018 · 3 comments

Comments

@mikaelarguedas
Copy link
Member

mikaelarguedas commented Feb 15, 2018

OSX job failing due to permission error on virtualenv folder deletion. This can likely be fixed by deleting the folder manually on the machine but we should figure out why it happened.
I think we've seen that in the past when the previous job was aborted but in this case mini2 seems to have completed the previous builds successfully. Console output below
@sloretz (build cop) FYI

``` ==> /usr/local/opt/python3/bin/python3.6 -m pip install -U virtualenv Requirement already up-to-date: virtualenv in /usr/local/lib/python3.6/site-packages

WW> Deleting the folder at 'venv'.
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 436, in _rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'init.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "run_ros2_batch.py", line 32, in
sys.exit(main())
File "/Users/osrf/jenkins/workspace/ci_osx/ros2_batch_job/main.py", line 86, in main
return run(args, build_and_test, blacklisted_package_names=blacklisted_package_names)
File "/Users/osrf/jenkins/workspace/ci_osx/ros2_batch_job/main.py", line 379, in run
remove_folder(venv_subfolder)
File "/Users/osrf/jenkins/workspace/ci_osx/ros2_batch_job/util.py", line 114, in remove_folder
shutil.rmtree(path, onerror=del_rw)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 480, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 418, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 418, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 418, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 438, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/Users/osrf/jenkins/workspace/ci_osx/ros2_batch_job/util.py", line 112, in del_rw
os.chmod(name, stat.S_IWRITE)
PermissionError: [Errno 1] Operation not permitted: 'venv/lib/python3.6/site-packages/_pytest/init.py'

@nuclearsandwich
Copy link
Member

I was surprised this was a new issue. I'd thought I'd seen one like it but there's not one in the issue trackers of either this repo or ros2/ci. 🤔

@sloretz
Copy link

sloretz commented Jun 4, 2018

Similar to #45

@dirk-thomas
Copy link
Member

Closing as duplicate of #161.

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

No branches or pull requests

4 participants