Prevent false positives in Ci::Pipeline#all_merge_requests
What does this MR do?
Add a scope for checking MergeRequstDiffCommit shas to ensure that the pipeline ran for some historical state of the merge request. We have encountered situations where only matching on project and ref produces a false positive: #201947 (closed)
That specific bug was fixed with a workaround, but the underlying problem with the #all_merge_requests implementation was not fixed.
This MR is a preceding fix for another MR, where this change was requested in maintainer review: !27968 (comment 317093871)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry Documentation (if required)-
Code review guidelines -
Merge request performance guidelines -
Style guides Database guidesSeparation 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 browsersInformed 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 methodsSecurity reports checked/validated by a reviewer from the AppSec team
Edited by drew stachon