Skip to content

Revert "[inner hahsing] extension of PBH tests"#5282

Merged
wangxin merged 1 commit intomasterfrom
revert-4848-pbh_ports_extension
Mar 8, 2022
Merged

Revert "[inner hahsing] extension of PBH tests"#5282
wangxin merged 1 commit intomasterfrom
revert-4848-pbh_ports_extension

Conversation

@wangxin
Copy link
Collaborator

@wangxin wangxin commented Mar 7, 2022

Reverts #4848

PR #4848 depends on pytest-allure package which is only available to user “AzDevOps” in sonic-mgmt docker. The reason is that the package is installed to local path of that user:

AzDevOps@2fb15ed04ed5:~$ python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import allure
>>> allure.__file__
'/var/AzDevOps/.local/lib/python2.7/site-packages/allure.pyc'
AzDevOps@2fb15ed04ed5:~$ sudo su
root@2fb15ed04ed5:/var/AzDevOps# pip list | grep allure
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
root@2fb15ed04ed5:/var/AzDevOps# python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import allure
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named allure
>>> exit()

If use “root” user to run the test, issue #5280 will be hit.

I’ll revert #4848 for now. The sonic-mgmt docker file https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-sonic-mgmt/Dockerfile.j2 needs to be updated to ensure that package pytest-allure is installed to global directory.

@wangxin wangxin requested a review from a team as a code owner March 7, 2022 08:37
Copy link
Contributor

@xwjiang-ms xwjiang-ms left a comment

Choose a reason for hiding this comment

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

LGTM

@wangxin
Copy link
Collaborator Author

wangxin commented Mar 8, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit 3244df1 into master Mar 8, 2022
@AntonHryshchuk
Copy link
Contributor

Added fix sonic-net/sonic-buildimage#10184

AntonHryshchuk added a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Mar 10, 2022
wangxin added a commit that referenced this pull request Mar 15, 2022
…5312)

Reverts #5130

Need to revert this PR for the same reason as PR #5282.

The dependent pytest-allure package which is only available to user “AzDevOps” in sonic-mgmt docker because it is installed to local path of that user:
```
AzDevOps@2fb15ed04ed5:~$ python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import allure
>>> allure.__file__
'/var/AzDevOps/.local/lib/python2.7/site-packages/allure.pyc'
AzDevOps@2fb15ed04ed5:~$ sudo su
root@2fb15ed04ed5:/var/AzDevOps# pip list | grep allure
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
root@2fb15ed04ed5:/var/AzDevOps# python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import allure
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named allure
>>> exit()
```
I’ll revert this PR for now to unblock testing using root account. The sonic-mgmt docker file https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-sonic-mgmt/Dockerfile.j2 needs to be updated to ensure that package pytest-allure is installed to global directory.
liat-grozovik pushed a commit that referenced this pull request Mar 21, 2022
…" (#5310)

This reverts commit 3244df1.

Summary: The fix for issue #5280 was provided in sonic-net/sonic-buildimage#10184.
Revert back the changes, which reverted in #5282
@wangxin wangxin deleted the revert-4848-pbh_ports_extension branch March 25, 2022 13:59
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.

3 participants