dmwm / WMCore

Core workflow management components for CMS.
Apache License 2.0
46 stars 107 forks source link

Fix pylint report when score is misssing #12153

Open khurtado opened 1 month ago

khurtado commented 1 month ago

Impact of the bug Jenkins reports (both in CC7 and CC9) can break under certain circumstances.

Jenkins setups: CC7: https://cmssdt.cern.ch/dmwm-jenkins/job/DMWM-WMCore-PR-pylintpy3/

CC9: https://cmssdt.cern.ch/dmwm-jenkins/view/WMCore%20Docker/job/WMCore-PR-pylint/

Describe the bug The jenkins pylint json report sometimes misses the score, and the HTML report fails due to this.

How to reproduce it Create a report with jenkins on PR: https://github.com/dmwm/WMCore/pull/12123

The json pylint report created will be this: https://cmssdt.cern.ch/dmwm-jenkins/job/DMWM-WMCore-PR-pylintpy3/3471/artifact/pylintpy3Report.json/*view*/

As you can see, the first file is missing a "base" field. Other files do have the base field. Here is another report that works fine for comparison: https://cmssdt.cern.ch/dmwm-jenkins/job/DMWM-WMCore-PR-pylintpy3/3480/artifact/pylintpy3Report.json/*view*/

The filename specifically in this PR with the issue is WorkflowUpdater.py

  "src/python/WMComponent/WorkflowUpdater/WorkflowUpdater.py": {
    "test": {
      "events": [

Expected behavior Jenkins should produce an HTML report with the PR unit test changes and pylint reports.

Additional context and error message Add any other context about the problem here, like error message and/or traceback. You might want to use triple back ticks to properly format it.

khurtado commented 1 month ago

I added a fix in the CC9 test environment

https://github.com/khurtado/jenkins-test/commit/16ea2ce968f8db5f07fbf215dbb7467ecb04ab0e