Project

Profile

Help

Issue #6643

Updated by mdepaulo@redhat.com over 4 years ago

Consider the following scenario: 
 1. Pulp 3.2.1 & pulp-file 0.2 were installed. 
 2. The user runs the latest pulp_installer (3.3), to upgrade pulpcore (3.3), and pulp-file (0.3). 
 3. The user specifies to install pulp-file in pulp_install_plugins, and includes "upgrade:true ". This instructs the installer to upgrade pulp-file to the latest version, which is currently 0.3. 

 This causes the following to happen 

 1. /usr/local/lib/pulp/requirements.txt exists and contains pulp-file==0.2 
 2. pip-compile sees "pulp-file" in requirements.in that pulp_installer generates, but has no further instructions to upgrade pulp-file. 
 3. pip-compile produces the following error, and the installer fails: 
 ``` 
 There are incompatible versions in the resolved dependencies: 
   pulpcore==3.3.0 (from -r requirements.in (line 1)) 
   pulpcore<3.3,>=3.0 (from pulp-file==0.2.0->-r requirements.in (line 2)) 
 ``` 
 4. However, if the pre-flight check was ignored, the install would have succeeded, because pulp-file would have been upgraded actually. 

 Users can work around this currently by specifying "version" for the plugin. 

 We can fix this by running a pre-flight command like: 
 `pip-compile -P pulp-file` 
 or if multiple plugins are specified to be upgraded: 
 `pip-compile -P pulp-file -P pulp-container` 
 This is in addition to the requirements.in existing like it currently does. 

 Another implementation (which I need to check if it will work, if pip-tools supports it) is per-requirement overrides for upgrading: 
 https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides 

 I confirmed that this will fix this with a venv, starting with these packages installed: 
 pip install pulp-container==1.2.0 pulp-file==0.2.0 
 pip install pulp-container==1.2.0 pulp-file==0.2.0 pulpcore==3.2.1 

Back