Skip to content

Revert "Fix slave on reinstall python wheel (#24727)"#24760

Merged
yxieca merged 1 commit intosonic-net:masterfrom
qiluo-msft:qiluo/revertreinstall
Dec 6, 2025
Merged

Revert "Fix slave on reinstall python wheel (#24727)"#24760
yxieca merged 1 commit intosonic-net:masterfrom
qiluo-msft:qiluo/revertreinstall

Conversation

@qiluo-msft
Copy link
Collaborator

This reverts commit 4dd3b8a.

Seen below build error.

[ REASON ] :      target/docker-dhcp-server.gz does not exist   NON-EXISTENT PREREQUISITES: docker-start target/docker-config-engine-bookworm.gz-load target/python-wheels/bookworm/sonic_utilities-1.2-py3-none-any.whl-install target/debs/bookworm/python3-swsscommon_1.0.0_amd64.deb-install 
[ FLAGS  FILE    ] : [vs amd64 bookworm] 
[ FLAGS  DEPENDS ] : [vs amd64 bookworm] 
[ FLAGS  DIFF    ] : [] 
ImportError while loading conftest '/sonic/dockers/docker-dhcp-server/cli-plugin-tests/conftest.py'.
conftest.py:8: in <module>
    import mock_tables
mock_tables.py:9: in <module>
    from sonic_py_common import multi_asic
/usr/local/lib/python3.11/dist-packages/sonic_py_common/multi_asic.py:5: in <module>
    from natsort import natsorted
E   ModuleNotFoundError: No module named 'natsort'

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft marked this pull request as ready for review December 5, 2025 20:46
Copilot AI review requested due to automatic review settings December 5, 2025 20:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts a previous commit (#24727) that added --force-reinstall --no-deps flags to pip install commands in the build system. The revert is necessary because the --no-deps flag prevented pip from installing dependencies, causing a build failure where the natsort module was missing when importing sonic_py_common.multi_asic.

Key Changes

  • Removed --force-reinstall --no-deps flags from pip install commands for both native and cross-build environments
  • Restored default pip install behavior to allow dependency installation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

else
# Link python script and data expected location to the cross python virtual env installation locations
{ PATH=$(VIRTENV_BIN_CROSS_PYTHON$($*_PYTHON_VERSION)):${PATH} sudo -E $(VIRTENV_BIN_CROSS_PYTHON$($*_PYTHON_VERSION))/pip$($*_PYTHON_VERSION) install --force-reinstall --no-deps $(PYTHON_WHEELS_PATH)/$* $(LOG) && $(if $(findstring $(SONIC_CONFIG_ENGINE_PY3),$*),(sudo ln -s $(VIRTENV_BIN_CROSS_PYTHON$($*_PYTHON_VERSION))/sonic-cfggen /usr/local/bin/sonic-cfggen 2>/dev/null || true), true ) && $(if $(findstring $(SONIC_YANG_MODELS_PY3),$*),(sudo ln -s $(VIRTENV_BASE_CROSS_PYTHON3)/yang-models /usr/local/yang-models 2>/dev/null || true), true ) && rm -d $(PYTHON_WHEELS_PATH)/pip_lock && break; } || { rm -d $(PYTHON_WHEELS_PATH)/pip_lock && exit 1 ; }
# Link python script and data expected location to the cross python virtual env istallation locations
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "istallation" should be "installation".

Suggested change
# Link python script and data expected location to the cross python virtual env istallation locations
# Link python script and data expected location to the cross python virtual env installation locations

Copilot uses AI. Check for mistakes.
@yxieca yxieca merged commit 7240644 into sonic-net:master Dec 6, 2025
18 of 29 checks passed
@qiluo-msft qiluo-msft deleted the qiluo/revertreinstall branch December 6, 2025 00:32
kewei-arista pushed a commit to kewei-arista/sonic-buildimage that referenced this pull request Dec 8, 2025
hdwhdw pushed a commit to hdwhdw/sonic-buildimage that referenced this pull request Dec 18, 2025
…-net#24760)

This reverts commit 4dd3b8a.

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
xwjiang-ms pushed a commit to xwjiang-ms/sonic-buildimage that referenced this pull request Dec 22, 2025
…-net#24760)

This reverts commit 4dd3b8a.

Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
jasonbridges pushed a commit to jasonbridges/sonic-buildimage that referenced this pull request Jan 22, 2026
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…-net#24760)

This reverts commit 4dd3b8a.

Signed-off-by: Feng Pan <fenpan@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants