Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-76007

Reset quality gate does not work when a tool with custom result id is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • warnings-ng-plugin
    • Latest Jenkins LTS with all plugins updated

      Hello!

       

      When trying to reset the quality gate of a tool with a custom result id nothing seems to happen, but if we do not specify a custom result id it works as expected. We use warnings-ng like this:

      recordIssues(
          enabledForFailure: true, aggregatingResults: false,
          tools: [
              flake8(pattern: 'test-results/ruff_report', reportEncoding: 'UTF-8', id: 'ruff', name: 'Ruff'),
              myPy(pattern: 'test-results/mypy_dae_report', reportEncoding: 'UTF-8', id: 'mypy-dae', name: 'MyPy - dae'),
              myPy(pattern: 'test-results/mypy_wdae_report', reportEncoding: 'UTF-8', id: 'mypy-wdae', name: 'MyPy - wdae'),
              pyLint(pattern: 'test-results/pyright_report', reportEncoding: 'UTF-8', id: 'pyright', name: 'Pyright'),                 pyLint(pattern: 'test-results/mypy_dae_pylint_report', reportEncoding: 'UTF-8', id: 'mypy-dae-pylint', name: 'MyPy - dae (converted to PyLint)'),
              pyLint(pattern: 'test-results/mypy_wdae_pylint_report', reportEncoding: 'UTF-8', id: 'mypy-wdae-pylint', name: 'MyPy - wdae (converted to PyLint)'),
              pyLint(pattern: 'test-results/pylint_report', reportEncoding: 'UTF-8')
          ],
          qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
      ) 
      

      We managed to reset the quality gate of our result from pylint with id "pyright" by hardcoding the "pyright" string here:

      https://github.com/jenkinsci/warnings-ng-plugin/blob/ddbecf31a300ad86edb8468924b6bf87e4c4c577/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/IssuesDetail.java#L277

      in the place of 

      labelProvider.getId()

       

      Regards,

      Hristo Stefanov

            Unassigned Unassigned
            hrstefanov Hristo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: