Skip to content

Revert "Fix loganalyzer.py UnicodeDecodeError issue"#6858

Merged
ZhaohuiS merged 1 commit intomasterfrom
revert-6524-fix/loganalyzer_decode_issue
Nov 21, 2022
Merged

Revert "Fix loganalyzer.py UnicodeDecodeError issue"#6858
ZhaohuiS merged 1 commit intomasterfrom
revert-6524-fix/loganalyzer_decode_issue

Conversation

@ZhaohuiS
Copy link
Contributor

Reverts #6524.
Since the change sonic-net/sonic-buildimage#12425 was merged into internal branch. Revert this fix to make sure we can capture invalid format characters in syslog.

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

ansible/library/extract_log.py:76:1: E402 module level import not at top of file
ansible/library/extract_log.py:77:1: E402 module level import not at top of file
ansible/library/extract_log.py:78:1: E402 module level import not at top of file
ansible/library/extract_log.py:79:1: E402 module level import not at top of file
ansible/library/extract_log.py:80:1: E402 module level import not at top of file
ansible/library/extract_log.py:81:1: E402 module level import not at top of file
ansible/library/extract_log.py:82:1: E402 module level import not at top of file
ansible/library/extract_log.py:83:1: E402 module level import not at top of file
ansible/library/extract_log.py:84:1: E402 module level import not at top of file
ansible/library/extract_log.py:85:1: E402 module level import not at top of file
ansible/library/extract_log.py:86:1: F403 'from ansible.module_utils.basic import *' used; unable to detect undefined names
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@lipxu lipxu self-requested a review November 21, 2022 07:10
@ZhaohuiS ZhaohuiS merged commit c3276ba into master Nov 21, 2022
wangxin pushed a commit that referenced this pull request Nov 23, 2022
Reverts #6524.
Since the change sonic-net/sonic-buildimage#12425 was merged into internal branch. Revert this fix to make sure we can capture invalid format characters in syslog.
@wangxin wangxin deleted the revert-6524-fix/loganalyzer_decode_issue branch January 9, 2023 00:04
bingwang-ms pushed a commit to bingwang-ms/sonic-mgmt that referenced this pull request Jul 27, 2023
…ic-mgmt into internal-202205

Fix merge conflicts.

- Fix verify_no_packet_any call in fib_test (sonic-net#6461)
- Fix the test case test_TSA failure when check the routes on the eos host (sonic-net#6483)
- Use conditional mark to skip testcase instead of required_mocked_dualtor (sonic-net#6766)
- [tagged_arp] fix issue 'fixture ports_list not found' (sonic-net#6773)
- [QoS] fixes after moving to python3 (sonic-net#6786)
- update parse funciton for image url (sonic-net#6848)
- Fix typo in get_queue_counter (sonic-net#6852)
- Revert "Fix loganalyzer.py UnicodeDecodeError (sonic-net#6524)" (sonic-net#6858)
- Enhancing core_dump_and_config_check to be multi-asic aware (sonic-net#6527)
- Adding support for calculating balancing in multi-lc/multi-asic case (Test_fib.py) (sonic-net#6391)
- Support different RC in case of pre or post sanity check failed (sonic-net#6860)
- Update getbuild.py to support pass an empty access_token
- [202205] Fixing auto_techsupport (sonic-net#6882)
- Merge branch 'azure-202205' into dev/yaqiangzhu/202205_manually_merge
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.

3 participants