I have setup a project on SonarCloud to scan a git repo hosted on Azure DevOps, the build pipeline and scan work fine but I don’t see any blame info when inspecting the code in SonarCloud (blame info is available in Azure DevOps and locally when running the `git blame’ command), here’s the log from the build:
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 14 source files to be analyzed
INFO: Blaming files using native implementation
INFO: Blaming files using native implementation (done) | time=541ms
INFO: SCM Publisher 0/14 source files have been analyzed (done) | time=1088ms
WARN: Missing blame information for the following files:
WARN: * (list of 14 files)
WARN: This may lead to missing/broken features in SonarCloud
INFO: CPD Executor 31 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 117 files
INFO: CPD Executor CPD calculation finished (done) | time=117ms
INFO: SCM writing changed lines
INFO: SCM writing changed lines (done) | time=259ms
INFO: Analysis report generated in 2675ms, dir size=418 KB
INFO: Analysis report compressed in 213ms, zip size=182 KB
INFO: Analysis report uploaded in 174ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: ...
This is the first project I have setup in a while, and probably the first one using the new “onboarding” process. I have other git projects/repos in the same subscription I setup over a year ago and they show the blame info correctly.
Perhaps I have not understood what you mean by “uncommitted changes”, but if the pipeline is building from a repo hosted on Azure DevOps how would it be possible to have uncommitted changes? By definition you cannot sync or push uncommitted changes to the remote.
@Colin , did you spot anything in the log file I shared?
I looked at the log file you shared which lead me to the questions I asked in the previous post.
git status won’t show if the clone is shallow. You can try methods suggested here to find out.
Any process could run after the clone and modify files, which would lead them to appear as having uncommitted changes locally.
However, the git status output you shared seem to exclude this possibility.
Looking at the logs and list of files after WARN: Missing blame information for the following files:, can you identify a pattern? The content of that list seem to change (it is not the same in your initial post and the log file you shared). Maybe that could lead you to something they have in common.
OK, I understand, my pipeline doesn’t perform any additional git operations or changes to the files, it is straight build from code with added SonarCloud integration.
The warning lists the files that were changed by the commit operation that triggers the pipeline.
You provided useful information by ruling out some likely causes.
It appears we are lacking details in the logs (even in DEBUG) to figure the problem.
We will try and reproduce the problem, thanks to all the details you provided, to get further information.
I’m personally off tonight until September. Someone else will take over this thread and will keep you informed on progress.
There is an issue on our end, specific to WIndows agents. A fix is being validated right now and should be deployed this week. I’ll keep you posted here when the fix is available, for you to confirm that everything is back on track.