Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag/commit hash is not respected in new image builds #6445

Closed
daall opened this issue Jan 14, 2021 · 3 comments · Fixed by #6536
Closed

tag/commit hash is not respected in new image builds #6445

daall opened this issue Jan 14, 2021 · 3 comments · Fixed by #6536
Assignees

Comments

@daall
Copy link
Contributor

daall commented Jan 14, 2021

Description
Recent 202012 builds from Jenkins are coming out like this:

admin@sonic~$ show ver
SONiC Software Version: SONiC.202012.8-dirty-20210113.013138
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 063a4859
Build date: Wed Jan 13 08:20:46 UTC 2021
Built by: johnar@jenkins-worker-7

Steps to reproduce the issue:

  1. Build an image based on a specific tag or commit hash, w/o any outstanding/uncommitted changes.
  2. Check the IMAGE_VERSION in the build output
  3. Check show ver on a DUT

Describe the results you received:
Image says "dirty" and has a time stamp like so:

admin@sonic~$ show ver
SONiC Software Version: SONiC.202012.8-dirty-20210113.013138
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 063a4859
Build date: Wed Jan 13 08:20:46 UTC 2021
Built by: johnar@jenkins-worker-7

Describe the results you expected:
Image version should just have the tag/commit hash that it was built off of, since there are no outstanding changes when we build on Jenkins.

admin@sonic~$ show ver
SONiC Software Version: 202012.7-264ecb18
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 063a4859
Build date: Wed Jan 13 08:20:46 UTC 2021
Built by: johnar@jenkins-worker-7

Additional information you deem important (e.g. issue happens only occasionally):
If you look at the output in the build logs, it looks like the initial container/buster container has the correct image version, but subsequent ones do not.

dflynn-Nokia added a commit to dflynn-Nokia/sonic-buildimage that referenced this issue Jan 15, 2021
When building the sonic-slave-buster docker container, the node.js package is
installed to meet the requirements of the Azure DevOPs pipleline
build. Recently this install of node.js has been failing as described within
Sonic issue sonic-net#6445. This commit fixes that build break by upgrading the
sonic-slave-buster build to install version 14.x of node.js which is the
current LTS version for buster.
@lguohan
Copy link
Collaborator

lguohan commented Jan 17, 2021

I do not think this issue is related to #6469

@dflynn-Nokia
Copy link
Contributor

Oops, my bad. PR #6469 is linked to Issue #6455 and not #6445.

@daall
Copy link
Contributor Author

daall commented Jan 21, 2021

It looks like the issue is coming from ./platform/broadcom/sonic-platform-modules-dell/z9332f/build/lib.linux-x86_64-2.7/sonic_platform/ipmihelper.py. This file is overridden by ./platform/broadcom/sonic-platform-modules-dell/common/ipmihelper.py in platform/broadcom/sonic-platform-modules-dell/debian/rules, which causes the workspace to become dirty. Following up with Dell.

lguohan pushed a commit that referenced this issue Jan 23, 2021
Fixes #6445

Because the ipmihelper.py script in the 9332 folder is slightly different than the common one (due to LGTM fixes), when the common one gets copied during build time it causes the workspace/build to become dirty.

Signed-off-by: Danny Allen <[email protected]>
lguohan pushed a commit that referenced this issue Jan 24, 2021
Fixes #6445

Because the ipmihelper.py script in the 9332 folder is slightly different than the common one (due to LGTM fixes), when the common one gets copied during build time it causes the workspace/build to become dirty.

Signed-off-by: Danny Allen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants