Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Branch Job Executed in jenkins but Pipeline status is still running state in GitLab #394

Open
prasad-clouduser opened this issue Jan 31, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@prasad-clouduser
Copy link

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

GitLab deployed on VM (RHEL)

Reproduction steps

  1. Created GitLab server connection with detected the Projects in GitLab. (Added webhook config)
  2. Created a multi branch pipeline using this plugin and discovered the branches.
  3. Open a merge request in GitLab project and trigger the Multi Branch Pipeline.
  4. Multi Branch Pipeline detected the Open MR and Ran the Job and completed successfully.
  5. But in GitLab It is showing Pipeline is still in running state because of which can't merge the MR (unless pipeline status shows as success in Gitlab)

Expected Results

Pipeline in GitLab should display the status and allow the merge request to merge successfully.

Actual Results

Pipeline is always in Running State and not displaying the success or failure status.

Anything else?

No response

Are you interested in contributing a fix?

No response

@prasad-clouduser prasad-clouduser added the bug Something isn't working label Jan 31, 2024
@prasad-clouduser
Copy link
Author

PIC
See the screenshot, which is still running state even though pipeline is completed in Jenkins.

@lmife
Copy link
Contributor

lmife commented Feb 1, 2024

We are also encountering this issue from time to time. See my comment at https://issues.jenkins.io/browse/JENKINS-70010?focusedId=443439&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-443439
Could this be the reason for you as well?

@lmife
Copy link
Contributor

lmife commented Feb 1, 2024

In the console log, the [GitLab Pipeline Status] Notified message will be missing. Normally, a build should end like this:

[GitLab Pipeline Status] Notifying branch build status: SUCCESS build/name #17: This commit looks good.
[GitLab Pipeline Status] Notified
Finished: SUCCESS

@prasad-clouduser
Copy link
Author

#395

In the console log, the [GitLab Pipeline Status] Notified message will be missing. Normally, a build should end like this:

[GitLab Pipeline Status] Notifying branch build status: SUCCESS build/name #17: This commit looks good.
[GitLab Pipeline Status] Notified
Finished: SUCCESS

Check this one more issue I opened yesterday, when I opened custom script, it was not returning the status.
#395

@banholzer
Copy link

we experience the exact same thing here.

we also see this in the logs:
image

@Turiok
Copy link
Contributor

Turiok commented Jul 20, 2024

Hi @banholzer ,

I'm not sure if this is the same error.
We had error with jersey library too before.
It was because 2 Jenkins plugins using this library but with different version.
We delete artifactory plugin et it works after.

@egherrmann
Copy link

Not sure if it applies to the situation of the Issue creator, but we encountered this never-ending "Running" issue when multiple Jenkins instances were set up with Organization Folders for the same GitLab namespaces. i.e. in the "Webhooks" section of my GitLab projects, there were two separate webhooks for two different Jenkins URLs. I didn't bother investigating exactly why that situation was problematic because I didn't want or need two Jenkins instances building my projects -- it was inadvertently added. Removing the second webhook and/or removing duplicate Org Folder solved the issue.

We also noticed the stuck "Running" state under some unknown circumstances when a git push was quickly followed by a Merge Request creation using that source branch, while the source branch build was still in-progress. It seemed to have some relation to the selected gitLabBranchDiscovery strategy (https://github.com/jenkinsci/gitlab-branch-source-plugin/tree/master?tab=readme-ov-file#default-traits). Unfortunately, I can't explain that in any more detail because I never looked into it in depth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants