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

Merge Request CI status not updating #56

Closed
ndcampbell opened this issue Feb 11, 2015 · 33 comments
Closed

Merge Request CI status not updating #56

ndcampbell opened this issue Feb 11, 2015 · 33 comments

Comments

@ndcampbell
Copy link

On a Gitlab merge request the CI status stays at "CI build pending for 6f3ca78b. Build page". The Build page link does not go to the build status (just goes to a blank Jenkins page) and even when the build is successful this pending message is never changed.

@bassrock
Copy link
Contributor

Can you post any logs from Jenkins?

@ndcampbell
Copy link
Author

Here are some of the logs I have from the jenkins.log. This is when one of my builds kicked off from a Merge Request and failed. The CI Status in Gitlab never gets updated at all. Let me know if there is anything else I can provide.

Feb 11, 2015 9:58:50 AM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WARNING: WebHook called.
Feb 11, 2015 9:58:54 AM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WARNING: WebHook called.
Feb 11, 2015 9:58:56 AM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WARNING: WebHook called.
Feb 11, 2015 9:59:21 AM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WARNING: WebHook called.
Feb 11, 2015 9:59:39 AM hudson.model.Run execute
INFO: Venus Git Build #26 main build action completed: FAILURE
Feb 11, 2015 9:59:40 AM org.terracotta.jenkins.plugins.postcompleted.PostCompletedRunListener onCompleted

@ejhayes
Copy link

ejhayes commented Feb 17, 2015

I'm running into the same issue as well:

https://****/project/XXXX/commits/047c93e28773ad2122ff16bd0fae9574ae78995b

Returns nothing

https://****/project/XXXX/builds/047c93e28773ad2122ff16bd0fae9574ae78995b/status.json

Returns:

{ sha: "047c93e28773ad2122ff16bd0fae9574ae78995b", status: "pending" }

Logs from jenkins:

Feb 17, 2015 3:01:24 PM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic WARNING: WebHook called.

@bassrock
Copy link
Contributor

@ejhayes and @mildewonrice what version of Gitlab?

@ejhayes
Copy link

ejhayes commented Feb 19, 2015

I'm using GitLab 7.6.2

@ndcampbell
Copy link
Author

I am running 7.7.2-ee

@Kurry
Copy link

Kurry commented Feb 25, 2015

This seems like more of a plugin issue rather than a gitlab issue:

  1. The HTTP redirect from the SHA1 to build page never occurs

  2. After the fails or completes the status.json file does not update.

@bhaku
Copy link

bhaku commented Mar 16, 2015

This same problem. GitLab 7.5.3, Jenkins 1.580.2 using Gitlab-plugin 1.1.15

@twk3
Copy link

twk3 commented Mar 20, 2015

I have the same problem on Gitlab 7.8.4, Jenkins 1.580.3 using Gitlab-plugin 1.1.15
Git Plugin: 2.3.5 Git client plugin: 1.16.1

status.json returns pending for completed builds, and build page is blank

@bhaku
Copy link

bhaku commented Apr 3, 2015

Upgrade to version 1.1.17 resolve issue for me.

@twk3
Copy link

twk3 commented Apr 3, 2015

Still a problem for me on 1.1.17

@ndcampbell
Copy link
Author

1.1.17 fixed this problem for me on Gitlab 7.8.1-ee.

@bassrock
Copy link
Contributor

@twk3 and @ndcampbell is this for a merge request between forks or between branches of the same repos? Its possible that one works while the other does not.

@bassrock
Copy link
Contributor

And could be related to #61

@twk3
Copy link

twk3 commented Apr 14, 2015

For between branches of the same repo for me. But the repo itself is a fork.

@bassrock
Copy link
Contributor

@twk3 can you post the logs while it is requesting the status. There was more logging added in the lastest release.

@twk3
Copy link

twk3 commented Apr 14, 2015

Log level is set at INFO, all I get for a build status call is

Apr 14, 2015 11:10:18 AM WARNING com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WebHook called.

For pushing to to a merge request branch I get:

Apr 14, 2015 11:13:42 AM WARNING com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WebHook called.
Apr 14, 2015 11:13:42 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 run
p4gitlab-test-1 triggered for push.
Apr 14, 2015 11:13:42 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 createActions
GitLab Push Request from branch test-jenkins.
Apr 14, 2015 11:13:42 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 createActions
Trying to get name and URL for job: p4gitlab-test-1 using project p4gitlab-test-1 (push)
Apr 14, 2015 11:13:42 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 run
GitLab Push Request detected in p4gitlab-test-1. Triggering  #16

@twk3
Copy link

twk3 commented Apr 14, 2015

Updated to latest plugin, and changed log level to fine. The get Status log didn't change. Doing a push to a merge results in:

Apr 14, 2015 11:25:29 AM WARNING com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WebHook called.
Apr 14, 2015 11:25:29 AM FINE com.dabsquared.gitlabjenkins.GitLabWebHook generateBuild
data: {
    "object_kind": "push",
    "before": "17c8d6cd54ee7a510aca8f101bf0f8beaeb39ba9",
    "after": "2a3c05cad9e3e1db66bc6dc8b4c3c6e5c893e847",
    "ref": "refs/heads/test-jenkins",
    "checkout_sha": "2a3c05cad9e3e1db66bc6dc8b4c3c6e5c893e847",
    "user_id": 19,
    "user_name": "[username]",
    "user_email": "[email]",
    "project_id": 91,
    "repository":     {
        "name": "gitlab-shell",
        "url": "git@gitlab.example.com:username/gitlab-shell.git",
        "description": "SSH access and repository management app for GitLab\r\n",
        "homepage": "http://gitlab.example.com/username/gitlab-shell",
        "git_http_url": "http://gitlab.example.com/username/gitlab-shell.git",
        "git_ssh_url": "git@gitlab.example.com:username/gitlab-shell.git",
        "visibility_level": 20
    },
    "commits": [    {
        "id": "2a3c05cad9e3e1db66bc6dc8b4c3c6e5c893e847",
        "message": "test\n",
        "timestamp": "2015-04-14T11:25:25-07:00",
        "url": "http://gitlab.example.com/username/gitlab-shell/commit/2a3c05cad9e3e1db66bc6dc8b4c3c6e5c893e847",
        "author":         {
            "name": "[name]",
            "email": "[email]"
        }
    }],
    "total_commits_count": 1
}
Apr 14, 2015 11:25:29 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 run
p4gitlab-test-1 triggered for push.
Apr 14, 2015 11:25:29 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 createActions
GitLab Push Request from branch test-jenkins.
Apr 14, 2015 11:25:29 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 createActions
Trying to get name and URL for job: p4gitlab-test-1 using project p4gitlab-test-1 (push)
Apr 14, 2015 11:25:29 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$1 run
GitLab Push Request detected in p4gitlab-test-1. Triggering  #17

(username and url changed)

@bassrock
Copy link
Contributor

If you go to the url:

/project/PROJECT_NAME/builds/COMMIT_SHA1/status.json

with your project name in jenkins and "2a3c05cad9e3e1db66bc6dc8b4c3c6e5c893e847" from your log above what do you get

@bassrock
Copy link
Contributor

On the jenkins box^

@twk3
Copy link

twk3 commented Apr 14, 2015

The log says

Apr 14, 2015 11:37:03 AM WARNING com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WebHook called.

and the response is:

{"sha":"2a3c05cad9e3e1db66bc6dc8b4c3c6e5c893e847","status":"pending"}

@bassrock
Copy link
Contributor

Ok and i would assume the merge request page shows a pending status?

@twk3
Copy link

twk3 commented Apr 14, 2015

Yep, but build is finished, and successful

@bassrock
Copy link
Contributor

Ok So this function in GitlabWebHook:

https://github.com/DABSquared/gitlab-plugin/blob/master/src/main/java/com/dabsquared/gitlabjenkins/GitLabWebHook.java#L456

is not returning a build from the commit sha1.

@b4oshany
Copy link

I'm having the same issue as well.

@ndcampbell
Copy link
Author

This issue is happening again for me on Gitlab 7.10 for branch merges. I am using the latest version of the plugin. CI status is stuck at pending. It was working for me just fine in Gitlab 7.8

@djb61
Copy link

djb61 commented Apr 25, 2015

@ndcampbell This is broken when using Gitlab 7.10 as Gitlab has changed the CI integration API. See #74 for details.

@bassrock
Copy link
Contributor

bassrock commented May 4, 2015

@ndcampbell this should be fixed in the latest release. Can you confirm?

@ndcampbell
Copy link
Author

@bassrock yeah, I can confirm. Looks to be working great in 7.10 with the latest release.

@bassrock
Copy link
Contributor

bassrock commented May 4, 2015

good to hear

@twk3
Copy link

twk3 commented May 4, 2015

I still have this issue on the latest plugin and gitlab 7.10.

The older 1.1.3 plugin is still working

I will try and debug at some point, and find why GitlabWebHook doesn't return a build in my case.

@marciobueno1
Copy link

Only the older version (1.1.3) of this plugin is working with the GitLab 7.2.1.

To build from all branches (including new ones), I am using the polling method triggered by a Web Hook in GitLab, using a URL like this: http://JENKINS_URL/git/notifyCommit?url=URL_GIT_REPOSITORY

With new new plugin version, the status page on Merge Request in GitLab is showing "pending", when I downgraded to 1.1.3, it started to show "passed". Just to reinforce, no other configuration was changed, only did the downgrade of the plugin.

@mariane-sm
Copy link

I have the same problem for gitlab 7.9.2, jenkins 1.596 and plugin 1.1.25

exceed-alae pushed a commit to exceed-alae/gitlab-plugin that referenced this issue May 20, 2022
…ents

Prepend newline for job comments if the message already contains comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants