[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-04-10 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 token-macro 2.5 has been released with this fix  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-04-10 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49746  
 
 
  Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
Change By: 
 Alex Earl  
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-04-10 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 Code changed in jenkins User: Alex Earl Path: src/main/java/org/jenkinsci/plugins/tokenmacro/impl/BuildLogRegexMacro.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/BuildLogRegexMacroTest.java src/test/resources/org/jenkinsci/plugins/tokenmacro/impl/JENKINS-49746-input.txt src/test/resources/org/jenkinsci/plugins/tokenmacro/impl/JENKINS-49746-output.txt http://jenkins-ci.org/commit/token-macro-plugin/135d69852894a4349446e7b78a244abe6b401102 Log: Fix JENKINS-49746 Added greedy parameter to break out of match checking when numMatches reaches maxMatches  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-04-10 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 I am going to introduce a new parameter to this macro named "greedy" which will default to true (the current behavior). If greedy is set to false, then the macro will kick out of the check when numMatches >= maxMatches, which matches the behavior you are looking for. So, when I release the new version, you should add greedy=false to your macro usage.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-04-10 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 I have not, been hammered at work and haven't had time to look into it more.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-04-10 Thread barn...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Barnish commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 Alex Earl, did you find a solution for this issue yet? It is still causing very large emails to be sent from our Jenkins server.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-16 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 The problem is that the change proposed breaks every other unit test for BUILD_LOG_REGEX, so I will have to look into this further.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-16 Thread r.wilkin...@samsung.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Wilkinson commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 Yes, a parsed file which only returns the expected number of matches plus the additional lines following the last expected match, the 5th match in this case. So your output looks exactly as I'd expect.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-15 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 Richard Wilkinson The code you were referencing is from a very old version of email-ext. What is the expected output that you are looking for from the err.txt you posted? 

 

ncsim: *E,ASRTST (some_string): (some_time) Assertion some_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion yet_another_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion some_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion yet_another_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion some_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion yet_another_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion some_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion yet_another_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion some_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion yet_another_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion some_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed
A MESSAGE
ncsim: *E,ASRTST (some_string): (some_time) Assertion yet_another_location has failed
ncsim: *W,ASRTST (some_other_string): (some_time) Assertion some_other_location has failed

[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-15 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 I was on a business trip and didn't get a chance to look into it yet. I will do so this week.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-15 Thread barn...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Barnish commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 Is there any progress with this issue?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-01 Thread r.wilkin...@samsung.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Wilkinson commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 See the attached file, err.txt.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-03-01 Thread r.wilkin...@samsung.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Wilkinson updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49746  
 
 
  Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
Change By: 
 Richard Wilkinson  
 
 
Attachment: 
 err.txt  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-02-27 Thread slide.o....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Earl commented on  JENKINS-49746  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
 Do you have any test data I could test on this with?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-02-26 Thread da...@vanlaatum.id.au (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David van Laatum assigned an issue to Alex Earl  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49746  
 
 
  Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
Change By: 
 David van Laatum  
 
 
Component/s: 
 token-macro-plugin  
 
 
Component/s: 
 email-ext-plugin  
 
 
Assignee: 
 David van Laatum Alex Earl  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49746) Regex returns more matches than it should if errors are close together

2018-02-26 Thread r.wilkin...@samsung.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Wilkinson created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49746  
 
 
  Regex returns more matches than it should if errors are close together   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 David van Laatum  
 
 
Components: 
 email-ext-plugin  
 
 
Created: 
 2018-02-26 15:26  
 
 
Environment: 
 Jenkins version 2.89.4  email-ext-plugin version 2.61   
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Richard Wilkinson  
 

  
 
 
 
 

 
 Some of our tests return huge error files if the log file being parsed has matching errors that are closer together than the setting for "linesAfter". This is true even if "maxMatches" is set to just 1. Our setting in email-ext-plugin is:   ${BUILD_LOG_REGEX, regex="(?m)^(nc\\w+:\\s+\\*E,|.\\bNG\\b|\\s*Errorb|E-).$", linesBefore=5, linesAfter=10, maxMatches=5, showTruncatedLines=false}   so this should limit the number of errors returned to 5. However, because the gap between matched errors is less than 10 lines this means that (in the Java code) the number of lines remaining to be written out gets reset to 10 on every subsequent match. The break condition for exiting the regex is the the number of lines remaining is 0 (amongst others) but this never happens for this case.   This can be fixed by modifying BuildLogRegexContent.java on line 291. Change this line to: if (matched & (numMatches < maxMatches)) and this will properly limit the number of matches to the value specified in numMatches and allow the regex to complete correctly.