Skip to content

Commit

Permalink
fix: resolve failing ucc-gen by pinning pip version (#809)
Browse files Browse the repository at this point in the history
* fix: resolve failing ucc-gen by pinning pip version

With the latest pip version, the build started failing because the pip update command is not
deterministic. Since this potentially broke existing pipelines, even though ucc-gen was not  updated

#808

* fix: adjust the pip installation command

---------

Co-authored-by: Artem Rys <rysartem@gmail.com>
  • Loading branch information
dfederschmidt and artemrys authored Jul 17, 2023
1 parent 12c8c6d commit 33676a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion splunk_add_on_ucc_framework/install_python_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def install_libraries(
Upgrades `pip` version to the latest one and installs requirements to the
specified path.
"""
pip_update_command = f"{installer} -m pip install pip --upgrade"

pip_version = "23.1.2"
pip_update_command = f"{installer} -m pip install pip --upgrade pip=={pip_version}"
pip_install_command = (
f"{installer} "
f"-m pip "
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_install_python_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_install_libraries(mock_subprocess_call):
'--use-deprecated=legacy-resolver --target "'
'/path/to/output/addon_name/lib"'
)
expected_pip_update_command = "python3 -m pip install pip --upgrade"
expected_pip_update_command = "python3 -m pip install pip --upgrade pip==23.1.2"
mock_subprocess_call.assert_has_calls(
[
mock.call(expected_pip_update_command, shell=True),
Expand Down

0 comments on commit 33676a9

Please sign in to comment.