gitlab-org/gitlab "Run Pipeline" button takes a very long time to run

Summary

Clicking the "Run pipeline" button before doing a merge is starting to take a fairly long time. I think it would be fine for it to start in an async process if it was going to take a while to spin up, but navigating away from the page seems to cancel the pipeline creation in a lot of cases.

Screen grab:

Screen_Recording_2024-06-04_at_19.03.54

Steps to reproduce

  1. Open any MR from https://gitlab.com/gitlab-org/gitlab/-/merge_requests
  2. Click "Pipelines"
  3. Click "Run pipeline"

Example Project

What is the current bug behavior?

Pipeline takes a very long time to register.

What is the expected correct behavior?

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes