-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
First analysis on a "non-main branch" is not processed/displayed in sonarqube 10.6 when the project is auto-provisioned #1005
Comments
Do you get an error in the logs on the first analysis? |
In the scanner logs, I can see no errors :
In the Administration/Projects/Background Tasks/Task log Error detail, I can see the following message :
Don't hesitate to tell me if you need more infos Thanks |
I encountered the same error. The SonarQube server is running Community Edition v10.7 (96327). My CI Server is Gitlab (v17.5.2) I no use waitForQualityGate plugin However, when I ran the scan a second time, it worked fine. |
Hello! Sonarqube version - 10.6 (92116) When you first launch a new project and a branch that differs from the default branch, SonarQube does not provide analysis and an error occurs. A page with a project and two branches is being created, but there is no analysis. Error Details:
When I run the scan a second time, everything works fine |
UPD |
I'm working on a fix for this bug. It seems i have solved the problem. I make a pr the sooner. |
Describe the bug
The first analysis on a "non-main branch" is not processed/displayed in sonarqube 10.6 when the project is auto-provisioned.
("non-main branch" => as configured in "Branches & Pull Requests" project settings tab)
To Reproduce
Steps to reproduce the behavior:
On an WSL/ubuntu host
Download Community Branch Plugin 1.22.0 jar file from Github Project Release page. Move it to the
extensions/plugins/
folder of sonarqube containerConfigure sonar.properties file, in container's
conf/
folder, by adding folowing lines :Restart sonarqube container
Verify that "main" is the "Default main branch name" in General settings
On same host, cd into your code to analyse
Launch a sonar scan on a non-existing project and non-main branch via
Expected behavior
Project is created and we should see analysis results on the my_custom_branch branch of the project view in sonar.
Obtained behavior
Project is created BUT analysis is not populated in branch page.
We only get a message '"my_custom_branch" branch has not been analyzed yet.' in the branch analysis page.
Screenshots
Expected results
Obtained results
Software Versions
Additional context
I suspect this behaviour is the cause why in Jenkins, our "waitForQualityGate" call crash (via Jenkins Sonar Plugin) after scan
We need to launch a second time the same sonar scanner command line to populate the branch analysis, as expected.
The same usecase, but without branch parameter OR "main" (as it) reference branch submitted in scanner command line, gives us analysis results in sonarqube at first call (as expected)
Don't hesitate to ask me if you need more info on this case.
Thanks
The text was updated successfully, but these errors were encountered: