[JIRA] (JENKINS-36844) Regex match fails - "Mentioned somewhere in commit message"

3 ogledi
Preskoči na prvo neprebrano sporočilo

damnedyankee@gmail.com (JIRA)

neprebran,
21. jul. 2016, 06:41:0421. 7. 16
do jenkinsc...@googlegroups.com
Smouch Smouch created an issue
 
Jenkins / Bug JENKINS-36844
Regex match fails - "Mentioned somewhere in commit message"
Issue Type: Bug Bug
Assignee: Dan Alvizu
Components: jira-ext-plugin
Created: 2016/Jul/21 10:40 AM
Environment: System Information:

awt.toolkit sun.awt.X11.XToolkit
com.sun.akuma.Daemon daemonized
executable-war /usr/lib/jenkins/jenkins.war
file.encoding UTF-8
file.encoding.pkg sun.io
file.separator /
hudson.diyChunking true
java.awt.graphicsenv sun.awt.X11GraphicsEnvironment
java.awt.headless true
java.awt.printerjob sun.print.PSPrinterJob
java.class.path /usr/lib/jenkins/jenkins.war
java.class.version 52.0
java.endorsed.dirs /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/endorsed
java.ext.dirs /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/ext:/usr/java/packages/lib/ext
java.home /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre
java.io.tmpdir /tmp
java.library.path /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.runtime.name OpenJDK Runtime Environment
java.runtime.version 1.8.0_91-b14
java.specification.name Java Platform API Specification
java.specification.vendor Oracle Corporation
java.specification.version 1.8
java.vendor Oracle Corporation
java.vendor.url http://java.oracle.com/
java.vendor.url.bug http://bugreport.sun.com/bugreport/
java.version 1.8.0_91
java.vm.info mixed mode
java.vm.name OpenJDK 64-Bit Server VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Oracle Corporation
java.vm.specification.version 1.8
java.vm.vendor Oracle Corporation
java.vm.version 25.91-b14
JENKINS_HOME /var/lib/jenkins
jna.loaded true
jna.platform.library.path /usr/lib64:/lib64:/usr/lib:/lib:/usr/lib64/dyninst:/usr/lib64/mysql:/usr/lib64/iscsi
jnidispatch.path /tmp/jna--1712433994/jna2497847408718895242.tmp
line.separator
mail.smtp.sendpartial true
mail.smtps.sendpartial true
os.arch amd64
os.name Linux
os.version 3.10.0-327.22.2.el7.x86_64
path.separator :
sun.arch.data.model 64
sun.boot.class.path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/classes
sun.boot.library.path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/lib/amd64
sun.cpu.endian little
sun.cpu.isalist
sun.font.fontmanager sun.awt.X11FontManager
sun.io.unicode.encoding UnicodeLittle
sun.java.command /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
sun.java.launcher SUN_STANDARD
sun.jnu.encoding UTF-8
sun.management.compiler HotSpot 64-Bit Tiered Compilers
sun.os.patch.level unknown
svnkit.http.methods Digest,Basic,NTLM,Negotiate
svnkit.ssh2.persistent false
user.country US
user.dir /
user.home /var/lib/jenkins
user.language en
user.name jenkins
user.timezone Europe/Berlin
Priority: Critical Critical
Reporter: Smouch Smouch

Regex matching fails to match pattern found in log message.

Jenkins version 2.7.1
Jira-ext plugin version 0.5

Jira-ext plugin settings:

jira-ext Config
JIRA Base URL VALID_URL (tested with find custom fields)
JIRA Username VALID_USER (see above)
JIRA Password VALID_PASSWD (see above)
Ticket Pattern EXITEVOISSUES-,EXITEVODEV-
Verbose Logging (Enabled)
Timeout 10

svn log message (verbose)
------------------------------------------------------------------------
r16769 | nb79311 | 2016-07-21 12:09:54 +0200 (Thu, 21 Jul 2016) | 2 lines
Changed paths:
M /trunk/src/CMakeLists.txt

Jira key: EXITEVODEV-1309
Comments: Test automatic Jira update
------------------------------------------------------------------------

Output:

Updating JIRA tickets
ChangeLogSet class: class hudson.scm.SubversionChangeLogSet
ERROR Updating jira notifications
java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Matcher.java:536)
at org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy.getJiraIssuesFromChangeSet(MentionedInCommitStrategy.java:111)
at org.jenkinsci.plugins.jiraext.view.AbstractParsingIssueStrategy.getJiraCommits(AbstractParsingIssueStrategy.java:60)
at org.jenkinsci.plugins.jiraext.view.JiraExtBuildStep.perform(JiraExtBuildStep.java:59)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Operation: Update a Field
Finish updating JIRA tickets

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

damnedyankee@gmail.com (JIRA)

neprebran,
26. jul. 2016, 05:02:0126. 7. 16
do jenkinsc...@googlegroups.com
Smouch Smouch commented on Bug JENKINS-36844
 
Re: Regex match fails - "Mentioned somewhere in commit message"

I have finally managed to get some additional log information out of this plugin

I added a few lines of logging within MentionedInCommitStrategy.java as follows:

this._logger.log(Level.FINE,"Message text BEGIN:");
this._logger.log(Level.FINE,msg);
this._logger.log(Level.FINE,":Message text END");
this._logger.log(Level.FINE,"JiraPrefix BEGIN:");
this._logger.log(Level.FINE,validJiraPrefix);
this._logger.log(Level.FINE,":JiraPrefix END");

Trying to understand why the regex match would fail

Here is the resulting log message for a single test issue:

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

Message text BEGIN:

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

Jira key: EXITEVODEV-1309
Comments: Test Jira updater

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

:Message text END

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

JiraPrefix BEGIN:

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

EXITEVODEV

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

:JiraPrefix END

So, there seems to be some kind of fundamental issue with the way the regex matcher is being used. Clearly the message text contains the regex being searched for, yet the matcher is failing.

damnedyankee@gmail.com (JIRA)

neprebran,
26. jul. 2016, 05:05:0126. 7. 16
do jenkinsc...@googlegroups.com
Smouch Smouch edited a comment on Bug JENKINS-36844
I have finally managed to get some additional log information out of this plugin

I added a few lines of logging within MentionedInCommitStrategy.java as follows:

{quote}            this._logger.log(Level.FINE,"Message text BEGIN:");

            this._logger.log(Level.FINE,msg);
            this._logger.log(Level.FINE,":Message text END");
            this._logger.log(Level.FINE,"JiraPrefix BEGIN:");
            this._logger.log(Level.FINE,validJiraPrefix);
            this._logger.log(Level.FINE,":JiraPrefix END");{quote}


Trying to understand why the
regex match string search would fail


Here is the resulting log message for a single test issue:
{quote}

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

Message text BEGIN:

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

Jira key: EXITEVODEV-1309
Comments: Test Jira updater

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

:Message text END

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

JiraPrefix BEGIN:

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

EXITEVODEV

Jul 26, 2016 10:53:00 AM FINE org.jenkinsci.plugins.jiraext.view.MentionedInCommitStrategy

:JiraPrefix END{quote}

So, there seems to be some kind of fundamental issue with the way the
regex matcher string search is being used.  Clearly the message text contains the regex being searched for, yet the matcher search is failing.

Odgovori vsem
Odgovori avtorju
Posreduj
0 novih sporočil