[JIRA] (JENKINS-56484) timestamper 1.9 breaks warnings-ng's ability to find source files

1 view
Skip to first unread message

smokris@softpixel.com (JIRA)

unread,
Mar 8, 2019, 11:05:02 AM3/8/19
to jenkinsc...@googlegroups.com
Steve Mokris created an issue
 
Jenkins / Bug JENKINS-56484
timestamper 1.9 breaks warnings-ng's ability to find source files
Issue Type: Bug Bug
Assignee: Steven G Brown
Components: timestamper-plugin, warnings-ng-plugin
Created: 2019-03-08 16:04
Environment: Jenkins 2.166
timestamper-plugin 1.9
warnings-ng-plugin 3.0.3
Priority: Major Major
Reporter: Steve Mokris

In timestamper 1.9, the log format was changed.  When I enable timestamper on a pipeline job, then scan it with warnings-ng, it detects errors but incorrectly parses the filename — it considers the timestamp part of the filename.

To reproduce the issue, install both plugins and run this pipeline job:

node {
    timestamps {
        sh """
            echo '#error This is an error.' > test.c
            clang test.c || true
        """
        recordIssues tools: [clang(id: 'clang', name: 'clang')]
    }
}

and the console log says:

00:00:01.047  test.c:1:2: error: This is an error.
…
00:00:06.276  [clang] [ERROR] Can't resolve absolute paths for some files:
00:00:06.276  [clang] [ERROR] - [2019-03-08T15:46:53.268Z] test.c
00:00:06.276  [clang] [ERROR] Can't create fingerprints for some files:
00:00:06.276  [clang] [ERROR] - '[2019-03-08T15:46:53.268Z] test.c', IO exception has been thrown: java.nio.file.NoSuchFileException: [2019-03-08T15:46:53.268Z] test.c
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

smokris@softpixel.com (JIRA)

unread,
Mar 8, 2019, 11:06:02 AM3/8/19
to jenkinsc...@googlegroups.com
Steve Mokris updated an issue
Change By: Steve Mokris
In timestamper 1.9, the [log format was changed|https://plugins.jenkins.io/timestamper#Timestamper-1.9(2019-02-07)].  When I enable timestamper on a pipeline job, then scan it with warnings-ng, it detects errors but incorrectly parses the filename — it considers the timestamp to be part of the filename.


To reproduce the issue, install both plugins and run this pipeline job:
{code:java}

node {
    timestamps {
        sh """
            echo '#error This is an error.' > test.c
            clang test.c || true
        """
        recordIssues tools: [clang(id: 'clang', name: 'clang')]
    }
}
{code}

and the console log says:
{code:java}

00:00:01.047  test.c:1:2: error: This is an error.

00:00:06.276  [clang] [ERROR] Can't resolve absolute paths for some files:
00:00:06.276  [clang] [ERROR] - [2019-03-08T15:46:53.268Z] test.c
00:00:06.276  [clang] [ERROR] Can't create fingerprints for some files:
00:00:06.276  [clang] [ERROR] - '[2019-03-08T15:46:53.268Z] test.c', IO exception has been thrown: java.nio.file.NoSuchFileException: [2019-03-08T15:46:53.268Z] test.c
{code}

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 12, 2019, 11:57:01 AM3/12/19
to jenkinsc...@googlegroups.com
Change By: Ulli Hafner
Component/s: timestamper-plugin
Assignee: Steven G Brown Ulli Hafner

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 20, 2019, 7:43:02 AM3/20/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue

This is not related to the timestamper plugin in general. It also happens if e.g. warnings are reported using a colored maven output.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 20, 2019, 7:44:01 AM3/20/19
to jenkinsc...@googlegroups.com
Ulli Hafner assigned an issue to Unassigned
Change By: Ulli Hafner
Component/s: analysis-model
Component/s: warnings-ng-plugin
Labels: help-wanted newbie-friendly
Assignee: Ulli Hafner

jglick@cloudbees.com (JIRA)

unread,
Mar 22, 2019, 1:30:02 PM3/22/19
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-56484
 
Re: timestamper 1.9 breaks warnings-ng's ability to find source files

There is apparently a TimestamperAPI.read method which no longer works (and has no test coverage that I know of).

jglick@cloudbees.com (JIRA)

unread,
Mar 22, 2019, 1:30:03 PM3/22/19
to jenkinsc...@googlegroups.com
Jesse Glick edited a comment on Bug JENKINS-56484
There is apparently a {{TimestamperAPI.read}} method which no longer works (and has no test coverage that I know of) , though I guess you are looking for something like the opposite which AFAIK does not exist .

jglick@cloudbees.com (JIRA)

unread,
Mar 22, 2019, 1:33:02 PM3/22/19
to jenkinsc...@googlegroups.com

Possibly this plugin could pick out filenames from other surrounding text using various algorithms. You could use a block-scoped step where you would be able to intercept process output before other decorations are applied by Jenkins plugins like Timestamper, though as you point out this will do nothing to help cases where decorations are applied by some external tool on the agent such as Maven execution wrappers.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 22, 2019, 3:07:04 PM3/22/19
to jenkinsc...@googlegroups.com

I see. Then I think that I will try to clean up the console log using various line filters before I hand out the result to the individual parsers (block-scoped is on my todo list, but I need a solution for freestyle jobs anyway). I already have a ConsoleNotesFilter and an AnsiColorFilter is on its way. Seems that I need to add an TimeStamperFilter as well.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 22, 2019, 4:05:02 PM3/22/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 22, 2019, 4:08:02 PM3/22/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

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

ullrich.hafner@gmail.com (JIRA)

unread,
Apr 18, 2019, 6:31:02 PM4/18/19
to jenkinsc...@googlegroups.com
Ulli Hafner started work on Bug JENKINS-56484
 
Change By: Ulli Hafner
Status: Open In Progress

ullrich.hafner@gmail.com (JIRA)

unread,
Apr 20, 2019, 7:07:02 PM4/20/19
to jenkinsc...@googlegroups.com
Change By: Ulli Hafner
Status: In Progress Fixed but Unreleased
Resolution: Fixed

ullrich.hafner@gmail.com (JIRA)

unread,
May 8, 2019, 6:20:08 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)
Reply all
Reply to author
Forward
0 new messages