[JIRA] (JENKINS-56779) yamllint never finds issues

18 views
Skip to first unread message

ghs1@3ds.com (JIRA)

unread,
Mar 27, 2019, 10:52:02 AM3/27/19
to jenkinsc...@googlegroups.com
g hs1 created an issue
 
Jenkins / Bug JENKINS-56779
yamllint never finds issues
Issue Type: Bug Bug
Assignee: Ulli Hafner
Components: warnings-ng-plugin
Created: 2019-03-27 14:50
Environment: Various linux and Windows servers
Jenkins 2.160+
Priority: Major Major
Reporter: g hs1

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.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ghs1@3ds.com (JIRA)

unread,
Mar 27, 2019, 10:54:09 AM3/27/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 27, 2019, 3:20:02 PM3/27/19
to jenkinsc...@googlegroups.com
Ulli Hafner commented on Bug JENKINS-56779
 
Re: yamllint never finds issues

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

{norformat}

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 27, 2019, 3:21:02 PM3/27/19
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56779
Are there options available? The support format looks different:
{noformat}

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>'
{ norformat noformat }

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 27, 2019, 3:21:02 PM3/27/19
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56779
Are there options available? The support format looks different:
{noformat}
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>'
{noformat}
Which version of yamllint did you use?

ghs1@3ds.com (JIRA)

unread,
Mar 28, 2019, 5:48:02 AM3/28/19
to jenkinsc...@googlegroups.com
g hs1 updated an issue
Change By: g hs1
Attachment: yamllint.png

ghs1@3ds.com (JIRA)

unread,
Mar 28, 2019, 5:51:03 AM3/28/19
to jenkinsc...@googlegroups.com
g hs1 commented on Bug JENKINS-56779

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.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 28, 2019, 5:58:01 AM3/28/19
to jenkinsc...@googlegroups.com

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.)

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 28, 2019, 6:00:01 AM3/28/19
to jenkinsc...@googlegroups.com

ghs1@3ds.com (JIRA)

unread,
Mar 29, 2019, 11:27:02 AM3/29/19
to jenkinsc...@googlegroups.com
Change By: g hs1
Status: Open Fixed but Unreleased
Resolution: Fixed

ghs1@3ds.com (JIRA)

unread,
Mar 29, 2019, 11:27:02 AM3/29/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
May 8, 2019, 6:20:10 PM5/8/19
to jenkinsc...@googlegroups.com
Change By: Ulli Hafner
Status: Fixed but Unreleased Resolved
Released As: 5.0.0 (analysis-model and warnings-ng)

ghs1@3ds.com (JIRA)

unread,
Jul 8, 2019, 9:12:02 AM7/8/19
to jenkinsc...@googlegroups.com
g hs1 closed an issue as Fixed
Change By: g hs1
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages