Skip to content

Add the labels to the cache key for merge request api

What does this MR do and why?

Ensure the cache is invalidated when the labels are updated

Validate on master, then validate fix on this branch 372595-outdated-merge-request-data-can-be-used-when-getting-merge-requests-through-rest-api

  • Create an MR (easiest with project with only 1 / 2 MRs)
  • Add some labels
  • Navigate to: localhost:3000/api/v4/projects/PROJECT_ID/merge_requests?state=opened
  • You will see labels contains the correct entries
  • On the MR page, remove some labels
  • Refresh the API response and the labels should either be the new ones (if on this branch, or didn't change if on master)

Related to #372595 (closed)

Edited by Marc Shaw

Merge request reports

Loading