how to enable debugging to its-base and its-jira plugins?

222 views
Skip to first unread message

J-P Kohtala

unread,
Oct 4, 2019, 2:23:33 AM10/4/19
to Repo and Gerrit Discussion
Hi,

I'm trying enable JIRA integration with gerrit but there seems to be some issues which i would like to debug.

I'm using 2.15.x gerrit and have setup development env where i test gerrit release. i have updated there gerrit 2.16.x release to dev environment but i could not get JIRA integration to work.
Updated to 3.0.x release to see if problem is there also and it was. Found out that parsing jira address didn't work when JIRA wasn't configured to root.
i have it review.example.com/jira/. Well later on fix version of the jira-plugin was made and i started testing that.

URL now get parsed correctly and connection works but still state transitions doesn't work or commenting JIRA story so would like debug it.
I haven't made any changes to transition rules or other changes regarding jira-integration.

I have tried based on documentation to enabled debug logs with this command.

ssh -p 29418 review.example.com gerrit logging set-level debug com.googlesource.gerrit.plugins.its.jira.

found from https://gerrit-review.googlesource.com/Documentation/cmd-logging-set-level.html but that didn't give any more logs.

Any ideas how to enable debug logs?

luca.mi...@gmail.com

unread,
Oct 4, 2019, 2:28:03 AM10/4/19
to J-P Kohtala, Repo and Gerrit Discussion


Sent from my iPhone

On 4 Oct 2019, at 07:23, J-P Kohtala <koht...@gmail.com> wrote:


Hi,

I'm trying enable JIRA integration with gerrit but there seems to be some issues which i would like to debug.

I'm using 2.15.x gerrit and have setup development env where i test gerrit release. i have updated there gerrit 2.16.x release to dev environment but i could not get JIRA integration to work.
Updated to 3.0.x release to see if problem is there also and it was. Found out that parsing jira address didn't work when JIRA wasn't configured to root.
i have it review.example.com/jira/. Well later on fix version of the jira-plugin was made and i started testing that.

URL now get parsed correctly and connection works but still state transitions doesn't work or commenting JIRA story so would like debug it.
I haven't made any changes to transition rules or other changes regarding jira-integration.

Can you please raise an issue with all details to reproduce it to gerritcodereview.com/issues.html?


I have tried based on documentation to enabled debug logs with this command.

ssh -p 29418 review.example.com gerrit logging set-level debug com.googlesource.gerrit.plugins.its.jira.

found from https://gerrit-review.googlesource.com/Documentation/cmd-logging-set-level.html but that didn't give any more logs.

It well maybe that the plugin doesn’t emit more logs 


Any ideas how to enable debug logs?

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/32d615df-3bc0-4874-ae72-1e55d5bdddea%40googlegroups.com.

J-P Kohtala

unread,
Oct 4, 2019, 8:35:43 AM10/4/19
to Repo and Gerrit Discussion


perjantai 4. lokakuuta 2019 9.28.03 UTC+3 lucamilanesio kirjoitti:


Sent from my iPhone

On 4 Oct 2019, at 07:23, J-P Kohtala <koht...@gmail.com> wrote:


Hi,

I'm trying enable JIRA integration with gerrit but there seems to be some issues which i would like to debug.

Can you please raise an issue with all details to reproduce it to gerritcodereview.com/issues.html?


Ok, I'll make there issue.
 

I have tried based on documentation to enabled debug logs with this command.

ssh -p 29418 review.example.com gerrit logging set-level debug com.googlesource.gerrit.plugins.its.jira.

found from https://gerrit-review.googlesource.com/Documentation/cmd-logging-set-level.html but that didn't give any more logs.

It well maybe that the plugin doesn’t emit more logs 


I'll doubt that because by looking code from the its-jira plugin it should give logs out i.e. when making comment to issue.

if (issueExists(server, issueKey)) {
 log
.debug("Trying to add comment for issue {}", issueKey);
 apiBuilder
 
.getIssue(server)
 
.doPost(issueKey + "/comment", gson.toJson(new JiraComment(comment)), HTTP_CREATED);
 log.debug("Comment added to issue {}", issueKey);
} else {
 log
.error("Issue {} does not exist or no access permission", issueKey);
}


 

David Pursehouse

unread,
Oct 4, 2019, 10:41:33 AM10/4/19
to J-P Kohtala, Repo and Gerrit Discussion
On Fri, 4 Oct 2019, 15:23 J-P Kohtala, <koht...@gmail.com> wrote:
Hi,

I'm trying enable JIRA integration with gerrit but there seems to be some issues which i would like to debug.

I'm using 2.15.x gerrit and have setup development env where i test gerrit release. i have updated there gerrit 2.16.x release to dev environment but i could not get JIRA integration to work.
Updated to 3.0.x release to see if problem is there also and it was. Found out that parsing jira address didn't work when JIRA wasn't configured to root.
i have it review.example.com/jira/. Well later on fix version of the jira-plugin was made and i started testing that.

URL now get parsed correctly and connection works but still state transitions doesn't work or commenting JIRA story so would like debug it.
I haven't made any changes to transition rules or other changes regarding jira-integration.

I have tried based on documentation to enabled debug logs with this command.

ssh -p 29418 review.example.com gerrit logging set-level debug com.googlesource.gerrit.plugins.its.jira.

Try it with the full name of the class that you want to log. 

Also, you can use the log list command to make sure that the required level was set. 

If I remember correctly, the list command will not include the class until it has been invoked at least once.



found from https://gerrit-review.googlesource.com/Documentation/cmd-logging-set-level.html but that didn't give any more logs.

Any ideas how to enable debug logs?

--

J-P Kohtala

unread,
Oct 8, 2019, 2:20:08 AM10/8/19
to Repo and Gerrit Discussion

perjantai 4. lokakuuta 2019 17.41.33 UTC+3 David Pursehouse kirjoitti:
On Fri, 4 Oct 2019, 15:23 J-P Kohtala, <koht...@gmail.com> wrote:
Hi,

I'm trying enable JIRA integration with gerrit but there seems to be some issues which i would like to debug.

I'm using 2.15.x gerrit and have setup development env where i test gerrit release. i have updated there gerrit 2.16.x release to dev environment but i could not get JIRA integration to work.
Updated to 3.0.x release to see if problem is there also and it was. Found out that parsing jira address didn't work when JIRA wasn't configured to root.
i have it review.example.com/jira/. Well later on fix version of the jira-plugin was made and i started testing that.

URL now get parsed correctly and connection works but still state transitions doesn't work or commenting JIRA story so would like debug it.
I haven't made any changes to transition rules or other changes regarding jira-integration.

I have tried based on documentation to enabled debug logs with this command.

ssh -p 29418 review.example.com gerrit logging set-level debug com.googlesource.gerrit.plugins.its.jira.

Try it with the full name of the class that you want to log. 

Also, you can use the log list command to make sure that the required level was set. 

If I remember correctly, the list command will not include the class until it has been invoked at least once.

Setting with command
ssh -p 29418 review.example.com gerrit logging set-level debug com.googlesource.gerrit.plugins.its.jira.

it seems to set level to debug when looking with command that you suggested
ssh -p 29418 review.example.com gerrit logging ls-level

com.googlesource.gerrit.plugins.its.base.its.ItsConfig: DEBUG
com.googlesource.gerrit.plugins.its.base.util.CommitMessageFetcher: DEBUG
com.googlesource.gerrit.plugins.its.base.util.IssueExtractor: DEBUG
com.googlesource.gerrit.plugins.its.base.validation.ItsValidateComment: DEBUG
com.googlesource.gerrit.plugins.its.base.workflow.ActionController: DEBUG
com.googlesource.gerrit.plugins.its.base.workflow.ActionExecutor: DEBUG
com.googlesource.gerrit.plugins.its.base.workflow.ItsRulesProjectCacheImpl: DEBUG
com.googlesource.gerrit.plugins.its.base.workflow.ItsRulesProjectCacheRefresher: DEBUG
com.googlesource.gerrit.plugins.its.base.workflow.LogEvent: DEBUG
com.googlesource.gerrit.plugins.its.base.workflow.RuleBase: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraClient: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraConfig: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraItsFacade: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraItsServerCacheImpl: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraItsServerProjectCacheRefresher: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraItsStartupHealthcheck: DEBUG
com.googlesource.gerrit.plugins.its.jira.JiraModule: DEBUG
com.googlesource.gerrit.plugins.its.jira.restapi.JiraRestApi: DEBUG
com.googlesource.gerrit.plugins.its.jira.restapi.JiraURL: DEBUG

Still i don't get any of logs at all..

I even set debug logs to jetty components to see if there any problem with connection but no luck
org.eclipse.jetty.server.
org.eclipse.jetty.http.
org.eclipse.jetty.io.

What i'm doing wrong?

J-P Kohtala

unread,
Oct 9, 2019, 7:28:14 AM10/9/19
to Repo and Gerrit Discussion


perjantai 4. lokakuuta 2019 9.28.03 UTC+3 lucamilanesio kirjoitti:


Sent from my iPhone

On 4 Oct 2019, at 07:23, J-P Kohtala <koht...@gmail.com> wrote:


Hi,

I'm trying enable JIRA integration with gerrit but there seems to be some issues which i would like to debug.

I'm using 2.15.x gerrit and have setup development env where i test gerrit release. i have updated there gerrit 2.16.x release to dev environment but i could not get JIRA integration to work.
Updated to 3.0.x release to see if problem is there also and it was. Found out that parsing jira address didn't work when JIRA wasn't configured to root.
i have it review.example.com/jira/. Well later on fix version of the jira-plugin was made and i started testing that.

URL now get parsed correctly and connection works but still state transitions doesn't work or commenting JIRA story so would like debug it.
I haven't made any changes to transition rules or other changes regarding jira-integration.

Can you please raise an issue with all details to reproduce it to gerritcodereview.com/issues.html?

Reply all
Reply to author
Forward
0 new messages