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

Builder status stuck on first commit it has built. #263

Open
mihneadb opened this issue May 8, 2015 · 15 comments
Open

Builder status stuck on first commit it has built. #263

mihneadb opened this issue May 8, 2015 · 15 comments

Comments

@mihneadb
Copy link

mihneadb commented May 8, 2015

Steps to reproduce:

  • open PR
  • trigger build using passphrase
    • build is executed & status is updated for commit1
  • make & push new commit (commit2)
  • trigger build using passphrase
    • build is executed on commit2, but status is updated for commit1
@mihneadb
Copy link
Author

mihneadb commented May 8, 2015

This happens with ghprb:1.20 and github-api:1.67. Things work fine with ghprb:1.17 and github-api:1.66

@mihneadb
Copy link
Author

Wrong - things work fine after restarting jenkins but after you push a commit and trigger another test it happens again. @janinko, have you seen this before? Thanks!

@mihneadb
Copy link
Author

I've investigated a bit, it seems that the PR's head is not updated.

@DavidTanner
Copy link
Collaborator

Other than checking if the project is disabled, there haven't been any changes to GhprbPullRequest where the update logic exists. I also can't recreate it locally.

Are you using webhooks?

@DavidTanner
Copy link
Collaborator

Here is my testing repo DavidTanner/Testing#14

@mihneadb
Copy link
Author

mihneadb commented Jun 2, 2015

@DavidTanner Yes, I am using webhooks + build phrase (not auto builds like in your test). Could you try to reproduce it that way? By reading through the code it seems that the object is instantiated once with the latest HEAD and it never gets updated (at least via webhook build phrase) -- or maybe I misread, but that's the behavior.

@DavidTanner
Copy link
Collaborator

Maybe the changes I have been making have fixed things, but it works with webhooks as well.

@mihneadb
Copy link
Author

mihneadb commented Jun 2, 2015

Are you planning a new release? Would love to try it out :).

@DavidTanner
Copy link
Collaborator

1.22.2 is out there, and that is what I was just testing with.

@mihneadb
Copy link
Author

mihneadb commented Jun 3, 2015

I've just tested with 1.22.2 and I encounter the same behavior. :( Triggering the build phrase after the 2nd commit merges the correct sha (latest version of the code), but updates the status of the first commit.

If you have any suggestions of what to try, pls let me know.

@DavidTanner
Copy link
Collaborator

The next step is to setup a logger, then if that doesn't give us the data we need then i can send you a rogue build with more logging.
Go to Manage > System Log and add a logger for

org.jenkinsci.plugins.ghprb

That will log everything from the plugin.
After the commit you should see:

Pull request #X was updated ...
New Commit. Sha: ...

That should happen before the comment gets sent.

@mihneadb
Copy link
Author

mihneadb commented Jun 5, 2015

Here are the logs. As you can see, the "pull req was updated" part does not show up. :(

https://gist.github.com/mihneadb/2d6ce82981f22168ff54

@DavidTanner
Copy link
Collaborator

Can you please retest with 1.24.8?

@mihneadb
Copy link
Author

It's a bit difficult now since we've changed our setup, but I'll get back with the results whenever I get to it.

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

2 participants