Changeset - b1e34e730d97
[Not reviewed]
0 1 0
Branko Majic (branko) - 5 months ago 2023-11-20 00:26:58
branko@majic.rs
MAR-184: Resort to using backtracking resolver in pip upgrades checks when available.
1 file changed with 9 insertions and 3 deletions:
0 comments (0 inline, 0 general)
roles/common/files/pip_check_requirements_upgrades.sh
Show inline comments
 
@@ -237,9 +237,15 @@ for environment in "$config_dir"/*; do
 
        # package versioning information.
 
        current=$(sed -e 's/[[:blank:]]*#.*//' "$req_txt" | grep -v "^$" | sort -u)
 

	
 
        # Calculate up-to-date requirements.
 
        new=$(pip-compile --quiet --allow-unsafe --no-header --no-annotate --no-emit-index-url --output-file - --upgrade "$req_in")
 
        result="$?"
 
        # Calculate up-to-date requirements. Use backtracking resolver if available.
 
        if pip-compile --help | grep -q -- --resolver; then
 
            new=$(pip-compile --quiet --resolver backtracking --allow-unsafe --no-header --no-annotate --no-emit-index-url --output-file - --upgrade "$req_in")
 
            result="$?"
 
        else
 
            new=$(pip-compile --quiet --allow-unsafe --no-header --no-annotate --no-emit-index-url --output-file - --upgrade "$req_in")
 
            result="$?"
 
        fi
 

	
 
        if [[ $result != 0 ]]; then
 
             error "Failed while running pip-compile command against (see error stack trace above): $req_in"
 
            continue
0 comments (0 inline, 0 general)