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

Devops PR Decoration - Not working for projects/repos which contain spaces #461

Closed
axylophon opened this issue Sep 29, 2021 · 5 comments
Closed
Labels
awaiting release Merged but not currently in release vesrion bug Something isn't working

Comments

@axylophon
Copy link

The Devops PR Decoration is not working for projects/repos which have spaces in the name.
It is also not possible to configure it within the SonarUI.
The character Ö should in this case not be the problem as another project without umlauts is also not working.

404

2021.09.28 08:43:24 ERROR ce[AXwrJJXMpA_JVSv-Mudr][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Execution of task class com.github.mc1arke.sonarqube.plugin.ce.pullrequest.PullRequestPostAnalysisTask failed
java.lang.IllegalStateException: An unexpected response code was returned from the Azure Devops API - Expected: 200, Got: 404
	at com.github.mc1arke.sonarqube.plugin.almclient.azuredevops.AzureDevopsRestClient.validateResponse(AzureDevopsRestClient.java:157)
	at com.github.mc1arke.sonarqube.plugin.almclient.azuredevops.AzureDevopsRestClient.execute(AzureDevopsRestClient.java:129)
	at com.github.mc1arke.sonarqube.plugin.almclient.azuredevops.AzureDevopsRestClient.retrievePullRequest(AzureDevopsRestClient.java:107)
	at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.azuredevops.AzureDevOpsPullRequestDecorator.getPullRequest(AzureDevOpsPullRequestDecorator.java:98)
	at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.azuredevops.AzureDevOpsPullRequestDecorator.getPullRequest(AzureDevOpsPullRequestDecorator.java:60)
	at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.DiscussionAwarePullRequestDecorator.decorateQualityGateStatus(DiscussionAwarePullRequestDecorator.java:69)
	at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.PullRequestPostAnalysisTask.finished(PullRequestPostAnalysisTask.java:160)
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:110)
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:101)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:91)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:63)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

2021.09.28 08:43:14 ERROR web[AXwrDReRoh7bqy5KAAMA][c.g.m.s.p.a.a.AzureDevopsRestClient] Azure Devops response status did not match expected value. Expected: 200\r\nHTTP/1.1 404 Not Found\r\n

@axylophon axylophon added the bug Something isn't working label Sep 29, 2021
mc1arke added a commit that referenced this issue Oct 2, 2021
…names

Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containg spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
mc1arke added a commit that referenced this issue Oct 2, 2021
…names

Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containg spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
mc1arke added a commit that referenced this issue Oct 2, 2021
Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containg spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
mc1arke added a commit that referenced this issue Oct 4, 2021
Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containg spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
mc1arke added a commit that referenced this issue Oct 4, 2021
Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containg spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
mc1arke added a commit that referenced this issue Oct 4, 2021
Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containg spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
@mc1arke mc1arke added awaiting release Merged but not currently in release vesrion backport candidate This feature or fix should be included in another release branch labels Oct 4, 2021
@axylophon
Copy link
Author

axylophon commented Oct 7, 2021

Hi, i have built the plugin from the latest master commit - looks good on the first test - the PR decoration is back alive for our repositories 🥇

Thank you very much!

@hokiepokedad2
Copy link

Hello, we are using the latest docker tag for this image in Azure. Possible to get a new tag with this fix in? 🙏

@mc1arke
Copy link
Owner

mc1arke commented Dec 18, 2021

Released in 1.10.0 of the plugin

@mc1arke mc1arke closed this as completed Dec 18, 2021
@rdelcampog
Copy link

@mc1arke Can this be backported to a Sonarqube 8.9 compatible plugin version (v1.8.2)?

We have this problem but need to use the LTS version :(

@mattsteinRRD
Copy link

Same here. We are using the LTS version of SonarQube :(

mc1arke added a commit that referenced this issue Jun 19, 2022
Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containing spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
mc1arke added a commit that referenced this issue Jun 19, 2022
Azure DevOps does not correctly resolve URLs that contains spaces encoded as a `+`. To allow projects containing spaces to be decorated, the `+` from an the encoded names is being replaced with a `%20` since Azure Devops resolves spaces encoded this way properly.
@mc1arke mc1arke removed the backport candidate This feature or fix should be included in another release branch label Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release Merged but not currently in release vesrion bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants