You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run our build pipelines in Gitlab with Windows runners.
We create a Python virtual env using 'Gitlab runner A'. This will create a Python virtualenv with runner A's path hardcoded 'everywhere'.
We save the virtual environment using Gitlab's artifacts.
We download the virtual env built under 'Gitlab runner A' and in certain cases, we use it under 'Gitlab runner B'. Because a) Python has the habit of using absolute paths in the venvs, and b) Gitlab uses different paths for each runner, to make the venv usable, we created a symlink named after the path for 'Gitlab runner A' and pointing to 'Gitlab runner B'.
Step 3 works in every situation we have encountered in the last year, except with pytest when we started using custom plugins. That context raises ImportMismatchError, even if the venv if fully functional; the check is purely nominal (path A is not equal to path B), whereas both paths work, because we have the symlink and the actual physical path.
COS:
raise an error only when the functionality is actually broken ?
have the possibility to ignore the error?
do not ignore symlinks?
The text was updated successfully, but these errors were encountered:
Here's our case:
We run our build pipelines in Gitlab with Windows runners.
We create a Python virtual env using 'Gitlab runner A'. This will create a Python virtualenv with runner A's path hardcoded 'everywhere'.
We save the virtual environment using Gitlab's artifacts.
We download the virtual env built under 'Gitlab runner A' and in certain cases, we use it under 'Gitlab runner B'. Because a) Python has the habit of using absolute paths in the venvs, and b) Gitlab uses different paths for each runner, to make the venv usable, we created a symlink named after the path for 'Gitlab runner A' and pointing to 'Gitlab runner B'.
Step 3 works in every situation we have encountered in the last year, except with pytest when we started using custom plugins. That context raises ImportMismatchError, even if the venv if fully functional; the check is purely nominal (path A is not equal to path B), whereas both paths work, because we have the symlink and the actual physical path.
COS:
The text was updated successfully, but these errors were encountered: