Jira integration with gerrit error

593 views
Skip to first unread message

Ashwini T R

unread,
Jun 28, 2016, 1:31:14 AM6/28/16
to Repo and Gerrit Discussion
After the Gerrit Upgradation from 2.11.8 to 2.12 the JIRA integration with Gerrit is not working :(:(:( 
currently have installed its-base and its-jira plugins of version 2.12-stable

The connection in Log it shows it is connected to JIRA server but :(:( nothing the issue status is not getting changed to expected status
as "closed" "inprogress"

Please find below logs for information:

[2016-06-27 09:55:42,363] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin its-base, version f2bc136
[2016-06-27 09:55:42,433] [main] INFO  com.googlesource.gerrit.plugins.its.jira.JiraModule : JIRA is configured as ITS
[2016-06-27 09:55:43,165] [main] INFO  com.googlesource.gerrit.plugins.its.jira.JiraItsFacade : Connected to JIRA at https://<JIRA_SERVER>, reported version is 6.4.10
[2016-06-27 09:55:43,214] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin its-jira, version v2.12.2-42-gdeab5c6-dirty


Help me out :(:(

Regards
Ashwini 

luca.mi...@gmail.com

unread,
Jun 28, 2016, 2:16:52 AM6/28/16
to Ashwini T R, Repo and Gerrit Discussion
The issue state transitions support, already deprecated in 2.11, has been removed in 2.12.
You should define your state transitions rules in actions.config.

HTH

Luca

Sent from my iPhone
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ashwini T R

unread,
Jun 28, 2016, 8:15:25 AM6/28/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thanks a lot for your valuable answer:):)

Have one more question, We had configured its-jira with gerrit using "issue-state-transition.config", whcih has content like below: 

[action "Start Progress"]
change=created

[action "Resolve Issue"]
verified=+1
code-review=+2

[action "Close Issue"]
change=merged

[action "Stop Progress"]
change=abandoned

-------------------------------------------------------------------------------------------------------------------------

Upon your suggestion to define state transitions rules in actions.config. we defined as below:

[rule "patch-set"]
        event-type = patchset-created
        status = !, DRAFT
        action = add-comment A new patchset was added to che Gerrit change
        action = log-event
[rule "merged"]
        event-type = change-merged
        action = add-standard-comment
        action = log-event
[rule "verified_no"]
        event-type = comment-added
        approval-Verified = -1
        action = add-comment Verification by Jira failed
        action = log-event
[rule "verified_yes"]
        event-type = comment-added
        approval-Verified = +1
        action = add-comment Verification by Jira was successful

And it is not working:(:(:(:( 

It will be very helpful if you could provide a "state transitions" sample actions.config file to get an idea how it works..

Thanks a lot..


Regards
Ashwini

luca.mi...@gmail.com

unread,
Jun 28, 2016, 8:35:45 AM6/28/16
to Ashwini T R, Repo and Gerrit Discussion
Check this out:

Ashwini T R

unread,
Jul 4, 2016, 8:05:11 AM7/4/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thanks for Providing the Link. and we tried to configure its-jira with actions.config file, unfortunately we failed to succeed:(:(:( and we are unable to locate logs as well in Logs folder:(:( So, decided to monitor logs with respect to plugins.

Could you please help with gerrit API to make "its-jira" alone as debug mode.

Awaiting your response.

Regards
Ashwini

Luca Milanesio

unread,
Jul 4, 2016, 9:48:22 AM7/4/16
to Ashwini T R, Repo and Gerrit Discussion
Logs are in $GERRIT_SITE/logs. Its-jira uses the same Gerrit SLF4J log infrastructure, so you should enable/disable/increase logging in the same way as in Gerrit.

HTH

Luca.

Ashwini T R

unread,
Jul 5, 2016, 2:43:13 AM7/5/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Once again Thanks a lot for your responses:):) Here comes one more issue, As suggested by you we took the sample actions.config  as below:

[rule "open"]
    event-type = patchset-created
    action = add-standard-comment
    action = Start Progress
[rule "resolve"]
    verified = +1
    approval-Code-Review = +2
    action = Resolve Issue
[rule "merged"]
    event-type = change-merged
    action = Close Issue
[rule "abandoned"]
    event-type = change-abandoned
    action = Stop progress


but the problem with the "abandoned" this rule is not applied:(:( please find the log below:

How to resolve this:(:(

[2016-07-04 16:37:33,834] [HTTP-171] ERROR com.googlesource.gerrit.plugins.its.base.workflow.ActionExecutor : Error while executing action Stop progress



Thanks

Ashwini 

 

Ashwini T R

unread,
Jul 5, 2016, 2:53:06 AM7/5/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

For more detailed information, Please find below logs;

[2016-07-05 09:50:43,920] [HTTP-90] ERROR com.googlesource.gerrit.plugins.its.base.workflow.ActionExecutor : Error while executing action Stop progress
com.googlesource.gerrit.plugins.its.base.its.InvalidTransitionException: Action Stop progress not executable on issue JI-36
        at com.googlesource.gerrit.plugins.its.jira.JiraClient.doTransition(JiraClient.java:119)
        at com.googlesource.gerrit.plugins.its.jira.JiraItsFacade.doPerformAction(JiraItsFacade.java:107)
        at com.googlesource.gerrit.plugins.its.jira.JiraItsFacade.access$400(JiraItsFacade.java:31)
        at com.googlesource.gerrit.plugins.its.jira.JiraItsFacade$3.call(JiraItsFacade.java:99)
        at com.googlesource.gerrit.plugins.its.jira.JiraItsFacade$3.call(JiraItsFacade.java:95)
        at com.googlesource.gerrit.plugins.its.jira.JiraItsFacade.execute(JiraItsFacade.java:143)
        at com.googlesource.gerrit.plugins.its.jira.JiraItsFacade.performAction(JiraItsFacade.java:95)
        at com.googlesource.gerrit.plugins.its.base.workflow.ActionExecutor.execute(ActionExecutor.java:73)
        at com.googlesource.gerrit.plugins.its.base.workflow.ActionExecutor.execute(ActionExecutor.java:85)
        at com.googlesource.gerrit.plugins.its.base.workflow.ActionController.onEvent(ActionController.java:63)
        at com.google.gerrit.common.ChangeHookRunner.fireEventForUnrestrictedListeners(ChangeHookRunner.java:742)
        at com.google.gerrit.common.ChangeHookRunner.fireEvent(ChangeHookRunner.java:754)
        at com.google.gerrit.common.ChangeHookRunner.doChangeAbandonedHook(ChangeHookRunner.java:551)
        at com.google.gerrit.server.change.Abandon$Op.postUpdate(Abandon.java:167)
        at com.google.gerrit.server.git.BatchUpdate.executePostOps(BatchUpdate.java:386)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:301)
        at com.google.gerrit.server.change.Abandon.abandon(Abandon.java:99)
        at com.google.gerrit.server.change.Abandon.apply(Abandon.java:88)
        at com.google.gerrit.server.change.Abandon.apply(Abandon.java:52)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:329)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
        at com.google.gerrit.httpd.GetUserFilter.doFilter(GetUserFilter.java:82)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:117)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RequireSslFilter.doFilter(RequireSslFilter.java:68)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
        at com.googlesource.gerrit.plugins.javamelody.GerritMonitoringFilter.doFilter(GerritMonitoringFilter.java:65)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:132)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:138)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
        at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:744)

Luca Milanesio

unread,
Jul 5, 2016, 3:30:42 AM7/5/16
to Ashwini T R, Repo and Gerrit Discussion
It sounds obvious ... but the error is "Action Stop progress not executable on issue JI-36".
It is something you need to check with your Jira installation and see if the "Stop progress" action exist in the issue state transition of the project JI.

Luca.

Ashwini T R

unread,
Jul 5, 2016, 4:09:07 AM7/5/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thanks for your reply. Yes, the "Stop progress" exists in the Jira issue. Please Find the Attachment.

Regards
Ashwini 
Capture.PNG

Luca Milanesio

unread,
Jul 5, 2016, 4:11:00 AM7/5/16
to Ashwini T R, Repo and Gerrit Discussion
From your screenshot I see a "Stop Progress" action, with a capital 'P' ... or am I mistaken?

<Capture.PNG>

Ashwini T R

unread,
Jul 5, 2016, 4:49:34 AM7/5/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thanks a TON...:):):):) Yes, you were correct. And now able to work with "abandoned". But still not able to change the status to "Resolved"

[rule "resolve"]
    Verified = +1
    approval-Code-Review = +2
    action = Resolve Issue

And have attached the attachments for the reference.


Regards
Ashwini 
Capture_Gerrit.PNG
Capture1.PNG

Luca Milanesio

unread,
Jul 5, 2016, 4:51:44 AM7/5/16
to Ashwini T R, Repo and Gerrit Discussion
There is nothing on the Gerrit or ITS-Jira plugin you can do ... if you can't trigger a status transition, the problem is in Jira.

If you can do it manually ... it'll work with Gerrit / ITS-Jira as well.
If you can't ... talk to your Jira admin :-)

Luca.

<Capture_Gerrit.PNG><Capture1.PNG>

Neethu Murali

unread,
Jul 12, 2016, 2:07:14 AM7/12/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Correct actions.config which works with gerrit 2.12.2 is as below "

 [rule "open"]
    event-type = patchset-created
    action = Start Progress
    action = add-standard-comment
[rule "resolve"]
    event-type = comment-added
    approval-Verified = 1
    approval-Code-Review = 2
    action = Resolve Issue
    action = add-standard-comment
[rule "merged"]
    event-type = change-merged
    action = Close Issue
    action = add-standard-comment
[rule "abandoned"]
    event-type = change-abandoned
    action = Stop Progress
    action = add-standard-comment
[rule "LOG"]
        action = log-event info

Reply all
Reply to author
Forward
0 new messages