Skip to content

WIP: Do Not Create Merge Request Pipeline on Push With Invalid Yaml File

Jason Goodman requested to merge invalid-yaml-pipelines into master

What does this MR do?

This MR fixes issue #30111 (closed)

  • Do not persist a merge request pipeline when a git push is made to a merge request if the ci yaml file is invalid. This is a change in behavior and addresses the bug in the issue.
  • Preserve the current behavior, and continue to make a merge request pipeline for a request to the API to create a merge request pipeline. (For POST requests to /projects/:id/merge_requests/:merge_request_iid/pipelines) In this scenario, the merge request pipeline is the only pipeline we are requesting created, so we probably want it to persist and show us that the yaml file is invalid. One place we use this endpoint is the Run Pipeline button in the Pipelines tab on a merge request that is using merge request pipelines.

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
Edited by Jason Goodman

Merge request reports