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

[sonic-yang-mgmt]: Handle dependencies in Makefile rather than setup.py #4657

Merged
merged 1 commit into from
May 28, 2020

Conversation

praveen-li
Copy link
Collaborator

@praveen-li praveen-li commented May 27, 2020

Changes:
-- Removing the part where build dependencies are installed in setup.py.
-- Adding build dependencies in corresponsing rules..*.mk file.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com

- Why I did it
Fix below issues reported by Joe:

I  noticed that master branch images are now almost consistently failing to build with the following error signature if building using multiple build jobs (e.g., SONIC_BUILD_JOBS=20):

 

dpkg: error: dpkg frontend lock is locked by another process

 

I tracked the root cause down to the building of the sonic_yang_mgmt-1.0-py2-none-any.whl package. The problem here is that in your setup.py file, you are explicitly installing .deb packages as build requirements using `dpkg -i` at the following line: https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-mgmt/setup.py#L43

 

However, dpkg cannot handle parallel operations. We encountered this problem before and worked around it by serializing all .deb package installations here: https://github.com/Azure/sonic-buildimage/blob/master/slave.mk#L483. The new issue is caused because the whl package recipe is executed in parallel with the aforementioned serialized .deb package installation recipe.

- How I did it
-- Removing the part where build dependencies are installed in setup.py.
-- Adding build dependencies in corresponsing rules..*.mk file.

- How to verify it
Have to depend on JENKINS JOBS. Since Problem happens when SONIC_BUILD_JOBS=20.

- Description for the changelog

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

…s are installed in setup.py.

Changes:
-- Removing the part where build dependencies are installed in setup.py.
-- Adding build dependencies in corresponsing rules\..*.mk file.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging 13f2bd3 into f0eb1db - view on LGTM.com

new alerts:

  • 1 for Unused import

@jleveque jleveque changed the title [sonic-yang-mgmt/setup.py]: Removing the part where build dependencie… [sonic-yang-mgmt]: Handle dependencies in Makefile rather than setup.py May 27, 2020
@lguohan
Copy link
Collaborator

lguohan commented May 28, 2020

retest vsimage please

@lguohan lguohan merged commit 8720192 into sonic-net:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants