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

10.7 upgrade #976

Closed
kakawait opened this issue Oct 8, 2024 · 10 comments
Closed

10.7 upgrade #976

kakawait opened this issue Oct 8, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@kakawait
Copy link

kakawait commented Oct 8, 2024

10.6 Sonarqube version has following bug https://sonarsource.atlassian.net/browse/SONAR-22149 that prevent displaying image from Sonaqube server

Resulting

Screenshot 2024-10-08 at 15 50 29

Can we release new version of plugin for 10.7?

I've tried on my fork, 10.7 is just bump number version, no breaking change on API and other.
That why I didn't propose PR because is it will more about releasing process rather than coding value.

PS: with 10.7 version icon from report is correctly fixed

@kakawait kakawait added the bug Something isn't working label Oct 8, 2024
@brother
Copy link

brother commented Oct 8, 2024

Does the plugin work properly on 10.7?
If that's the case I don't see what you need from a new version of the plugin, the version matrix on the readme need to be updated but that could probably be handled without a proper release.

@kakawait
Copy link
Author

kakawait commented Oct 8, 2024

Yes it works. Is more about releasing new docker image https://hub.docker.com/r/mc1arke/sonarqube-with-community-branch-plugin

I know we can use official sonarqube docker image but this plugin image is really simpler to use

@sephiroth-j
Copy link

Well, it works, but the report key for Code Insights has changed from the project key to "com.sonarsource.sonarqube"! So if you had previously defined a Code Insights report using the project key, you need to change it to the new key.

@mc1arke
Copy link
Owner

mc1arke commented Oct 11, 2024

Well, it works, but the report key for Code Insights has changed

This was called out in the release note (copied below), and isn't relevant to whether the plugin works on 10.7, given the same bahviour is exhibited on 10.6:

#934: Use static report key for non-monorepo Bitbucket decoration by @mc1arke in #951

@sephiroth-j
Copy link

Okay, thanks for the clarification. We updated from Sonar 10.6. to 10.7 and at the same time updated the plugin from 1.21 to 1.22 and did not correctly assess the impact of this change.

@tejas-dhamdhere
Copy link

Hello @mc1arke

Could you please check and confirm plugin version 1.22.0 is supported (working properly)for Sonarqube version 10.7 and update version matrix on the readme

@brother
Copy link

brother commented Oct 23, 2024

I am using 1.22.0 + 10.7 fine for our platform.

README need updates ofc.

@naofireblade
Copy link

I m using 1.22.0 + 10.7 with GitLab MR decoration without problems.

@99Arrzel
Copy link

99Arrzel commented Dec 5, 2024

Trying to accomplish this with Github
PR is not working

Looks like github api has a typo

sonarqube  | java.lang.IllegalStateException: Could not decorate Pull Request on Github
sonarqube  |    at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.github.GithubPullRequestDecorator.decorateQualityGateStatus(GithubPullRequestDecorator.java:96)
sonarqube  |    at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.PullRequestPostAnalysisTask.finished(PullRequestPostAnalysisTask.java:139)
sonarqube  |    at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:101)
sonarqube  |    at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:92)
sonarqube  |    at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:89)
sonarqube  |    at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:61)
sonarqube  |    at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
sonarqube  |    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
sonarqube  |    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
sonarqube  |    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
sonarqube  |    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
sonarqube  |    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
sonarqube  |    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
sonarqube  |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
sonarqube  |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
sonarqube  |    at java.base/java.lang.Thread.run(Unknown Source)
sonarqube  | Caused by: java.lang.IllegalStateException: An error was returned in the response from the Github API:
sonarqube  | - Error{message='InputObject 'UpdateCheckRunInput' doesn't accept argument 'headSha'', locations=[Location{line='20', column='8291'}]}
sonarqube  |    at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.executeRequest(GraphqlGithubClient.java:246)
sonarqube  |    at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.reportRemainingAnnotations(GraphqlGithubClient.java:280)
sonarqube  |    at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.createCheckRun(GraphqlGithubClient.java:112)
sonarqube  |    at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.github.GithubPullRequestDecorator.decorateQualityGateStatus(GithubPullRequestDecorator.java:88)

looks like my issue is related to #969

@sebastiaanspeck
Copy link

Trying to accomplish this with Github

PR is not working

Looks like github api has a typo


sonarqube  | java.lang.IllegalStateException: Could not decorate Pull Request on Github

sonarqube  |    at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.github.GithubPullRequestDecorator.decorateQualityGateStatus(GithubPullRequestDecorator.java:96)

sonarqube  |    at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.PullRequestPostAnalysisTask.finished(PullRequestPostAnalysisTask.java:139)

sonarqube  |    at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:101)

sonarqube  |    at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:92)

sonarqube  |    at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:89)

sonarqube  |    at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:61)

sonarqube  |    at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)

sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)

sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)

sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)

sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)

sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)

sonarqube  |    at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)

sonarqube  |    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)

sonarqube  |    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)

sonarqube  |    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)

sonarqube  |    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

sonarqube  |    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

sonarqube  |    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

sonarqube  |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

sonarqube  |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

sonarqube  |    at java.base/java.lang.Thread.run(Unknown Source)

sonarqube  | Caused by: java.lang.IllegalStateException: An error was returned in the response from the Github API:

sonarqube  | - Error{message='InputObject 'UpdateCheckRunInput' doesn't accept argument 'headSha'', locations=[Location{line='20', column='8291'}]}

sonarqube  |    at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.executeRequest(GraphqlGithubClient.java:246)

sonarqube  |    at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.reportRemainingAnnotations(GraphqlGithubClient.java:280)

sonarqube  |    at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.createCheckRun(GraphqlGithubClient.java:112)

sonarqube  |    at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.github.GithubPullRequestDecorator.decorateQualityGateStatus(GithubPullRequestDecorator.java:88)



looks like my issue is related to #969

This will be fixed with a new release: #992

@mc1arke mc1arke closed this as completed Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants