Skip to content

Fix package version conflict introduced by PR #15890#22424

Merged
wangxin merged 3 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/fix_version_conflict
Apr 30, 2025
Merged

Fix package version conflict introduced by PR #15890#22424
wangxin merged 3 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/fix_version_conflict

Conversation

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor

@yutongzhang-microsoft yutongzhang-microsoft commented Apr 23, 2025

Why I did it

In PR #15890, to address an armhf build failure, the PyYAML version was pinned to 5.4.1 and the --no-build-isolation flag was introduced. However, our reproducible build has since been upgraded to use PyYAML 6.0.1, which leads to version conflicts.

target/sonic-cisco-8000.bin__cisco-8000__rfs.squashfs.log-+ sudo https_proxy= LANG=C chroot ./fsroot-cisco-8000 pip3 install PyYAML==5.4.1 --no-build-isolation
target/sonic-cisco-8000.bin__cisco-8000__rfs.squashfs.log-ERROR: Cannot install PyYAML==5.4.1 because these package versions have conflicting dependencies.
target/sonic-cisco-8000.bin__cisco-8000__rfs.squashfs.log-
target/sonic-cisco-8000.bin__cisco-8000__rfs.squashfs.log-The conflict is caused by:
target/sonic-cisco-8000.bin__cisco-8000__rfs.squashfs.log-    The user requested PyYAML==5.4.1
target/sonic-cisco-8000.bin__cisco-8000__rfs.squashfs.log-    The user requested (constraint) pyyaml==6.0.1
target/docker-config-engine-bullseye.gz.log-Step 14/28 : RUN pip3 install PyYAML==5.4.1 --no-build-isolation
target/docker-config-engine-bullseye.gz.log- ---> Running in 87fe7ac9e1ef
target/docker-config-engine-bullseye.gz.log-ERROR: Cannot install PyYAML==5.4.1 because these package versions have conflicting dependencies.
target/docker-config-engine-bullseye.gz.log-
target/docker-config-engine-bullseye.gz.log-The conflict is caused by:
target/docker-config-engine-bullseye.gz.log-    The user requested PyYAML==5.4.1
target/docker-config-engine-bullseye.gz.log-    The user requested (constraint) pyyaml==6.0.1

This PR resolves the conflict by removing the explicit installation of PyYAML 5.4.1 introduced in PR #15890.

Work item tracking
  • Microsoft ADO (number only):

How I did it

This PR resolves the conflict by removing the explicit installation of PyYAML 5.4.1 introduced in PR #15890.

How to verify it

Tested by pipeline itself, we can sucessfully build the images. And we will install PyYAML 6.0.1, which will not cause the version conflict.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread build_debian.sh Outdated

# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'PyYAML==5.4.1' --no-build-isolation
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'PyYAML==6.0.1'
Copy link
Copy Markdown
Contributor

@liushilongbuaa liushilongbuaa Apr 24, 2025

Choose a reason for hiding this comment

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

Maybe we can remove this line. This line is added to resolve arm build failure.
Try remove these lines in build_debian.sh and config-engine-bullseye/Dockerfile.j2 and test.
It is added in #15890

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me try

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin
Copy link
Copy Markdown
Contributor

wangxin commented Apr 28, 2025

Why the other workaround code added in original PR #15890 is not removed?

@wangxin
Copy link
Copy Markdown
Contributor

wangxin commented Apr 28, 2025

Is this change required for release branches too?

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw ms_conflict

@yutongzhang-microsoft yutongzhang-microsoft changed the title Fix package version conflict Fix package version conflict introduced by PR #15890 Apr 30, 2025
@wangxin wangxin merged commit f905d01 into sonic-net:master Apr 30, 2025
19 checks passed
@yutongzhang-microsoft yutongzhang-microsoft deleted the yutongzhang/fix_version_conflict branch April 30, 2025 03:29
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202411: #22597

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #22598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants