root-project / jenkins-pipelines

Pipelines for building ROOT on pipeline jobs in Jenkins
13 stars 25 forks source link

makedoc log parser rules tuning #10

Open ferdymercury opened 2 years ago

ferdymercury commented 2 years ago

@couet I wanted to suggest a small tuning in the jenkins job root-makedoc-master log parser rules that is currently in place (https://lcgapp-services.cern.ch/root-jenkins/view/ROOT/job/root-makedoc-master/configure):

image

See also https://lcgapp-services.cern.ch/root-jenkins/view/ROOT/job/root-makedoc-master/lastFailedBuild/parsed_console/

Namely:

1) To remove false positives, where "INFO" in capital letters is being parsed in the middle of a word. --> Force it to be at beginning of line, or matching a whole-word

image

2) To detect false negatives, where "ERROR" is not now being found if in the middle of a line

image

3) To detect false negatives, where the string sequence ": warning: " could be searched for.

image

--> Maybe with https://github.com/root-project/rootspi/blob/master/jenkins/logparser-rules/ROOT-incremental-LogParserRules.txt#L25

Examples of the syntax can be found here, too: https://github.com/root-project/rootspi/blob/master/jenkins/logparser-rules/ROOT-incremental-LogParserRules.txt

couet commented 2 years ago

The file used to define the parsing rules is on the jenkins server and it is:

ok /not really/

# match line starting with 'error ', case-insensitive
error /(?i)^error /

error /: error:/
error /:fatal error:/

# list of warnings here...
warning /NOTEBOOK_CONVERSION_WARNING/

# create a quick access link to lines in the report containing 'INFO'
info /INFO/

# each line containing 'BUILD' represents the start of a section for grouping errors and warnings found after the line.
# also creates a quick access link.
start /BUILD/
couet commented 2 years ago

I cannot modify it. Only Axel can.

ferdymercury commented 2 years ago

Thanks. Based on https://regexr.com/, I would suggest these changes:

1) info /INFO/ --> info /\bINFO\b/ 2) add error /\bERROR\b/ 3) add warning /: warning: /

And some useful additions:

couet commented 2 years ago

I would prefer to first make the build green before adding any new rule.

ferdymercury commented 2 years ago

Sounds good. We could also write the new rules in such a way that they raise "warnings" rather than errors, so that the build is still green after adding them. For example:

warning /\bERROR\b/ instead of error /\bERROR\b/

couet commented 2 years ago

Yes it is green again

ferdymercury commented 2 years ago

This would be my proposal then for modification:

ok /not really/

# match line starting with 'error ', case-insensitive
error /(?i)^error /

error /: error:/
error /:fatal error:/
warning /\bERROR\b/
warning /Error: /

# list of warnings here...
warning /NOTEBOOK_CONVERSION_WARNING/
warning /: warning: /
warning /Warning in /
warning /Warning: /

# create a quick access link to lines in the report containing 'INFO'
info /\bINFO\b/
info /: note: /

# each line containing 'BUILD' represents the start of a section for grouping errors and warnings found after the line.
# also creates a quick access link.
start /BUILD/
couet commented 2 years ago

It looks fine for me. I cannot change that file. @Axel-Naumann has the rights to change it.

ferdymercury commented 2 years ago

I've seen that part of the suggested changes have already been included into the log parser, thanks!

I still see some issues:

image

ferdymercury commented 2 years ago

@jalopezg-git fyi

ferdymercury commented 8 months ago

@dpiparo do you have write access to the jenkins parser rules?