Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2346

[EVG tools] activate_venv.sh fails with RuntimeError: no .dist-info at ...

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: Evergreen Tools
    • None
    • Not Needed

      Noticed today in a patch build:

       [2022/06/01 22:52:27.397] [shell='sh' working_directory='\data\mci\96fe8fea8729b98936102ba6308d7d2e']
       [2022/06/01 22:52:27.397] Executing script with sh: if [ -n "true" ]; then
       [2022/06/01 22:52:27.397]   set -o errexit
       [2022/06/01 22:52:27.397] export DRIVERS_TOOLS="C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/drivers-tools"
       [2022/06/01 22:52:27.397] export MONGO_ORCHESTRATION_HOME="C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/drivers-tools/.evergreen/orchestration"
       [2022/06/01 22:52:27.397] export MONGODB_BINARIES="C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/drivers-tools/mongodb/bin"
       [2022/06/01 22:52:27.397] export UPLOAD_BUCKET="mongo-python-driver"
       [2022/06/01 22:52:27.397] export PROJECT_DIRECTORY="C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/src"
       [2022/06/01 22:52:27.397] export TMPDIR="C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/drivers-tools/.evergreen/orchestration/db"
       [2022/06/01 22:52:27.397] # Installation of cryptography requires a rust compiler on some machines
       [2022/06/01 22:52:27.397] export PATH="C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/drivers-tools/mongodb/bin:/home/admin/.cargo/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Python27:/cygdrive/c/Python27/Scripts:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/Windows/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/Amazon/cfn-bootstrap:/cygdrive/c/Program Files/Docker:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/Python27:/cygdrive/c/Python27/Scripts:/cygdrive/c/openssl/bin:/cygdrive/c/sasl/bin:/cygdrive/c/snmp/bin:/cygdrive/c/go/bin:/cygdrive/c/Program Files/Git/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Perl64/bin:/cygdrive/c/curl/dlls:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Users/mci-exec/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/mci-exec/.dotnet/tools:/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin:/cygdrive/c/Users/Administrator/AppData/Roaming/npm:/cygdrive/c/go/bin:/cygdrive/c/Windows/Sysnative:/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin"
       [2022/06/01 22:52:27.397] export PROJECT="mongo-python-driver"
       [2022/06/01 22:52:27.397]   cd C:/data/mci/96fe8fea8729b98936102ba6308d7d2e/drivers-tools/.evergreen/csfle
       [2022/06/01 22:52:27.397]   . ./activate_venv.sh
       [2022/06/01 22:52:27.397] fi
       [2022/06/01 22:52:27.400] tracking process with pid 3000
       [2022/06/01 22:52:27.400] started process with pid '3000'
       [2022/06/01 22:52:28.296] RuntimeError: failed to build image setuptools because:
       [2022/06/01 22:52:28.296] Traceback (most recent call last):
       [2022/06/01 22:52:28.296]   File "c:\python27\lib\site-packages\virtualenv\seed\embed\via_app_data\via_app_data.py", line 57, in _install
       [2022/06/01 22:52:28.296]     installer.install(creator.interpreter.version_info)
       [2022/06/01 22:52:28.296]   File "c:\python27\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 35, in install
       [2022/06/01 22:52:28.296]     self._uninstall_previous_version()
       [2022/06/01 22:52:28.296]   File "c:\python27\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 151, in _uninstall_previous_version
       [2022/06/01 22:52:28.296]     dist_name = self._dist_info.stem.split("-")[0]
       [2022/06/01 22:52:28.296]   File "c:\python27\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 115, in _dist_info
       [2022/06/01 22:52:28.296]     raise RuntimeError(msg)  # pragma: no cover
       [2022/06/01 22:52:28.296] RuntimeError: no .dist-info at C:\Users\mci-exec\AppData\Local\pypa\virtualenv\wheel\3.8\image\1\CopyPipInstall\setuptools-62.1.0-py3-none-any, has distutils-precedence.pth, pkg_resources, setuptools, _distutils_hack
      

      https://spruce.mongodb.com/task/mongo_python_driver_tests_windows_encryption__platform~windows_64_vsMulti_small_auth_ssl~noauth_nossl_python_version_windows~3.9_encryption~encryption_crypt_shared_test_rapid_replica_set_patch_f4fc742ff38110aa41f2a46b267319403d89f3b1_6297ec58c9ec447522c592ce_22_06_01_22_46_51/logs?execution=0&sortBy=STATUS&sortDir=ASC

      I believe the issue is that activate_venv.sh uses "virtualenv" which is Python 2.7 and no longer works. Instead we should use venv.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: