GitLab Checking pipeline status - running forever
Asked Answered
C

15

60

I've enabled the option - Settings/General/Merge Requests/Merge Checks - Pipelines must succeed.

Since then every merge requests automatically starts execution of the pipeline which is actually what i want. The problem is that this is running forever , i'm receiving message : Checking pipeline status If i run the pipeline manually from CI/CD Pipelines - Run pipeline finish immediately. I don't understand what is wrong and why it stuck , can i check logs somewhere or something ?

For testing , the pipeline is really simple , just exit 1 .. but still not working ..

At this stage , "running pipeline" is not listed in pipeline list even if the status in merge request is

Checking pipeline status

Coralyn answered 12/10, 2020 at 7:21 Comment(4)
I have the same issue: it's really frustrating.. I feel youLongish
@Harry Biriminski. Did you find out anything? I have a similar issue (with no pipelines configured at all). If you google for it, you'll find some related issues from others. I think this one contains most of the topics: gitlab.com/gitlab-org/gitlab/-/issues/229738Cartilaginous
I am experiencing that issue, but while I am looking for help and ended up in that subject here, I concluded Gitlab is just slow, it seems to have a huge delay (several minutes) between the message "Checking pipeline status" and it have created a new pipeline.Incandesce
disabling the option fixed it for me Settings/General/Merge Requests/Merge Checks - Pipelines must succeedAtlanta
C
16

We ran into a case where a merge request does not contain the .gitlab-ci.yml file. The fix is simply to do a rebase

For troubleshooting purposes, pipelines can be run manually on particular branches at CI/CD -> Pipelines -> Run Pipeline

Cateyed answered 30/4, 2021 at 4:58 Comment(1)
In my case, the .gitlab-ci.yml file was empty on the master branch. Getting a non-empty one into master seemed to fix it. Thank you for the hint!Boak
R
12

For me what happened that .gitlab-ci.yml file was having issue as I have mentioned "master" as value for "only" label .. , then everything worked after updating it with my correct branch name which IMO should be "main"

Roughspoken answered 8/10, 2021 at 6:20 Comment(1)
For me it was the same, the specific directory I was updating was not mentioned in the "only" configuration in gitlab-ci.ymlWalk
K
12

This happens to me with pipelines that has no job that triggers on merge-requests.

If I have no tests or anything I wish to run during a merge requests I create a "dummy" job that doesn't do anything.

Rule to trigger on merge requests:

rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'

Then add a simple echo in the script section:

script: echo "Dummy job for merge-request"
Krone answered 12/8, 2022 at 11:18 Comment(1)
Will be solved in gitlab.com/gitlab-org/gitlab/-/issues/334281. For now you can also disable Settings -> Merge requests -> Pipelines must succeed option.Audley
P
9

Encountered this myself just now, using Gitlab shared runners. Tried re-running one individual job from the pipeline in the hope that it would resolve the issue. It did not. The best way is to change the commit id of the latest change in the MR. You can either create an empty commit as suggested by @Bhargav11 or, to keep a cleaner commit history, do

$ git commit --amend --no-edit
$ git push --force

on your branch.

Phi answered 8/11, 2021 at 12:4 Comment(0)
O
5

check if current branch you are checking the pipeline status and branch specified in "only: field" are same

  only:
    - master

enter image description here

Opalopalesce answered 18/4, 2022 at 9:6 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Novelist
L
3

Just add an empty commit to trigger it again.

git commit -n -m "commit comment"
Limulus answered 28/10, 2021 at 10:5 Comment(0)
J
3

From GitLab documentation: "Checking pipeline status" message

This message is shown when the merge request has no pipeline associated with the latest commit yet. This might be because:

  • GitLab hasn't finished creating the pipeline yet

  • You are using an external CI service and GitLab hasn't heard back from the service yet.

  • You are not using CI/CD pipelines in your project.

  • You are using CI/CD pipelines in your project, but your configuration prevented a pipeline from running on the source branch for your merge request.

  • The latest pipeline was deleted (this is a known issue).

Josuejosy answered 12/4, 2022 at 11:33 Comment(0)
C
2

In our case, simply creating a copy of the branch (git checkout -b new-branch-name) and making a new MR with the identical code allowed us to work around the issue. The new MR pipeline executed successfully.

Clam answered 26/11, 2021 at 10:31 Comment(1)
thank you! This was the only thing which fixed my situation. Must have been some weird state gitlab got itself into. I just had to copy my dev branch to dev-2 and then delete dev, and create it again from dev-2. Then it magically started working again.. EDIT: nevermind.. this did in fact not work, just that creating a new branch triggers the pipelineRhapsodize
C
1

I found what was wrong in my case. The problem was with the runners. There was "Shared runners" enabled by default which caused the confusion. I've just disabled them and enable my own runner and everything started to work as expected. You can check this in CI / CD Settings, I think they are enabled by default. Basically , pipelines are nothing more than a trigger for the runner... then the runner is responsible for the execution.

Coralyn answered 16/3, 2021 at 9:10 Comment(0)
I
1

Closing and reopening the MR fixed it for me.

Immune answered 15/2 at 11:53 Comment(0)
M
0

In my case, I had made a typo on the filename and had forgotten to add a dot before it.

Please ensure the filename is .gitlab-ci.yml

How did I debug this?

On the GitLab UI, I went into CI/CD editor and couldn't see my file.

Millihenry answered 25/9, 2022 at 9:1 Comment(0)
R
0

I had made sure it was allowing the correct branch, however I had it detecting only changes for a subset of files, not including the gitlab-ci.yml file..

  only:
    changes:
      - files/**/*

which meant it didn't trigger when changing it. Removing those lines solved the issue for me.

Rhapsodize answered 9/3, 2023 at 12:36 Comment(0)
I
0

Rebasing my branch to the original resolved this issue for me.

git rebase -i pull push

Inoperative answered 31/3, 2023 at 18:36 Comment(0)
O
0

I would suggest to delete/close the existing MR you may have & open a new one with same code. You should see the pipeline running smoothly

Obeah answered 7/5 at 11:56 Comment(1)
This can be comment than answerAmazement
H
0

Troubleshooting GitLab Pipeline Stuck on "Checking Pipeline Status" If you encounter an issue where your GitLab pipeline is stuck on "Checking pipeline status," follow these steps to manually run the pipeline and resolve the issue:

Steps to Manually Run a Pipeline Navigate to Pipelines:

Open your GitLab project in your web browser. On the left sidebar, click on Pipelines. Run Pipeline:

Click the "Run Pipeline" button on the Pipelines page. In the dialog that appears, select the branch for which you want to run the pipeline. Handling Variables:

If there is a "Variables" dropdown menu with options "Variables" or "File": If you do not need to set any variables, leave this section as it is. Ensure your branch is selected. Start the Pipeline:

Click the "Run Pipeline" button to start the pipeline. Additional Tips Check for the .gitlab-ci.yml File: Ensure that the .gitlab-ci.yml file is present in the root directory of your project. This file is essential for the pipeline to run. Monitor Pipeline Progress: After starting the pipeline, you can monitor its progress and view logs by clicking on the individual jobs within the pipeline. By following these steps, you should be able to manually trigger and run your GitLab pipeline, resolving the issue of it being stuck on "Checking pipeline status."

Hargeisa answered 17/5 at 8:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.