Skip to content

Fix variable mismatch in code quality widget

What does this MR do?

Fix a bug (https://gitlab.com/gitlab-org/gitlab-ee/issues/13026) generated by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14323

https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14323 moved the code quality comparison calculation into a worker thread, and passed data to the worker thread to for it to be processed and then passed back, but the parameters being passed got out of sync: the worker was expecting data.parsedHeadIssues and data.parsedBaseIssues but was passed data.headIssues and data.baseIssues instead.

This MR

  • fixes the worker to use data.headIssues and data.baseIssues
  • makes the worker send back an empty object if its input data does not include headIssues and baseIssues
  • makes the store that calls the worker report an error loading/parsing the code quality results if the worker does not pass back data.newIssues and data.resolvedIssues

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Edited by Miranda Fluharty

Merge request reports