MR always show No changes to code quality message
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Hello here
Summary
Merge request overview tab always show No changes to code quality in code quality widget even if:
- there are errors in the current report which is right uploaded as artifact
- a previous report exists for the destination branch which did not have these errors
- the pipeline page shows all errors in code quality tab
Steps to reproduce
- add
.gitlab-ci.ymldefining a job which generate code quality artifact, for example using golang-ci:
stages:
- lint
lint:
image: golangci/golangci-lint
stage: lint
script:
- '[ -e .golangci.yml ] || cp /golangci/.golangci.yml .'
- golangci-lint run --issues-exit-code 0 --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
- Init a go module:
go mod init mymodule
- add code without error
package main
import (
"fmt"
)
func main() {
fmt.Printf("toto") //nolint
}
-
commit && push on main branchto generate a first good a report
-
change the code to introduce error:
package main
import (
"fmt"
)
func main() {
fmt.Printf("toto")
}
-
commit && push on a new branch to generate a "bad" report
-
open the PR for this new branch
-
wait for job done and notice the message
No changes to code quality
Example Project
Here is an example projet: https://gitlab.com/qmanfroi/golang-test
you can see:
- a first job with good report on
mainbranch: https://gitlab.com/qmanfroi/golang-test/-/pipelines/348802928/codequality_report
- a second job with bad report on
test2branch: https://gitlab.com/qmanfroi/golang-test/-/pipelines/348803209/codequality_report
- and its attached PR where
No changes to code qualityis shown: qmanfroi/golang-test!2
What is the current bug behavior?
The merge request code quality widget show No changes to code quality which is wrong here because the report has been uploaded, contains error compared to the main branch one
What is the expected correct behavior?
The merge request code quality widget should show similar listing errors visible in the pipeline page
Relevant logs and/or screenshots
See previous section
Output of checks
This bug happens on GitLab.com
Possible fixes
No idea but given that the pipeline page properly show all the report errors I suppose the problem comes from the comparison with the old report because the MR code quality widget should only show the difference (and not all errors if already exist in main report).
It can be related to the old issue: #13026 (closed)


