SonarQube + Gitlab: Merge-Request "roundtrip" issue

Hello,
I’m asking for explanation and help on the following.

One of our dev teams faces the scenario that Gitlab pipeline runs for approx. ~20 Mins, which is considered a lot for the innovative nature of the project.
Then, the main problem is this: Using Gitlab+SQ the team experiences the situation that SQ will pass with success on a merge-request (based on latest target branch), but fails on master branch without successful deployment and the trouble of roundtrip-overhead to satisfy SQ, ultimately extending the pipeline from some 20 to 40 Mins., which is inacceptable.

Questions:

  • Preliminary: Is this problem description sufficient / can be understood / “makes sense”?
  • Is this issue known or specific in our situation?
  • Is this a SQ or Gitlab or both problem?
  • What suggestions exist to work-around or fix this?
  • Note that I’m reporting this from Quality-departments side, I cannot directly provide deeper insights/information without

Must-share information (formatted with Markdown):

  • GitLab Enterprise Edition 13.2.3-ee
  • Developer Edition Version 8.2 (build 32929)

Hello Ludwig,

I think the problem is clear, but to be sure let me restate: you’re asking for help reducing the time it takes to complete the loop after encountering a Quality Gate failure, not help with diagnosing a specific failure, correct?

The most tempting answer, which might sound sarcastic (but isn’t): work on reducing how long that build takes. :wink: Has SonarQube analysis contributed much to that figure? If the analysis has made the situation worse, I strongly encourage you to Narrow the Focus and reduce analysis to just the files that are critical for the project.

Beyond that, there are some other measures you can put in place: have developers use SonarLint to find and fix as many of the issues that might lead to QG failure as possible before you even run a pipeline. It can’t necessarily find everything that could lead to a failure, but will hopefully reduce much of the late rework.

Without knowing more specifics, I think those are the main tips for you for now.

2 Likes

Happy to read your feedback, Jeff :wink: Well well, that CI/CD is out of my resort and a major situation as far as I can say from the project size. Still, the point the expert is making, that SQ fails on Master is apparently a major headache if it passes on the MR? Ok, I try to believe that “Analysis Scope” might be a way forward. Thanks for the feedback. I have can be more specific, I would and will be, but for now this is next step. Regards