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

[201911][fwutil]: Use logger from sonic-py-common #1190

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

nazariig
Copy link
Collaborator

@nazariig nazariig commented Oct 26, 2020

Signed-off-by: Nazarii Hnydyn [email protected]

Cherry-pick changes of fwutil/log.py from #1008

- What I did

  • Reduced code duplication: replaced logger with common implementation

- How I did it

  • Used logger from sonic-py-common

- How to verify it

  1. fwutil install chassis component <component_name> fw <fw_path> -y
  2. fwutil update chassis component <component_name> fw -y

- Previous command output (if the output of a command-line utility has changed)

  • N/A

- New command output (if the output of a command-line utility has changed)

  • N/A

@jleveque
Copy link
Contributor

Check build is failing for PRs against 201911 branch, because the packaging was changed to a wheel in master, and check build environment was changed accordingly.

@liat-grozovik
Copy link
Collaborator

retest this please

1 similar comment
@lguohan
Copy link
Contributor

lguohan commented Oct 27, 2020

retest this please

@nazariig
Copy link
Collaborator Author

Looks like the environment is broken:

23:31:32  ============================= test session starts ==============================
23:31:32  platform linux2 -- Python 2.7.16, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
23:31:32  rootdir: /sonic/sonic-utilities, inifile: pytest.ini
23:31:32  plugins: cov-2.6.0
23:31:32  collected 38 items / 11 errors
23:31:32  
23:31:32  ==================================== ERRORS ====================================
23:31:32  __________ ERROR collecting sonic-utilities-tests/acl_loader_test.py ___________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/acl_loader_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/acl_loader_test.py:10: in <module>
23:31:32      from acl_loader.main import *
23:31:32  acl_loader/main.py:7: in <module>
23:31:32      import tabulate
23:31:32  E   ImportError: No module named tabulate
23:31:32  ____________ ERROR collecting sonic-utilities-tests/aclshow_test.py ____________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/aclshow_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/aclshow_test.py:12: in <module>
23:31:32      load_source('aclshow', scripts_path+'/aclshow')
23:31:32  scripts/aclshow:29: in <module>
23:31:32      from tabulate import tabulate
23:31:32  E   ImportError: No module named tabulate
23:31:32  __________ ERROR collecting sonic-utilities-tests/counterpoll_test.py __________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/counterpoll_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/counterpoll_test.py:16: in <module>
23:31:32      import counterpoll.main as counterpoll
23:31:32  counterpoll/main.py:5: in <module>
23:31:32      from tabulate import tabulate
23:31:32  E   ImportError: No module named tabulate
23:31:32  __________ ERROR collecting sonic-utilities-tests/drops_group_test.py __________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/drops_group_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/drops_group_test.py:15: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ____________ ERROR collecting sonic-utilities-tests/feature_test.py ____________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/feature_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/feature_test.py:12: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ___________ ERROR collecting sonic-utilities-tests/intfstat_test.py ____________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/intfstat_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/intfstat_test.py:16: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ___________ ERROR collecting sonic-utilities-tests/intfutil_test.py ____________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/intfutil_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/intfutil_test.py:7: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ____________ ERROR collecting sonic-utilities-tests/pfcstat_test.py ____________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/pfcstat_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/pfcstat_test.py:6: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ___________ ERROR collecting sonic-utilities-tests/portstat_test.py ____________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/portstat_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/portstat_test.py:7: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ______________ ERROR collecting sonic-utilities-tests/psu_test.py ______________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/psu_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/psu_test.py:10: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  ______________ ERROR collecting sonic-utilities-tests/sfp_test.py ______________
23:31:32  ImportError while importing test module '/sonic/sonic-utilities/sonic-utilities-tests/sfp_test.py'.
23:31:32  Hint: make sure your test modules/packages have valid Python names.
23:31:32  Traceback:
23:31:32  /usr/lib/python2.7/dist-packages/six.py:709: in exec_
23:31:32      exec("""exec _code_ in _globs_, _locs_""")
23:31:32  sonic-utilities-tests/sfp_test.py:11: in <module>
23:31:32      import show.main as show
23:31:32  show/main.py:6: in <module>
23:31:32      import netifaces
23:31:32  E   ImportError: No module named netifaces
23:31:32  !!!!!!!!!!!!!!!!!!! Interrupted: 11 errors during collection !!!!!!!!!!!!!!!!!!!
23:31:32  =========================== 11 error in 1.18 seconds ===========================

@liat-grozovik
Copy link
Collaborator

retest this please

@liat-grozovik
Copy link
Collaborator

@jleveque and @lguohan can you please approve this merge although the test failure?

@jleveque jleveque merged commit 29e4469 into sonic-net:201911 Nov 2, 2020
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
c0df635 (HEAD -> 201911, origin/201911) Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (sonic-net#1224) (sonic-net#1237)
d683bb4 [CLI][show][platform] Added ASIC count in the output. (sonic-net#1185) (sonic-net#1227)
4585be1 [show] Fix 'show int neigh expected' (sonic-net#1189)
29e4469 [201911][fwutil]: Use logger from sonic-py-common (sonic-net#1190)

Signed-off-by: Abhishek Dosi <[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 this pull request may close these issues.

4 participants