Skip to content

Add collapsed comparer for license_scanning

Tetiana Chupryna requested to merge 350333-api-endpoint-ls-collapsed into master

What does this MR do and why?

We have an enpoint for License Compliance widget on MR page. Payload over the wire can get pretty big potentially. As a performance Improvement, the MR Widget extension requires an additional endpoint to only represent the data used in the collapsed state of the MR Widget. To reduce the network payload when the user is not uncollapsing the License Compliance MR Widget, making the MR page faster.

url: [https://gitlab.com/gitlab-org/gitlab/-/merge_requests/$MR_ID/license_scanning_reports_collapsed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/%24MR_ID/license_scanning_reports_collapsed)

Response Structure:

{
  "new_licenses": $integer_value_of_new_licenses_found,
  "existing_licenses": $integer_value_of_existing_licenses_found,
  "removed_licenses": $integer_value_of_removed_licenses_found,
}

Screenshots or screen recordings

How to set up and validate locally

  1. Get a project where license_scanning is enabled.
  2. Create an MR, run pipeline
  3. Send JSON request {histname}/{group/project}/-/merge_requests/{MR_ID}/license_scanning_reports_collapsed

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #350333 (closed)

Edited by Tetiana Chupryna

Merge request reports

Loading