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

Revert "Fix loganalyzer.py UnicodeDecodeError issue" #6577

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

ZhaohuiS
Copy link
Contributor

Reverts #6524
Non utf-8 characters are not expected in syslog, we should not ignore this kind of errors.
Revert this PR to make sure we can catch this issue in nightly test in future.

@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>

@ZhaohuiS ZhaohuiS requested a review from wangxin October 20, 2022 00:17
@Blueve Blueve merged commit 61acf83 into master Oct 20, 2022
@Blueve Blueve deleted the revert-6524-fix/loganalyzer_decode_issue branch October 20, 2022 15:01
wangxin pushed a commit that referenced this pull request Oct 21, 2022
ZhaohuiS added a commit that referenced this pull request Oct 25, 2022
StormLiangMS pushed a commit that referenced this pull request Oct 25, 2022
…" (#6611)

Reverts #6577
It blocks smoke test since the image fix sonic-net/sonic-buildimage#12425 is not in internal branch.
wangxin pushed a commit that referenced this pull request Oct 25, 2022
…" (#6611)

Reverts #6577
It blocks smoke test since the image fix sonic-net/sonic-buildimage#12425 is not in internal branch.
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
mannytaheri pushed a commit to mannytaheri/sonic-mgmt that referenced this pull request Jan 25, 2024
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