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

cppCommentSkipper: catch UnicodeDecodeError and print file name #37727

Merged
merged 3 commits into from Apr 29, 2022

Conversation

iarspider
Copy link
Contributor

PR description:

Provide better feedback on the following kind of errors:

07:34:04 Traceback (most recent call last):
07:34:04   File "/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_CXXMODULE_X_2022-04-27-2300/bin/slc7_amd64_gcc10/cmsCodeRulesChecker.py", line 220, in <module>
07:34:04     result = runRules(ruleNumbers, checkPath)
07:34:04   File "/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_CXXMODULE_X_2022-04-27-2300/bin/slc7_amd64_gcc10/cmsCodeRulesChecker.py", line 89, in runRules
07:34:04     filesLinesList = skipper(filesLinesList)
07:34:04   File "/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_CXXMODULE_X_2022-04-27-2300/python/Utilities/ReleaseScripts/commentSkipper/commentSkipper.py", line 21, in filter
07:34:04     fileList = cppCommentSkipper.filterFiles(fileList)
07:34:04   File "/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_CXXMODULE_X_2022-04-27-2300/python/Utilities/ReleaseScripts/commentSkipper/cppCommentSkipper.py", line 11, in filterFiles
07:34:04     files.append((file, filterFile(file)))
07:34:04   File "/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_CXXMODULE_X_2022-04-27-2300/python/Utilities/ReleaseScripts/commentSkipper/cppCommentSkipper.py", line 16, in filterFile
07:34:04     lines = open(file).readlines()
07:34:04   File "/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_CXXMODULE_X_2022-04-27-2300/external/slc7_amd64_gcc10/bin/../../../../../../../slc7_amd64_gcc10/external/python3/3.9.6-67e5cf5b4952101922f1d4c8474baa39/lib/python3.9/codecs.py", line 322, in decode
07:34:04     (result, consumed) = self._buffer_decode(data, self.errors, final)
07:34:04 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 291: invalid continuation byte

@cmsbuild cmsbuild changed the base branch from CMSSW_12_4_X to master April 28, 2022 14:50
@cmsbuild
Copy link
Contributor

@iarspider, CMSSW_12_4_X branch is closed for direct updates. cms-bot is going to move this PR to master branch.
In future, please use cmssw master branch to submit your changes.

@cmsbuild cmsbuild added this to the CMSSW_12_4_X milestone Apr 28, 2022
@iarspider iarspider changed the title cppCommentSkipper: catch UnicodeDecodeError and print file name [WIP] cppCommentSkipper: catch UnicodeDecodeError and print file name Apr 28, 2022
@iarspider iarspider changed the title [WIP] cppCommentSkipper: catch UnicodeDecodeError and print file name cppCommentSkipper: catch UnicodeDecodeError and print file name Apr 28, 2022
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37727/29579

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • Utilities/ReleaseScripts (core)

@cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please review it and eventually sign? Thanks.
@wddgit this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37727/29580

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

Pull request #37727 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please check and sign again.

@iarspider
Copy link
Contributor Author

The following files contain invalid UTF-8 sequences:

  • RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h
  • Fireworks/Core/data/helpGL.html
  • DataFormats/EgammaCandidates/interface/GsfElectronCore.h

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5a4ad1/24323/summary.html
COMMIT: 802568e
CMSSW: CMSSW_12_4_X_2022-04-28-2300/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37727/24323/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3695434
  • DQMHistoTests: Total failures: 13
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3695398
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 205 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@smuzaffar
Copy link
Contributor

+core

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

The following files contain invalid UTF-8 sequences:

  • RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h
  • Fireworks/Core/data/helpGL.html
  • DataFormats/EgammaCandidates/interface/GsfElectronCore.h

@iarspider is this visible from the logs?

@iarspider
Copy link
Contributor Author

No, these were found by hand.

@perrotta
Copy link
Contributor

No, these were found by hand.

My point was: is this something people should fix, or maybe you plan to fix it.
Only written as such, it is not clear to me what people is expected to do...

@iarspider
Copy link
Contributor Author

@perrotta these are not technically errors - the invalid symbols are in comments and doesn't affect the final result. I am not sure if someone should fix these, the PR just skips the invalid symbols, allowing the rest of the code checks to go through.

@perrotta
Copy link
Contributor

@perrotta these are not technically errors - the invalid symbols are in comments and doesn't affect the final result. I am not sure if someone should fix these, the PR just skips the invalid symbols, allowing the rest of the code checks to go through.

Ok, I simply wondered why did you write them here.
If there is no action to be taken, that comment will simply get forgotten soon.
Anyhow, this PR is fine and it can be merged

@perrotta
Copy link
Contributor

+1

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.

None yet

4 participants