Skip to content

Skip mergeability check by default when listing MRs in the API

What does this MR do?

This MR alters the semantics of the mergeability check so the list API does not enqueue rechecks by default. The previous behaviour can be restored by use of a REST projection (with_merge_status_recheck).

Since the structure of the response remains the same, and even the content of the returned response, this is not, strictly speaking, a backwards-incompatible change. However, users who rely on this attribute in the list API will find they get stale data; rather than switching to the single MR endpoint, the projection gives them a way to specify that they need the previous behaviour.

Longer-term, we could look at refreshing merge status independently of any frontend actions. Since we can deduplicate sidekiq jobs now, the best way to do that is probably to just enqueue a mergeability check for every affected MR on push, and place strict limits on that sidekiq queue's concurrency characteristics.

Affected MRs are those for which the source branch or target branch has changed, so updating master can invalidate huge numbers of merge_status columns.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #217455

Edited by Nick Thomas

Merge request reports

Loading