Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Fix mibexsoftware#102 add renamed binary files and excluded file cases #118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LauraCameran
Copy link

@LauraCameran LauraCameran commented Jun 24, 2020

There are two cases that were not included in the parsing:
File excluded by pattern "[pattern]"
and
Binary files a/[path] and b/[path] differ
With this fix both of them are handled.

@LauraCameran
Copy link
Author

Is it possible to merge this, @mrueegg ?

@Ivan-L
Copy link

Ivan-L commented Aug 20, 2020

Hi @mrueegg

We're affected by this issue too. Please would you merge this PR?

@PGanicz
Copy link

PGanicz commented Aug 25, 2020

The same issue here. Could someone merge this PR?

@merrileemiller
Copy link

Hi there!

I am also struggling with this issue. I tried to test this fix, but I am still seeing the same error.

For what it's worth, here are my logs with debug enabled:

[22:35:00]W:	 [Step 6/6] new file mode 100644
[22:35:00]W:	 [Step 6/6] index 0000000..2aa668f
[22:35:00]W:	 [Step 6/6] Binary files /dev/null and b/devops/sonarqube/specnet3719.pkl differ
[22:35:00]W:	 [Step 6/6] 
[22:35:00]W:	 [Step 6/6] 
[22:35:00] :	 [Step 6/6] INFO: ------------------------------------------------------------------------
[22:35:00] :	 [Step 6/6] INFO: EXECUTION FAILURE
[22:35:00] :	 [Step 6/6] INFO: ------------------------------------------------------------------------
[22:35:00] :	 [Step 6/6] Total time: 24.041s
[22:35:00]W:	 [Step 6/6] ERROR: Error during Sonar runner execution
[22:35:00] :	 [Step 6/6] Final Memory: 23M/582M
[22:35:00]W:	 [Step 6/6] org.sonar.runner.impl.RunnerException: Unable to execute Sonar
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
[22:35:00]W:	 [Step 6/6] 	at java.security.AccessController.doPrivileged(Native Method)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.api.Runner.execute(Runner.java:100)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.Main.executeTask(Main.java:70)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.Main.execute(Main.java:59)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.Main.main(Main.java:53)
[22:35:00]W:	 [Step 6/6] Caused by: java.lang.RuntimeException: [sonar4bitbucket] Failed to parse diff: string matching regex `\z' expected but `B' found
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.parseOrFail(IssuesOnChangedLinesFilter.scala:54)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.filter(IssuesOnChangedLinesFilter.scala:16)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.ReviewCommentsHandler.processIssues(ReviewCommentsHandler.scala:96)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.ReviewCommentsHandler.updateComments(ReviewCommentsHandler.scala:33)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.ch$mibex$bitbucket$sonar$review$SonarReviewPostJob$$handlePullRequest(SonarReviewPostJob.scala:42)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$execute$1.apply(SonarReviewPostJob.scala:26)
[22:35:00] :	 [Step 6/6] INFO: ------------------------------------------------------------------------
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$execute$1.apply(SonarReviewPostJob.scala:24)
[22:35:00]W:	 [Step 6/6] 	at scala.collection.immutable.List.foreach(List.scala:381)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.execute(SonarReviewPostJob.scala:24)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.postjob.PostJobWrapper.executeOn(PostJobWrapper.java:58)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:66)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:94)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
[22:35:00]W:	 [Step 6/6] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:35:00]W:	 [Step 6/6] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[22:35:00]W:	 [Step 6/6] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:35:00]W:	 [Step 6/6] 	at java.lang.reflect.Method.invoke(Method.java:498)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
[22:35:00]W:	 [Step 6/6] 	... 9 more
[22:35:00]W:	 [Step 6/6] Process exited with code 1
[22:34:49]E:	 [Step 6/6] Process exited with code 1 (Step: SonarQube (SonarQube Runner))
[22:35:00]E:	 [Step 6/6] Step SonarQube (SonarQube Runner) failed
[22:35:00]i: Stopping performance monitoring process

@nfalco79
Copy link

nfalco79 commented Sep 3, 2020

Hi @merrileemiller, could you post a little bit more of you stacktrace?
I mean the part that end with

[22:35:00]W:	 [Step 6/6] new file mode 100644
[22:35:00]W:	 [Step 6/6] index 0000000..2aa668f
[22:35:00]W:	 [Step 6/6] Binary files /dev/null and b/devops/sonarqube/specnet3719.pkl differ

In this way we can add a specific test case. It's sufficent since diff --git ...

We have found other unhandled row that start with X.

@mrueegg please focus on this PR just a little bit

@merrileemiller
Copy link

Hi @merrileemiller, could you post a little bit more of you stacktrace?
I mean the part that end with

[22:35:00]W:	 [Step 6/6] new file mode 100644
[22:35:00]W:	 [Step 6/6] index 0000000..2aa668f
[22:35:00]W:	 [Step 6/6] Binary files /dev/null and b/devops/sonarqube/specnet3719.pkl differ

In this way we can add a specific test case. It's sufficent since diff --git ...

We have found other unhandled row that start with X.

@mrueegg please focus on this PR just a little bit

Sure! Here it is.

[22:34:56] :	 [Step 6/6] 22:34:56.950 INFO  - ANALYSIS SUCCESSFUL
[22:34:57]W:	 [Step 6/6] Aug 26, 2020 10:34:57 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:57]W:	 [Step 6/6] INFO: 1 * Client out-bound request
[22:34:57]W:	 [Step 6/6] 1 > POST https://bitbucket.org/site/oauth2/access_token
[22:34:57]W:	 [Step 6/6] 1 > Content-Type: application/x-www-form-urlencoded
[22:34:57]W:	 [Step 6/6] 1 > Authorization: Basic MldtQTM4dG03M2pOREFwRm1jOjlIUkpEdjloUVNoUUhzVUI5WkM0WUxzWVM0Qmg0MkZV
[22:34:57]W:	 [Step 6/6] grant_type=client_credentials
[22:34:57]W:	 [Step 6/6] 
[22:34:57]W:	 [Step 6/6] Aug 26, 2020 10:34:57 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:57]W:	 [Step 6/6] INFO: 1 * Client in-bound response
[22:34:57]W:	 [Step 6/6] 1 < 200
[22:34:57]W:	 [Step 6/6] 1 < Server: nginx
[22:34:57]W:	 [Step 6/6] 1 < X-Content-Type-Options: nosniff
[22:34:57]W:	 [Step 6/6] 1 < Connection: Keep-Alive
[22:34:57]W:	 [Step 6/6] 1 < X-Static-Version: 08de812ccc5d
[22:34:57]W:	 [Step 6/6] 1 < DC-Location: ash2
[22:34:57]W:	 [Step 6/6] 1 < X-Version: 08de812ccc5d
[22:34:57]W:	 [Step 6/6] 1 < Date: Wed, 26 Aug 2020 22:34:46 GMT
[22:34:57]W:	 [Step 6/6] 1 < X-Frame-Options: SAMEORIGIN
[22:34:57]W:	 [Step 6/6] 1 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
[22:34:57]W:	 [Step 6/6] 1 < X-Dc-Location: ash2
[22:34:57]W:	 [Step 6/6] 1 < X-Render-Time: 0.029620885849
[22:34:57]W:	 [Step 6/6] 1 < Cache-Control: no-cache, no-store, must-revalidate, max-age=0
[22:34:57]W:	 [Step 6/6] 1 < X-Served-By: app-3003
[22:34:57]W:	 [Step 6/6] 1 < X-B3-TraceId: 1a8ac641802de0d5
[22:34:57]W:	 [Step 6/6] 1 < Vary: Accept-Language, Cookie
[22:34:57]W:	 [Step 6/6] 1 < Expires: Wed, 26 Aug 2020 22:34:46 GMT
[22:34:57]W:	 [Step 6/6] 1 < Content-Length: 257
[22:34:57]W:	 [Step 6/6] 1 < Content-Security-Policy-Report-Only: script-src 'unsafe-eval' 'strict-dynamic' 'unsafe-inline' 'self' http: https: https://d301sr5gafysq2.cloudfront.net; style-src 'self' 'unsafe-inline' https://aui-cdn.atlassian.com https://d301sr5gafysq2.cloudfront.net; report-uri https://web-security-reports.services.atlassian.com/csp-report/bb-website; default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob: *; connect-src bitbucket.org *.bitbucket.org bb-inf.net *.bb-inf.net analytics.atlassian.com as.atlassian.com api-private.stg.atlassian.com api-private.atlassian.com cofs.staging.public.atl-paas.net cofs.prod.public.atl-paas.net intake.opbeat.com api.media.atlassian.com api.segment.io xid.statuspage.io xid.atlassian.com xid.sourcetreeapp.com bam.nr-data.net sentry.io bqlf8qjztdtr.statuspage.io https://d301sr5gafysq2.cloudfront.net; object-src about:; base-uri 'self'
[22:34:57]W:	 [Step 6/6] 1 < Content-Language: en
[22:34:57]W:	 [Step 6/6] 1 < X-Request-Count: 2460
[22:34:57]W:	 [Step 6/6] 1 < Content-Type: application/json
[22:34:57]W:	 [Step 6/6] 1 < 
[22:34:57]W:	 [Step 6/6] {"scopes": "account pullrequest:write", "access_token": "OOnOp-2l1ME-kedt-SmvhM_T9RW1GzCRzc0jQJjjbZJ_mi3pl9luVIGCht7kh27SU4pd83jTeQalhqD0skc=", "expires_in": 7200, "token_type": "bearer", "state": "client_credentials", "refresh_token": "xrcna8JGFc3xbXg59f"}
[22:34:57]W:	 [Step 6/6] 
[22:34:57] :	 [Step 6/6] 22:34:57.792 DEBUG - Post-jobs : Sonar Plug-in for Bitbucket Cloud (wrapped)
[22:34:57] :	 [Step 6/6] 22:34:57.792 INFO  - Executing post-job Sonar Plug-in for Bitbucket Cloud (wrapped)
[22:34:57]W:	 [Step 6/6] Aug 26, 2020 10:34:57 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:57]W:	 [Step 6/6] INFO: 2 * Client out-bound request
[22:34:57]W:	 [Step 6/6] 2 > GET https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/pullrequests?page=1&pagelen=50&state=OPEN
[22:34:57]W:	 [Step 6/6] 2 > Accept: application/json
[22:34:57]W:	 [Step 6/6] 2 > Content-Type: application/json
[22:34:57]W:	 [Step 6/6] 2 > Authorization: Bearer OOnOp-2l1ME-kedt-SmvhM_T9RW1GzCRzc0jQJjjbZJ_mi3pl9luVIGCht7kh27SU4pd83jTeQalhqD0skc=
[22:34:57]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 2 * Client in-bound response
[22:34:59]W:	 [Step 6/6] 2 < 200
[22:34:59]W:	 [Step 6/6] 2 < X-Accepted-OAuth-Scopes: pullrequesta
[22:34:59]W:	 [Step 6/6] 2 < X-Credential-Type: oauth2
[22:34:59]W:	 [Step 6/6] 2 < Server: nginx
[22:34:59]W:	 [Step 6/6] 2 < X-Content-Type-Options: nosniff
[22:34:59]W:	 [Step 6/6] 2 < Connection: Keep-Alive
[22:34:59]W:	 [Step 6/6] 2 < X-Static-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 2 < DC-Location: ash2
[22:34:59]W:	 [Step 6/6] 2 < X-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 2 < Date: Wed, 26 Aug 2020 22:34:47 GMT
[22:34:59]W:	 [Step 6/6] 2 < X-Frame-Options: SAMEORIGIN
[22:34:59]W:	 [Step 6/6] 2 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
[22:34:59]W:	 [Step 6/6] 2 < X-Dc-Location: ash2
[22:34:59]W:	 [Step 6/6] 2 < X-Render-Time: 0.703605890274
[22:34:59]W:	 [Step 6/6] 2 < ETag: "42fd142189f9cb9785fd5ee75b35ae2e"
[22:34:59]W:	 [Step 6/6] 2 < X-Served-By: app-3002
[22:34:59]W:	 [Step 6/6] 2 < X-B3-TraceId: 388a7c6b0a69b822
[22:34:59]W:	 [Step 6/6] 2 < Vary: Accept-Encoding
[22:34:59]W:	 [Step 6/6] 2 < Vary: Authorization
[22:34:59]W:	 [Step 6/6] 2 < Content-Length: 105392
[22:34:59]W:	 [Step 6/6] 2 < X-OAuth-Scopes: pullrequest:write, account
[22:34:59]W:	 [Step 6/6] 2 < X-Request-Count: 4431
[22:34:59]W:	 [Step 6/6] 2 < Content-Type: application/json; charset=utf-8
[22:34:59]W:	 [Step 6/6] 2 < 
<line removed>
[22:34:59]W:	 [Step 6/6] 
[22:34:59] :	 [Step 6/6] 22:34:59.217 INFO  - [sonar4bitbucket] Plug-in is active and will analyze pull request #2367...
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 3 * Client out-bound request
[22:34:59]W:	 [Step 6/6] 3 > POST https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/commit/903504e64eec/statuses/build
[22:34:59]W:	 [Step 6/6] 3 > Content-Type: application/json
[22:34:59]W:	 [Step 6/6] 3 > Accept: application/json
[22:34:59]W:	 [Step 6/6] 3 > Authorization: Bearer OOnOp-2l1ME-kedt-SmvhM_T9RW1GzCRzc0jQJjjbZJ_mi3pl9luVIGCht7kh27SU4pd83jTeQalhqD0skc=
[22:34:59]W:	 [Step 6/6] {"name":"Sonar analysis","state":"INPROGRESS","url":"http://192.168.1.116:9000//dashboard?id=SpectrumNet:SPECNET-3719","description":"Sonar analysis in progress...","key":"SONAR-ANALYSIS-PR-2367"}
[22:34:59]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 3 * Client in-bound response
[22:34:59]W:	 [Step 6/6] 3 < 200
[22:34:59]W:	 [Step 6/6] 3 < X-Accepted-OAuth-Scopes: repository
[22:34:59]W:	 [Step 6/6] 3 < X-Credential-Type: oauth2
[22:34:59]W:	 [Step 6/6] 3 < Server: nginx
[22:34:59]W:	 [Step 6/6] 3 < X-Content-Type-Options: nosniff
[22:34:59]W:	 [Step 6/6] 3 < Connection: Keep-Alive
[22:34:59]W:	 [Step 6/6] 3 < X-Static-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 3 < DC-Location: ash2
[22:34:59]W:	 [Step 6/6] 3 < X-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 3 < Date: Wed, 26 Aug 2020 22:34:47 GMT
[22:34:59]W:	 [Step 6/6] 3 < X-Frame-Options: SAMEORIGIN
[22:34:59]W:	 [Step 6/6] 3 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
[22:34:59]W:	 [Step 6/6] 3 < X-Dc-Location: ash2
[22:34:59]W:	 [Step 6/6] 3 < X-Render-Time: 0.123444080353
[22:34:59]W:	 [Step 6/6] 3 < X-Served-By: app-3016
[22:34:59]W:	 [Step 6/6] 3 < X-B3-TraceId: ade6ef1823398195
[22:34:59]W:	 [Step 6/6] 3 < Vary: Accept-Encoding
[22:34:59]W:	 [Step 6/6] 3 < Vary: Authorization
[22:34:59]W:	 [Step 6/6] 3 < Content-Length: 1461
[22:34:59]W:	 [Step 6/6] 3 < X-OAuth-Scopes: pullrequest:write, account
[22:34:59]W:	 [Step 6/6] 3 < X-Request-Count: 4093
[22:34:59]W:	 [Step 6/6] 3 < Location: /2.0/repositories/spectrumeffect/spectrum-net/commit/903504e64eecf74527e5dbf1c7acc276aa84aaf0/statuses/build/SONAR-ANALYSIS-PR-2367
[22:34:59]W:	 [Step 6/6] 3 < Content-Type: application/json
[22:34:59]W:	 [Step 6/6] 3 < 
[22:34:59]W:	 [Step 6/6] {"key": "SONAR-ANALYSIS-PR-2367", "description": "Sonar analysis in progress...", "repository": {"links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net"}, "html": {"href": "https://bitbucket.org/spectrumeffect/spectrum-net"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B8ab5954c-50fd-43dd-94c8-3c2b30ac966f%7D?ts=default"}}, "type": "repository", "name": "Spectrum-NET", "full_name": "spectrumeffect/spectrum-net", "uuid": "{8ab5954c-50fd-43dd-94c8-3c2b30ac966f}"}, "url": "http://192.168.1.116:9000//dashboard?id=SpectrumNet:SPECNET-3719", "links": {"commit": {"href": "https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/commit/903504e64eecf74527e5dbf1c7acc276aa84aaf0"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/commit/903504e64eecf74527e5dbf1c7acc276aa84aaf0/statuses/build/SONAR-ANALYSIS-PR-2367"}}, "refname": null, "state": "INPROGRESS", "created_on": "2020-08-26T21:16:32.325472+00:00", "commit": {"hash": "903504e64eecf74527e5dbf1c7acc276aa84aaf0", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/commit/903504e64eecf74527e5dbf1c7acc276aa84aaf0"}, "html": {"href": "https://bitbucket.org/spectrumeffect/spectrum-net/commits/903504e64eecf74527e5dbf1c7acc276aa84aaf0"}}}, "updated_on": "2020-08-26T22:34:47.827390+00:00", "type": "build", "name": "Sonar analysis"}
[22:34:59]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 4 * Client out-bound request
[22:34:59]W:	 [Step 6/6] 4 > GET https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/pullrequests/2367/comments?page=1&pagelen=50&=
[22:34:59]W:	 [Step 6/6] 4 > Accept: application/json
[22:34:59]W:	 [Step 6/6] 4 > Content-Type: application/json
[22:34:59]W:	 [Step 6/6] 4 > Authorization: Bearer OOnOp-2l1ME-kedt-SmvhM_T9RW1GzCRzc0jQJjjbZJ_mi3pl9luVIGCht7kh27SU4pd83jTeQalhqD0skc=
[22:34:59]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 4 * Client in-bound response
[22:34:59]W:	 [Step 6/6] 4 < 200
[22:34:59]W:	 [Step 6/6] 4 < X-Accepted-OAuth-Scopes: pullrequest
[22:34:59]W:	 [Step 6/6] 4 < X-Credential-Type: oauth2
[22:34:59]W:	 [Step 6/6] 4 < Server: nginx
[22:34:59]W:	 [Step 6/6] 4 < X-Content-Type-Options: nosniff
[22:34:59]W:	 [Step 6/6] 4 < Connection: Keep-Alive
[22:34:59]W:	 [Step 6/6] 4 < X-Static-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 4 < DC-Location: ash2
[22:34:59]W:	 [Step 6/6] 4 < X-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 4 < Date: Wed, 26 Aug 2020 22:34:48 GMT
[22:34:59]W:	 [Step 6/6] 4 < X-Frame-Options: SAMEORIGIN
[22:34:59]W:	 [Step 6/6] 4 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
[22:34:59]W:	 [Step 6/6] 4 < X-Dc-Location: ash2
[22:34:59]W:	 [Step 6/6] 4 < X-Render-Time: 0.0591480731964
[22:34:59]W:	 [Step 6/6] 4 < ETag: "d42f8757ef1abf01e68f5601c2c0eb4b"
[22:34:59]W:	 [Step 6/6] 4 < X-Served-By: app-3022
[22:34:59]W:	 [Step 6/6] 4 < X-B3-TraceId: 1ee87d50fd2cf492
[22:34:59]W:	 [Step 6/6] 4 < Vary: Authorization
[22:34:59]W:	 [Step 6/6] 4 < Content-Length: 51
[22:34:59]W:	 [Step 6/6] 4 < X-OAuth-Scopes: pullrequest:write, account
[22:34:59]W:	 [Step 6/6] 4 < X-Request-Count: 3361
[22:34:59]W:	 [Step 6/6] 4 < Content-Type: application/json; charset=utf-8
[22:34:59]W:	 [Step 6/6] 4 < 
[22:34:59]W:	 [Step 6/6] {"pagelen": 50, "values": [], "page": 1, "size": 0}
[22:34:59]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 5 * Client out-bound request
[22:34:59]W:	 [Step 6/6] 5 > HEAD https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/pullrequests/2367/diff
[22:34:59]W:	 [Step 6/6] 5 > Accept: application/json
[22:34:59]W:	 [Step 6/6] 5 > Content-Type: application/json
[22:34:59]W:	 [Step 6/6] 5 > Authorization: Bearer OOnOp-2l1ME-kedt-SmvhM_T9RW1GzCRzc0jQJjjbZJ_mi3pl9luVIGCht7kh27SU4pd83jTeQalhqD0skc=
[22:34:59]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 5 * Client in-bound response
[22:34:59]W:	 [Step 6/6] 5 < 302
[22:34:59]W:	 [Step 6/6] 5 < X-Accepted-OAuth-Scopes: pullrequest
[22:34:59]W:	 [Step 6/6] 5 < X-Credential-Type: oauth2
[22:34:59]W:	 [Step 6/6] 5 < Server: nginx
[22:34:59]W:	 [Step 6/6] 5 < X-Content-Type-Options: nosniff
[22:34:59]W:	 [Step 6/6] 5 < Connection: Keep-Alive
[22:34:59]W:	 [Step 6/6] 5 < X-Static-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 5 < DC-Location: ash2
[22:34:59]W:	 [Step 6/6] 5 < X-Version: 08de812ccc5d
[22:34:59]W:	 [Step 6/6] 5 < Date: Wed, 26 Aug 2020 22:34:48 GMT
[22:34:59]W:	 [Step 6/6] 5 < X-Frame-Options: SAMEORIGIN
[22:34:59]W:	 [Step 6/6] 5 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
[22:34:59]W:	 [Step 6/6] 5 < X-Dc-Location: ash2
[22:34:59]W:	 [Step 6/6] 5 < X-Render-Time: 0.0813579559326
[22:34:59]W:	 [Step 6/6] 5 < X-Served-By: app-3024
[22:34:59]W:	 [Step 6/6] 5 < X-B3-TraceId: ed5754bb48c14a6e
[22:34:59]W:	 [Step 6/6] 5 < Vary: Authorization
[22:34:59]W:	 [Step 6/6] 5 < Content-Length: 0
[22:34:59]W:	 [Step 6/6] 5 < X-OAuth-Scopes: pullrequest:write, account
[22:34:59]W:	 [Step 6/6] 5 < X-Request-Count: 3597
[22:34:59]W:	 [Step 6/6] 5 < Location: https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/diff/spectrumeffect/spectrum-net:903504e64eec%0D52d965ab7e4e?from_pullrequest_id=2367
[22:34:59]W:	 [Step 6/6] 5 < Content-Type: text/html; charset=utf-8
[22:34:59]W:	 [Step 6/6] 5 < 
[22:34:59]W:	 [Step 6/6] 
[22:34:59]W:	 [Step 6/6] Aug 26, 2020 10:34:59 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:34:59]W:	 [Step 6/6] INFO: 6 * Client out-bound request
[22:34:59]W:	 [Step 6/6] 6 > GET https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/diff/spectrumeffect/spectrum-net:903504e64eec%0D52d965ab7e4e?from_pullrequest_id=2367&context=0
[22:34:59]W:	 [Step 6/6] 6 > Authorization: Bearer OOnOp-2l1ME-kedt-SmvhM_T9RW1GzCRzc0jQJjjbZJ_mi3pl9luVIGCht7kh27SU4pd83jTeQalhqD0skc=
[22:34:59]W:	 [Step 6/6] 
[22:35:00]W:	 [Step 6/6] Aug 26, 2020 10:35:00 PM com.sun.jersey.api.client.filter.LoggingFilter log
[22:35:00]W:	 [Step 6/6] INFO: 6 * Client in-bound response
[22:35:00]W:	 [Step 6/6] 6 < 200
[22:35:00]W:	 [Step 6/6] 6 < X-Accepted-OAuth-Scopes: repository
[22:35:00]W:	 [Step 6/6] 6 < X-Credential-Type: oauth2
[22:35:00]W:	 [Step 6/6] 6 < Server: nginx
[22:35:00]W:	 [Step 6/6] 6 < X-Content-Type-Options: nosniff
[22:35:00]W:	 [Step 6/6] 6 < Connection: Keep-Alive
[22:35:00]W:	 [Step 6/6] 6 < X-Static-Version: 08de812ccc5d
[22:35:00]W:	 [Step 6/6] 6 < DC-Location: ash2
[22:35:00]W:	 [Step 6/6] 6 < X-Version: 08de812ccc5d
[22:35:00]W:	 [Step 6/6] 6 < Date: Wed, 26 Aug 2020 22:34:48 GMT
[22:35:00]W:	 [Step 6/6] 6 < X-Frame-Options: SAMEORIGIN
[22:35:00]W:	 [Step 6/6] 6 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
[22:35:00]W:	 [Step 6/6] 6 < X-Dc-Location: ash2
[22:35:00]W:	 [Step 6/6] 6 < X-Render-Time: 0.197070121765
[22:35:00]W:	 [Step 6/6] 6 < Cache-Control: max-age=86400
[22:35:00]W:	 [Step 6/6] 6 < ETag: "d02893afc93be093d9aa9c480133ef6a9df759d9bc7565e1268d99b509611252"
[22:35:00]W:	 [Step 6/6] 6 < X-Served-By: app-3029
[22:35:00]W:	 [Step 6/6] 6 < X-B3-TraceId: b912cfe75bd8c8f3
[22:35:00]W:	 [Step 6/6] 6 < Vary: Authorization
[22:35:00]W:	 [Step 6/6] 6 < Content-Length: 194
[22:35:00]W:	 [Step 6/6] 6 < X-OAuth-Scopes: pullrequest:write, account
[22:35:00]W:	 [Step 6/6] 6 < X-Request-Count: 3154
[22:35:00]W:	 [Step 6/6] 6 < Content-Type: text/plain
[22:35:00]W:	 [Step 6/6] 6 < 
[22:35:00]W:	 [Step 6/6] diff --git a/devops/sonarqube/specnet3719.pkl b/devops/sonarqube/specnet3719.pkl
[22:35:00]W:	 [Step 6/6] new file mode 100644
[22:35:00]W:	 [Step 6/6] index 0000000..2aa668f
[22:35:00]W:	 [Step 6/6] Binary files /dev/null and b/devops/sonarqube/specnet3719.pkl differ
[22:35:00]W:	 [Step 6/6] 
[22:35:00]W:	 [Step 6/6] 
[22:35:00] :	 [Step 6/6] INFO: ------------------------------------------------------------------------
[22:35:00] :	 [Step 6/6] INFO: EXECUTION FAILURE
[22:35:00] :	 [Step 6/6] INFO: ------------------------------------------------------------------------
[22:35:00] :	 [Step 6/6] Total time: 24.041s
[22:35:00]W:	 [Step 6/6] ERROR: Error during Sonar runner execution
[22:35:00] :	 [Step 6/6] Final Memory: 23M/582M
[22:35:00]W:	 [Step 6/6] org.sonar.runner.impl.RunnerException: Unable to execute Sonar
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
[22:35:00]W:	 [Step 6/6] 	at java.security.AccessController.doPrivileged(Native Method)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.api.Runner.execute(Runner.java:100)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.Main.executeTask(Main.java:70)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.Main.execute(Main.java:59)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.Main.main(Main.java:53)
[22:35:00]W:	 [Step 6/6] Caused by: java.lang.RuntimeException: [sonar4bitbucket] Failed to parse diff: string matching regex `\z' expected but `B' found
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.parseOrFail(IssuesOnChangedLinesFilter.scala:54)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.filter(IssuesOnChangedLinesFilter.scala:16)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.ReviewCommentsHandler.processIssues(ReviewCommentsHandler.scala:96)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.ReviewCommentsHandler.updateComments(ReviewCommentsHandler.scala:33)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.ch$mibex$bitbucket$sonar$review$SonarReviewPostJob$$handlePullRequest(SonarReviewPostJob.scala:42)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$execute$1.apply(SonarReviewPostJob.scala:26)
[22:35:00] :	 [Step 6/6] INFO: ------------------------------------------------------------------------
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$execute$1.apply(SonarReviewPostJob.scala:24)
[22:35:00]W:	 [Step 6/6] 	at scala.collection.immutable.List.foreach(List.scala:381)
[22:35:00]W:	 [Step 6/6] 	at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.execute(SonarReviewPostJob.scala:24)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.postjob.PostJobWrapper.executeOn(PostJobWrapper.java:58)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:66)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:94)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
[22:35:00]W:	 [Step 6/6] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:35:00]W:	 [Step 6/6] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[22:35:00]W:	 [Step 6/6] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:35:00]W:	 [Step 6/6] 	at java.lang.reflect.Method.invoke(Method.java:498)
[22:35:00]W:	 [Step 6/6] 	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
[22:35:00]W:	 [Step 6/6] 	... 9 more
[22:35:00]W:	 [Step 6/6] Process exited with code 1
[22:34:49]E:	 [Step 6/6] Process exited with code 1 (Step: SonarQube (SonarQube Runner))
[22:35:00]E:	 [Step 6/6] Step SonarQube (SonarQube Runner) failed

@LauraCameran LauraCameran force-pushed the feature/102 branch 2 times, most recently from 6e629cd to 616c3a2 Compare September 4, 2020 07:18
@LauraCameran
Copy link
Author

LauraCameran commented Sep 4, 2020

Hi @merrileemiller ,
I just added your case to the test (see new commit 8b9e12d ).
The test succeeds on our side. Can you please check?

@merrileemiller
Copy link

Thanks @LauraCameran !

It turns out I was not installing the plugin correctly so this was definitely a problem on my end. 🤦‍♀️
It's working now. 👍

[20:41:35]W:	 [Step 6/6] new file mode 100644
[20:41:35]W:	 [Step 6/6] index 0000000..2aa668f
[20:41:35]W:	 [Step 6/6] Binary files /dev/null and b/devops/sonarqube/specnet3719.pkl differ
[20:41:35]W:	 [Step 6/6] 
[20:41:35]W:	 [Step 6/6] 
[20:41:36] :	 [Step 6/6] 20:41:36.045 DEBUG - [sonar4bitbucket] Found 3298 issues and 0 of them are new:
[20:41:36] :	 [Step 6/6] 20:41:36.049 DEBUG - [sonar4bitbucket] And 0 of these are on changed or new lines:
[20:41:36] :	 [Step 6/6] 20:41:36.053 DEBUG - [sonar4bitbucket] Found 0 existing inline comments:
[20:41:36]W:	 [Step 6/6] Sep 22, 2020 8:41:36 PM com.sun.jersey.api.client.filter.LoggingFilter log
[20:41:36]W:	 [Step 6/6] INFO: 7 * Client out-bound request
[20:41:36]W:	 [Step 6/6] 7 > POST https://api.bitbucket.org/2.0/repositories/spectrumeffect/spectrum-net/pullrequests/2367/comments
[20:41:36]W:	 [Step 6/6] 7 > Content-Type: application/json
[20:41:36]W:	 [Step 6/6] 7 > Accept: application/json
[20:41:36]W:	 [Step 6/6] 7 > Authorization: Bearer tjdqpoWJ6274zGdg7TMgjYAi2JPtQ85RoC6Xdxo19Hs3aduW_o8enCvEXR5a4c9vvIqr3NXYm1LAZaO7dio=
[20:41:36]W:	 [Step 6/6] {"content":{"raw":"**SonarQube Analysis** reported no issues. Take a chocolate :-)\n\nNote that only issues with severity >= ![MINOR](https://raw.githubusercontent.com/mibexsoftware/sonar-bitbucket-plugin/master/src/main/resources/images/severity/MINOR.png) (minor) are reported."}}

@ameersami
Copy link

@LauraCameran @mrueegg do we know when we can expect this PR to be merged in? Seems like a lot of people are encountering this issue and this would be nice to have released

@ameersami
Copy link

@LauraCameran it seems this is your first PR. Can you please add @mrueegg as a review to this PR?

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

Successfully merging this pull request may close these issues.

6 participants