Configuring a Leak Period with Custom Date and Quality Gates focused on New issues

Ann,

To help me investigate our infrastructure further, can you take a look at this screenshot:

image

The date/time highlighted is 12:19 PM. What does this time represent? E.g. is it some time passed from the publish task in TFS? Is it the start of the import into SonarQube or the end time? I’m trying to use SonarQube data and TFS logs to paint a picture of what’s happening.

Many thanks,

I believe that’s the time that analysis started on your build machine.

HTH,
Ann

Thanks Ann,

Still no smoking gun I’m afraid, but…

The projects it often confuses have multiple workspace mappings in the TFS “Get Sources” step. Each workspace mapping gets a solution to build shared components, as well as the actual project we deploy and expect to publish to SonarQube (so an sln file in each workspace).

I’m now wondering if it’s actually picking up the wrong solution output when publishing to SonarQube.

I’m convinced it’s something to do with multiple workspace mappings now:

No other builds running on any build agent, I selected a project with multiple mappings and built it 3 times (no edits, same codebase exactly), waiting to ensure each build is published to SonarQube.

The code in SonarQube flip-flopped between 2 of the mapped workspace solutions.

Ann, how does the “publish” to SonarQube step work out which solution to upload when there are multiple workspace mappings please?

Hi,

I don’t even know what “multiple workspace mappings” are. I’m no expert in .NET analysis, but I can tell you that “what project is this, and what’s in it?” are answered by your .sln file.

So… it sounds like maybe you have zombie files in your analysis directory from a previous project…?

But again, this is pretty far afield from “Configuring a Leak Period with Custom Date…”.

Ann

Hi Ann,

You’re absolutely right, It is pretty far afield, but it’s the setup I’m trying to create. I’m purely speculating at what the cause of the problem is but I need the analysis of my projects to work correctly, every time, and the quality gates to fail on new code only. It’s why I raised this as “Get Help” rather than a “Bug” (since I really don’t know if this is a bug or not).

Something I have noticed is that, in some projects (including the ones affected) the build pipeline step has the path set to find the solution file as ***.sln. As there are multiple valid solutions in the mapped locations, I’ve updated it to specifically target the primary “Finance” solution. This appears to be now correctly importing the Finance project, rather than the random project selection when it was set to regex.

I’ll monitor it and see if it’s resolved the issue, if so I can then reset the leak period to the middle of this month and measure from there (though it would be handy if it was possible to purge all previous analysis but keep the project configuration in SonarQube?).

Many thanks,

Hi,

You can selectively purge analyses on the project’s Activity page if you have rights.

 
Ann