Feat!: Re-factor lf-activate-venv() to re-use venv
[releng/global-jjb.git] / releasenotes / notes / refactor-lf-activate-venv-0bf51b617553ab93.yaml
1 ---
2 features:
3   - |
4     Add support for a new option to set venv file.
5
6     lf-activate-venv --venv-file /tmp/.robot_venv robotframework
7
8     Modify lf-activate-venv() to allow creation of a venv file and re-use the
9     venv to improve job performance. When a dependency is already installed, pip
10     skips the package therefore reduces the time it takes to create
11     venv in every script.
12
13     Precedence for venv file.
14       a. Re-use an existing venv file if one exists.
15            1. Use venv file path from --venv-file
16            2. Use default venv file path "/tmp/.os_lf_venv"
17       b. Create new venv when 1. and 2. is absent
18
19     Note: The default file "/tmp/.os_lf_venv" is created by a pre-build
20     script (../shell/python-tools-install.sh).
21
22     In the situation where a fresh venv is required remove "/tmp/.os_lf_venv"
23     before calling lf-activate-venv().
24
25     Update all the required scripts that call lf-activate-venv().
26 fixes:
27   - |
28     Clean up conditions introduce in the shell scripts, while these checks
29     are performed within lf-activate-venv().