Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: warnings-ng-plugin
    • Labels:
      None
    • Environment:
      Various linux and Windows servers
      Jenkins 2.160+
    • Similar Issues:
    • Released As:
      5.0.0 (analysis-model and warnings-ng)

      Description

      I have managed to get ansible-lint to report failures but the yamllint parser never works. It doesn't matter if I write to a log amd parse that, parse the console, separate scanning and publishng. The result is always no issues found.

      
      [Pipeline] { (Run yamllint)
      [Pipeline] sh
      14:41:07  + yamllint ./
      14:41:08  ./windows-utilities.yml
      14:41:08    6:1       error    too many blank lines (2 > 1)  (empty-lines)
      14:41:08    7:1       warning  comment not indented like content  (comments-indentation)
      14:41:08    7:2       warning  missing starting space in comment  (comments)
      14:41:08    9:1       error    too many blank lines (2 > 1)  (empty-lines)
      14:41:08    11:22     error    no new line character at the end of file  (new-line-at-end-of-file)
      14:41:08  
      [Pipeline] echo
      14:41:08  hudson.AbortException: script returned exit code 1
      [Pipeline] recordIssues
      14:41:08  Skipping issues blame since Git is the only supported SCM up to now.
      14:41:08  [YamlLint] Sleeping for 5 seconds due to JENKINS-32191...
      14:41:13  [YamlLint] Parsing console log (workspace: '/var/lib/jenkins/workspace/CC3')
      14:41:13  [YamlLint] Attaching ResultAction with ID 'yamllint' to run 'CC3 #21'.
      14:41:13  [YamlLint] Using reference build 'CC3 #20' to compute new, fixed, and outstanding issues
      14:41:13  [YamlLint] Issues delta (vs. reference build): outstanding: 0, new: 0, fixed: 0
      14:41:13  [YamlLint] Evaluating quality gates
      14:41:13  [YamlLint] -> PASSED - Total number of issues (any severity): 0 - Quality QualityGate: 1
      14:41:13  [YamlLint] -> All quality gates have been passed
      14:41:13  [YamlLint] Health report is disabled - skipping
      14:41:13  [YamlLint] Created analysis result for 0 issues (found 0 new issues, fixed 0 issues)
      [Pipeline] } 

      This run reports 5 problems which aren't detected. Numerous hours of testing have resulted in zero detections so it seems broken.

      I also tried setting gates. I'm not sure if I did that correctly as they are complicated, unclear and effectively undocumented, even on the wiki. These need to be documented thoroughly and clearly.

      Thanks.

       

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment - - edited

          Are there options available? The support format looks different:

          file.yml:6:2: [warning] missing starting space in comment (comments)
          test/file.yml:57:1: [error] trailing spaces (trailing-spaces)
          file.yml:60:3: [error] wrong indentation: expected 4 but found 2 (indentation)
          ./molecule-default/create.yml:117:89: [error] syntax error: expected '<document start>', but found '<block mapping start>'
          

          Which version of yamllint did you use?

          Show
          drulli Ulli Hafner added a comment - - edited Are there options available? The support format looks different: file.yml:6:2: [warning] missing starting space in comment (comments) test/file.yml:57:1: [error] trailing spaces (trailing-spaces) file.yml:60:3: [error] wrong indentation: expected 4 but found 2 (indentation) ./molecule-default/create.yml:117:89: [error] syntax error: expected '<document start>', but found '<block mapping start>' Which version of yamllint did you use?
          Hide
          ghs1 g hs1 added a comment -

          I'm not sure what your first question is asking but I tried -f parsable. That didn't change anything with files or scanning the console before.

          Fair question. It was 1.11.1. I updated. No change. Still no detection of any kind.

          -sh-4.2$ yamllint  -v
          yamllint 1.15.0 

          However, after the update I tried -f parsable again and that was what was missing. The need for the parsable output isn't mentioned on the wiki, either.

          I now get:

          [Pipeline] sh
          09:39:48  + yamllint -v
          09:39:48  yamllint 1.15.0
          [Pipeline] sh
          09:39:50  + yamllint -f parsable ./
          09:39:51  ./windows-utilities.yml:6:1: [error] too many blank lines (2 > 1) (empty-lines)
          09:39:51  ./windows-utilities.yml:7:1: [warning] comment not indented like content (comments-indentation)
          09:39:51  ./windows-utilities.yml:7:2: [warning] missing starting space in comment (comments)
          09:39:51  ./windows-utilities.yml:9:1: [error] too many blank lines (2 > 1) (empty-lines)
          09:39:51  ./windows-utilities.yml:11:22: [error] no new line character at the end of file (new-line-at-end-of-file)
          [Pipeline] echo
          09:39:51  hudson.AbortException: script returned exit code 1
          [Pipeline] recordIssues
          09:39:51  Skipping issues blame since Git is the only supported SCM up to now.
          09:39:51  [YamlLint] Sleeping for 5 seconds due to JENKINS-32191...
          09:39:56  [YamlLint] Parsing console log (workspace: '/var/lib/jenkins/workspace/CC3')
          09:39:58  [YamlLint] [-ERROR-] Can't resolve absolute paths for some files:
          09:39:58  [YamlLint] [-ERROR-] - 51.203Z] ./windows-utilities.yml
          09:39:58  [YamlLint] [-ERROR-] - 51.204Z] ./windows-utilities.yml
          09:39:58  [YamlLint] [-ERROR-] Can't create fingerprints for some files:
          09:39:58  [YamlLint] [-ERROR-] - '51.203Z] ./windows-utilities.yml', IO exception has been thrown: java.nio.file.NoSuchFileException: 51.203Z] ./windows-utilities.yml
          09:39:58  [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml', IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml
          09:39:58  [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml', IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml
          09:39:58  [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml', IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml
          09:39:58  [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml', IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml
          09:39:58  [YamlLint] Post processing issues on 'uwreg014' with source code encoding 'windows-1252'
          09:39:58  [YamlLint] Resolving absolute file names for all issues in workspace '/var/lib/jenkins/workspace/CC3'
          09:39:58  [YamlLint] -> 0 resolved, 2 unresolved, 0 already resolved
          09:39:58  [YamlLint] Copying affected files to Jenkins' build folder 'C:\Jenkins\jobs\CC3\builds\33\files-with-issues'
          09:39:58  [YamlLint] -> 0 copied, 0 not in workspace, 2 not-found, 0 with I/O error
          09:39:58  [YamlLint] Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files)
          09:39:58  [YamlLint] -> resolved module names for 5 issues
          09:39:58  [YamlLint] Resolving package names (or namespaces) by parsing the affected files
          09:39:58  [YamlLint] -> resolved package names of 2 affected files
          09:39:58  [YamlLint] No filter has been set, publishing all 5 issues
          09:39:58  [YamlLint] Creating fingerprints for all affected code blocks to track issues over different builds
          09:39:58  [YamlLint] -> created fingerprints for 0 issues
          09:39:58  [YamlLint] Skipping blaming as requested in the job configuration
          09:39:58  [YamlLint] Attaching ResultAction with ID 'yamllint' to run 'CC3 #33'.
          09:39:58  [YamlLint] Using reference build 'CC3 #32' to compute new, fixed, and outstanding issues
          09:39:58  [YamlLint] Issues delta (vs. reference build): outstanding: 0, new: 5, fixed: 0
          09:39:58  [YamlLint] Evaluating quality gates
          09:39:58  [YamlLint] -> FAILED - Total number of issues (any severity): 5 - Quality QualityGate: 1
          09:39:58  [YamlLint] -> Some quality gates have been missed: overall result is FAILED
          09:39:58  [YamlLint] Health report is disabled - skipping
          09:39:58  [YamlLint] Created analysis result for 5 issues (found 5 new issues, fixed 0 issues)
          [Pipeline] }

          which looks much better. I'm not sure what the file errors are about, yet however they don't seem to affect the report and this results in:

          Thanks for the pointer.

          Show
          ghs1 g hs1 added a comment - I'm not sure what your first question is asking but I tried -f parsable . That didn't change anything with files or scanning the console before. Fair question. It was 1.11.1. I updated. No change. Still no detection of any kind. -sh-4.2$ yamllint -v yamllint 1.15.0 However, after the update I tried -f parsable again and that was what was missing. The need for the parsable output isn't mentioned on the wiki, either. I now get: [Pipeline] sh 09:39:48 + yamllint -v 09:39:48 yamllint 1.15.0 [Pipeline] sh 09:39:50 + yamllint -f parsable ./ 09:39:51 ./windows-utilities.yml:6:1: [error] too many blank lines (2 > 1) (empty-lines) 09:39:51 ./windows-utilities.yml:7:1: [warning] comment not indented like content (comments-indentation) 09:39:51 ./windows-utilities.yml:7:2: [warning] missing starting space in comment (comments) 09:39:51 ./windows-utilities.yml:9:1: [error] too many blank lines (2 > 1) (empty-lines) 09:39:51 ./windows-utilities.yml:11:22: [error] no new line character at the end of file ( new -line-at-end-of-file) [Pipeline] echo 09:39:51 hudson.AbortException: script returned exit code 1 [Pipeline] recordIssues 09:39:51 Skipping issues blame since Git is the only supported SCM up to now. 09:39:51 [YamlLint] Sleeping for 5 seconds due to JENKINS-32191... 09:39:56 [YamlLint] Parsing console log (workspace: '/ var /lib/jenkins/workspace/CC3' ) 09:39:58 [YamlLint] [-ERROR-] Can't resolve absolute paths for some files: 09:39:58 [YamlLint] [-ERROR-] - 51.203Z] ./windows-utilities.yml 09:39:58 [YamlLint] [-ERROR-] - 51.204Z] ./windows-utilities.yml 09:39:58 [YamlLint] [-ERROR-] Can't create fingerprints for some files: 09:39:58 [YamlLint] [-ERROR-] - '51.203Z] ./windows-utilities.yml' , IO exception has been thrown: java.nio.file.NoSuchFileException: 51.203Z] ./windows-utilities.yml 09:39:58 [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml' , IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml 09:39:58 [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml' , IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml 09:39:58 [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml' , IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml 09:39:58 [YamlLint] [-ERROR-] - '51.204Z] ./windows-utilities.yml' , IO exception has been thrown: java.nio.file.NoSuchFileException: 51.204Z] ./windows-utilities.yml 09:39:58 [YamlLint] Post processing issues on 'uwreg014' with source code encoding 'windows-1252' 09:39:58 [YamlLint] Resolving absolute file names for all issues in workspace '/ var /lib/jenkins/workspace/CC3' 09:39:58 [YamlLint] -> 0 resolved, 2 unresolved, 0 already resolved 09:39:58 [YamlLint] Copying affected files to Jenkins ' build folder ' C:\Jenkins\jobs\CC3\builds\33\files-with-issues' 09:39:58 [YamlLint] -> 0 copied, 0 not in workspace, 2 not-found, 0 with I/O error 09:39:58 [YamlLint] Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files) 09:39:58 [YamlLint] -> resolved module names for 5 issues 09:39:58 [YamlLint] Resolving package names (or namespaces) by parsing the affected files 09:39:58 [YamlLint] -> resolved package names of 2 affected files 09:39:58 [YamlLint] No filter has been set, publishing all 5 issues 09:39:58 [YamlLint] Creating fingerprints for all affected code blocks to track issues over different builds 09:39:58 [YamlLint] -> created fingerprints for 0 issues 09:39:58 [YamlLint] Skipping blaming as requested in the job configuration 09:39:58 [YamlLint] Attaching ResultAction with ID 'yamllint' to run 'CC3 #33' . 09:39:58 [YamlLint] Using reference build 'CC3 #32' to compute new , fixed, and outstanding issues 09:39:58 [YamlLint] Issues delta (vs. reference build): outstanding: 0, new : 5, fixed: 0 09:39:58 [YamlLint] Evaluating quality gates 09:39:58 [YamlLint] -> FAILED - Total number of issues (any severity): 5 - Quality QualityGate: 1 09:39:58 [YamlLint] -> Some quality gates have been missed: overall result is FAILED 09:39:58 [YamlLint] Health report is disabled - skipping 09:39:58 [YamlLint] Created analysis result for 5 issues (found 5 new issues, fixed 0 issues) [Pipeline] } which looks much better. I'm not sure what the file errors are about, yet however they don't seem to affect the report and this results in: Thanks for the pointer.
          Hide
          drulli Ulli Hafner added a comment -

          The file errors are because the file has no absolute path. Can you get `yamllint` to print the absolute path for each warnings? (Or at least the relative path starting from workspace.)

          Show
          drulli Ulli Hafner added a comment - The file errors are because the file has no absolute path. Can you get `yamllint` to print the absolute path for each warnings? (Or at least the relative path starting from workspace.)
          Show
          drulli Ulli Hafner added a comment - I added a help text now: https://github.com/jenkinsci/warnings-ng-plugin/commit/371599f4645e84b27cb27f302589d3bcc1685707
          Hide
          ghs1 g hs1 added a comment -

          Thanks.

          Show
          ghs1 g hs1 added a comment - Thanks.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              ghs1 g hs1
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: