Migrate pipeline code quality report to GraphQL
Release notes
It is possible for you to run linters and scanners in addition to the one included with the GitLab Code Quality Template. If you generate that data in another job though only the last CodeQuality report will be used by GitLab's Code Quality features so you are missing out on issues detected by all the scans.
Now the Full Code Quality report supports reading multiple reports and displaying data from all of them. This means you can get a better view of quality issues in your code and fix them earlier in the development process.
Summary
In order to move forward quickly with future iterations of the pipeline code quality report tab, it is important that we lay a proper foundation by moving this report to GraphQL.
Improvements
- Allow for quicker iterations between frontend and backend
- Take advantage of the caching we already have on that page from other components using GraphQL
Risks
We could break the page temporarily. However, we can mitigate this possibility by using a feature flag to enable/disable this migration.
Involved components
-
ee/app/assets/javascripts/pages/projects/pipelines/show/codequality_report.js
-
everything in the ee/app/assets/javascripts/codequality_report
folder -
Implement feature using new GraphQL API
-
Remove custom logic for sorting degradations -
Add a note to the code quality report documentation about supporting multiple reports as of this release version.
✍
Implementation Plan Step | MR(s)/Issue(s) | Status |
---|---|---|
backend Introduce a new CodeQualityReportType in GraphQL (EE) |
!61383 (merged) | workflowproduction |
backend Filter degradations by severity | !62710 (merged) | workflowproduction |
frontend MVC to get the GraphQL data into the same spot where the REST data was | !69917 (merged) | workflowproduction |
frontend Improve the GraphQL UX to match what we had in the REST version, set up fixtures to use in the frontend specs instead of mock data | !72036 (merged) | workflowin review |
Perform the feature flag rollout | #340525 (closed) | |
frontend Remove the feature flag, clean up dead code | ||
documentation Add a note about support for multiple reports (could be combined with feature flag removal) | ||
backend Remove existing REST API
|
blocked (waiting to implement frontend first) |