New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 762122 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 760727
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

infra_virtualenv/venv/cros_venv/venvlib.py should catch & triage missing commands

Project Member Reported by kenobi@chromium.org, Sep 5 2017

Issue description

The pre-upload script is failing in the autotest repo.

Here is a sample error:

Errors in PROJECT *.*!
    COMMIT pre-subm:
        Description:
            >
        Errors:
            * Hook script "./bin/test_lucifer" failed with code 1:
              Traceback (most recent call last):
                File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
                  "__main__", fname, loader, pkg_name)
                File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
                  exec code in run_globals
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/scripts/create_venv.py", line 46, in <module>
                  main()
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/scripts/create_venv.py", line 35, in main
                  print(venv.ensure())
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/venvlib.py", line 174, in ensure
                  self._check_or_create()
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/venvlib.py", line 182, in _check_or_create
                  self._create()
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/venvlib.py", line 191, in _create
                  logfile=logfile)
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/venvlib.py", line 282, in _create_venv
                  _log_check_call(command, logfile=logfile)
                File "/mnt/ssd1/chromeos/infra_virtualenv/venv/cros_venv/venvlib.py", line 304, in wrapped_command
                  call_func(args, stdout=logfile, **kwargs)
                File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
                  retcode = call(*popenargs, **kwargs)
                File "/usr/lib/python2.7/subprocess.py", line 522, in call
                  return Popen(*popenargs, **kwargs).wait()
                File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
                  errread, errwrite)
                File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
                  raise child_exception
              OSError: [Errno 2] No such file or directory
              ERROR: Failed to set up virtualenv
              

The culprit appears to be this CL:

https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/580670
 
Summary: infra_virtualenv/venv/cros_venv/venvlib.py should catch & triage missing commands (was: pre-upload script failing in autotest)
error was because user didn't have `virtualenv` installed.  we should be able to catch that scenario and issue an appropriate message for users to resolve themselves.
Cc: jkop@chromium.org
Labels: Hotlist-Fixit
Mergedinto: 760727
Status: Duplicate (was: Untriaged)

Sign in to add a comment