-
Notifications
You must be signed in to change notification settings - Fork 57
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
Cnes report is executed too soon in the Sonar Scanner stage #732
Labels
bug
Something isn't working
Comments
Should we set a sleep between the sonar scanner cli and cnes report here? |
Nice one :( Maybe we can use the API to check if the task finished? |
This was referenced Oct 6, 2021
Pull requests for master, 4.x and 3.x branches have been merged with the fix for this issue |
Well done @braisvq1996 :) |
michaelsauter
added a commit
to opendevstack/ods-pipeline
that referenced
this issue
Oct 12, 2021
* Do not generate reports when pull request exists for scanned branch. For more information, see opendevstack/ods-jenkins-shared-library#663 and cnescatlab/sonar-cnes-report#159. * Ensure background task on server finishes before generating a report. For more information, see opendevstack/ods-jenkins-shared-library#732. * Unify logging approach: instead of printing to STDOUT directly for some messages, funnel everything through the logger instance. Other tasks should adopt this as well. Closes #227.
michaelsauter
added a commit
to opendevstack/ods-pipeline
that referenced
this issue
Oct 12, 2021
* Do not generate reports when pull request exists for scanned branch. For more information, see opendevstack/ods-jenkins-shared-library#663 and cnescatlab/sonar-cnes-report#159. * Ensure background task on server finishes before generating a report. For more information, see opendevstack/ods-jenkins-shared-library#732. * Unify logging approach: instead of printing to STDOUT directly for some messages, funnel everything through the logger instance. Other tasks should adopt this as well. Closes #227.
4 tasks
michaelsauter
added a commit
to opendevstack/ods-pipeline
that referenced
this issue
Oct 14, 2021
* Do not generate reports when pull request exists for scanned branch. For more information, see opendevstack/ods-jenkins-shared-library#663 and cnescatlab/sonar-cnes-report#159. * Ensure background task on server finishes before generating a report. For more information, see opendevstack/ods-jenkins-shared-library#732. * Unify logging approach: instead of printing to STDOUT directly for some messages, funnel everything through the logger instance. Other tasks should adopt this as well. Closes #227.
michaelsauter
added a commit
to opendevstack/ods-pipeline
that referenced
this issue
Oct 14, 2021
* Do not generate reports when pull request exists for scanned branch. For more information, see opendevstack/ods-jenkins-shared-library#663 and cnescatlab/sonar-cnes-report#159. * Ensure background task on server finishes before generating a report. For more information, see opendevstack/ods-jenkins-shared-library#732. * Unify logging approach: instead of printing to STDOUT directly for some messages, funnel everything through the logger instance. Other tasks should adopt this as well. Closes #227.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
After the Sonarqube scan ends successfully, cnes report is executed but if the backgound task in SonarQube have not ended the information picked would be from the previous scanner or if the branch is new, then the pipeline will fail.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The cnes report should be executed after the Sonarqube Background task has finished
Screenshots
Issue we found
![Captura2](https://user-images.githubusercontent.com/26645694/135991137-c262a907-95ff-423b-be49-9e1adbaaa7aa.PNG)
Execution timeline
![Captura3](https://user-images.githubusercontent.com/26645694/135991235-3215115d-ee0d-4b81-8398-5e417c10e1df.PNG)
Affected version (please complete the following information):
Log Output (ensure to remove any confidential information like tokens, project names, etc.
Additional context
It took 3 seconds after the Sonar scan cli has finished and the error appeared in the pipeline (cnes report), and checking the background task for this issue, it took 10 seconds to finish.
So if the cnes report was executed 15 seconds later, it would not have failed.
Checking the history of the time it takes the background tasks to finish, I can see different duration for the tasks, from miliseconds up to 20 seconds.
@michaelsauter @metmajer
The text was updated successfully, but these errors were encountered: