Must-share information (formatted with Markdown):
- SonarQube Server * Enterprise Edition v10.7 (96327)
- deployed with Docker
- list the Quality Gates in the admin UI*
I was creating a new quality gate, and I encountered a error when creating a rule, and ended up with two copies of a rule. After I deleted the duplicate, I was unable to view the list of quality gates (see screen shot).
The rule that gave me the initial error was New Code, Security Rating is worse than “A”.
When I tried to save the rule, there was an error popup, something like, “no error returned”. I tried this a couple times, in rapid succession, and got a few popups, a mix of errors and success. The result was two copies of the same rule.
I deleted one of them, and thereafter I was unable to view quality gates, as shown in the screen shot.
The web log has the following errors (full log attached):
2025.03.04 08:47:16 ERROR web[ce1e02a0-09c0-4c0c-9acc-bde2a4b01482][o.s.s.w.WebServiceEngine] Fail to process request http://sonarqube.xello.tech/api/qualitygates/show?name=Xello%20Way%20-%20Front%20End%20with%20Coverage
java.lang.IllegalStateException: Duplicate key AYM8fCgd6MBeCehZ8uI- (attempted merging values org.sonar.db.qualitygate.QualityGateConditionDto@12fe24d0 and org.sonar.db.qualitygate.QualityGateConditionDto@630f841a)
at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)
2025.03.04 09:07:23 ERROR web[96646276-f8e9-4d94-93e5-9809f005c8b7][o.s.s.w.WebServiceEngine] Fail to process request http://sonarqube.xello.tech/api/qualitygates/list
java.lang.IllegalStateException: Duplicate key AYM8fCgd6MBeCehZ8uI- (attempted merging values org.sonar.db.qualitygate.QualityGateConditionDto@19a3acc5 and org.sonar.db.qualitygate.QualityGateConditionDto@566121ec)
at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)
sonarqube_web.log (1.1 MB)