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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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