Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing seems to be happening, and no logging for debugging #10

Closed
dcsobral opened this issue Jul 28, 2016 · 12 comments
Closed

Nothing seems to be happening, and no logging for debugging #10

dcsobral opened this issue Jul 28, 2016 · 12 comments

Comments

@dcsobral
Copy link

I'm trying to use Viiolations to Bitbucket, but something isn't working there. It prints these lines:

Running Jenkins Violation Comments To Bitbucket Server
Will comment 724

But nothing happens on the pull request, and no other lines are printed after. I don't know if it found the violation files, if it recognized the contents, if it tried to make actual comments.

I'd like the plugin to print positive messages, such as saying "found checkstyle results. X violations." and "Nothing to report" or "X comments made".

@tomasbjerre
Copy link
Contributor

And nothing in the Jenkins server log?
How have you configured it?
What are the paths to the report files in your workspace?

@tomasbjerre
Copy link
Contributor

You may try 1.16. Its completely rewritten.

@dcsobral
Copy link
Author

Is it out already? I don't see it on m y Jenkins update list.

On 29 July 2016 at 14:11, Tomas Bjerre notifications@github.com wrote:

You may try 1.16. Its completely rewritten.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInF_SjT9Ce_01WFv4PLlu24TLWNpizks5qal5sgaJpZM4JXcSV
.

Daniel C. Sobral

I travel to the future all the time.

@tomasbjerre
Copy link
Contributor

It should be there now.

Den 30 juli 2016 03:50 skrev "Daniel Capo Sobral" <notifications@github.com

:

Is it out already? I don't see it on m y Jenkins update list.

On 29 July 2016 at 14:11, Tomas Bjerre notifications@github.com wrote:

You may try 1.16. Its completely rewritten.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
#10 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAInF_SjT9Ce_01WFv4PLlu24TLWNpizks5qal5sgaJpZM4JXcSV

.

Daniel C. Sobral

I travel to the future all the time.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa1E32sD-qfCTDqUzf8UvC0IAVUIf4Zks5qaq31gaJpZM4JXcSV
.

@dcsobral
Copy link
Author

I'm using 1.16 now, and it's still no better. I'm not getting anything on
the PRs and, in fact, I had the URL misconfigured at one point and didn't
even get an error on that. I don't know if it found any files, and if it
did whether it found any violations on them, and if it did whether it tried
to contact Bitbucket or not.

Right now, I can't tell the difference between everything worked perfectly
and there's nothing to report and it couldn't even find the violation files.

On 29 July 2016 at 23:11, Tomas Bjerre notifications@github.com wrote:

It should be there now.

Den 30 juli 2016 03:50 skrev "Daniel Capo Sobral" <
notifications@github.com

:

Is it out already? I don't see it on m y Jenkins update list.

On 29 July 2016 at 14:11, Tomas Bjerre notifications@github.com wrote:

You may try 1.16. Its completely rewritten.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<

#10 (comment)

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AAInF_SjT9Ce_01WFv4PLlu24TLWNpizks5qal5sgaJpZM4JXcSV

.

Daniel C. Sobral

I travel to the future all the time.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
#10 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAa1E32sD-qfCTDqUzf8UvC0IAVUIf4Zks5qaq31gaJpZM4JXcSV

.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInFzwuY5xk5J0DjA1oxzmTG94BdBPuks5qat0egaJpZM4JXcSV
.

Daniel C. Sobral

I travel to the future all the time.

@tomasbjerre
Copy link
Contributor

tomasbjerre commented Jul 31, 2016

And nothing in the Jenkins server log?
How have you configured it? What does your regexp look like?
What are the paths to the report files in your workspace?

There should be some info logging in the server log file, more then in the job console log. https://github.com/tomasbjerre/violation-comments-lib/blob/master/src/main/java/se/bjurr/violations/comments/lib/CommentsCreator.java

Here is an example, where the Bitbucket Server (or Stash) is offline or incorrect:

INFO: asd #23 main build action completed: SUCCESS
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: CHECKSTYLE with pattern .*\.xml$
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: CSSLINT with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: LINT with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: FINDBUGS with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: JSHINT with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: PMD with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: CPPCHECK with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: RESHARPER with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: FLAKE8 with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: CPPLINT with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: XMLLINT with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: PERLCRITIC with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: PITEST with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: ANDROIDLINT with pattern 
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: Workspace: /home/bjerre/workspace/violation-comments-to-stash-plugin/work/jobs/asd/workspace
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: Using username/password: a.../*********
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
INFO: Will comment PR PROJECT_1/rep_1/1 on http://localhost:7990/bitbucket
jul 31, 2016 8:48:52 FM se.bjurr.violations.comments.lib.CommentsCreator <init>
INFO: 1 violations.
jul 31, 2016 8:48:52 FM org.jenkinsci.plugins.jvctb.JvctbLogger doLog
ALLVARLIG: 
java.lang.RuntimeException: Error calling:
http://localhost:7990/bitbucket/rest/api/1.0/projects/PROJECT_1/repos/rep_1/pull-requests/1/changes?limit=999999
GET
null
    at se.bjurr.violations.comments.bitbucketserver.lib.client.BitbucketServerInvoker.invokeUrl(BitbucketServerInvoker.java:56)
    at se.bjurr.violations.comments.bitbucketserver.lib.client.BitbucketServerClient.invokeAndParse(BitbucketServerClient.java:71)
    at se.bjurr.violations.comments.bitbucketserver.lib.client.BitbucketServerClient.pullRequestChanges(BitbucketServerClient.java:37)
    at se.bjurr.violations.comments.bitbucketserver.lib.BitbucketServerCommentsProvider.getFiles(BitbucketServerCommentsProvider.java:69)
    at se.bjurr.violations.comments.lib.CommentsCreator.<init>(CommentsCreator.java:39)
    at se.bjurr.violations.comments.lib.CommentsCreator.createComments(CommentsCreator.java:24)
    at se.bjurr.violations.comments.bitbucketserver.lib.ViolationCommentsToBitbucketServerApi.toPullRequest(ViolationCommentsToBitbucketServerApi.java:80)
    at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.doPerform(JvctbPerformer.java:85)
    at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:117)
    at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:104)
    at hudson.FilePath.act(FilePath.java:989)
    at hudson.FilePath.act(FilePath.java:967)
    at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.jvctsPerform(JvctbPerformer.java:104)
    at org.jenkinsci.plugins.jvctb.ViolationsToBitbucketServerRecorder.perform(ViolationsToBitbucketServerRecorder.java:67)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:381)
Caused by: java.net.ConnectException: Förbindelse vägras
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at java.net.Socket.connect(Socket.java:538)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
    at sun.net.www.http.HttpClient.New(HttpClient.java:308)
    at sun.net.www.http.HttpClient.New(HttpClient.java:326)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
    at se.bjurr.violations.comments.bitbucketserver.lib.client.BitbucketServerInvoker.invokeUrl(BitbucketServerInvoker.java:42)
    ... 23 more

@dcsobral
Copy link
Author

dcsobral commented Aug 1, 2016

Nothing on the server logs (besides the usual build started, etc).

As for configuration, I selected one comment per violation on one build,
and all violations in one big comment on another. User, password, server,
project and repository hardcoded, and pull request id as a variable. That
one I know is ok because the last thing the plugin prints is the number of
the pull request it is going to comment on.

I'm using these patterns:

findbugs: */target/findbugsXml.xml
checkstyle: *
/target/checkstyle-result.xml

On 30 July 2016 at 23:36, Tomas Bjerre notifications@github.com wrote:

And nothing in the Jenkins server log?
How have you configured it? What does your regexp look like?
What are the paths to the report files in your workspace?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInFxaEHsQiszBu8V8S_2Ix_q_09y45ks5qbDRRgaJpZM4JXcSV
.

Daniel C. Sobral

I travel to the future all the time.

@tomasbjerre
Copy link
Contributor

Ok, the patterns are not regexp. You may use patterns like:

.*/target/checkstyle-result.xml$

2016-08-01 11:09 GMT+02:00 Daniel Capo Sobral notifications@github.com:

Nothing on the server logs (besides the usual build started, etc).

As for configuration, I selected one comment per violation on one build,
and all violations in one big comment on another. User, password, server,
project and repository hardcoded, and pull request id as a variable. That
one I know is ok because the last thing the plugin prints is the number of
the pull request it is going to comment on.

I'm using these patterns:

findbugs: */target/findbugsXml.xml
checkstyle: *
/target/checkstyle-result.xml

On 30 July 2016 at 23:36, Tomas Bjerre notifications@github.com wrote:

And nothing in the Jenkins server log?
How have you configured it? What does your regexp look like?
What are the paths to the report files in your workspace?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
#10 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAInFxaEHsQiszBu8V8S_2Ix_q_09y45ks5qbDRRgaJpZM4JXcSV

.

Daniel C. Sobral

I travel to the future all the time.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa1E9vrCCL11Bzu36e5N3_BJBDiFQppks5qbbfDgaJpZM4JXcSV
.

@tomasbjerre
Copy link
Contributor

Actually that was a breaking change from 1.15 to 1.16. The regexp requirement is new, sorry.

@dcsobral
Copy link
Author

dcsobral commented Aug 1, 2016

I got it working on a findbugs build. A checkstyle build I tried it on
didn't produce any results, but it probably didn't have violations in the
changed code.

So while I'm happy that it works, this ticket is about lack of feedback on
the output. I don't get any information on either positive or negative
results: the findbugs build isn't telling me it's going to make (or made) X
comments, the checkstyle build didn't tell me it wasn't commenting on
anything, and the invalid regex exception was nowhere to be seen.

On 1 August 2016 at 04:45, Tomas Bjerre notifications@github.com wrote:

Actually that was a breaking change from 1.15 to 1.16. The regexp
requirement is new, sorry.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInF0Zov6t198L75FqS65p6jq28inmgks5qbc4_gaJpZM4JXcSV
.

Daniel C. Sobral

I travel to the future all the time.

@tomasbjerre
Copy link
Contributor

Good point! I'll fix it.

tomasbjerre added a commit that referenced this issue Aug 2, 2016
 * Also adding better logging.
@tomasbjerre tomasbjerre removed the bug label Aug 2, 2016
tomasbjerre added a commit that referenced this issue Aug 2, 2016
 * Also adding better logging.
tomasbjerre added a commit that referenced this issue Aug 2, 2016
 * Also adding better logging.
tomasbjerre added a commit that referenced this issue Aug 2, 2016
 * Also adding better logging.
@tomasbjerre
Copy link
Contributor

I added more logging now. Should be in the Jenkins update site within a few hours. Open issue again if any more suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants