Github webhook failed to deliver to AppVeyor

giggio's Avatar

giggio

20 Feb, 2015 06:56 PM

This PR was not built: https://github.com/code-cracker/code-cracker/pull/283
I checked why that was. Github showed me it failed delivery. I retried twice. It still fails. Here is the response:

HEAD:

Cache-Control: no-cache  
Content-Length: 225  
Content-Type: application/json; charset=utf-8  
Date: Fri, 20 Feb 2015 18:51:19 GMT  
Expires: -1  
Pragma: no-cache  
Server: Microsoft-IIS/8.5  
X-AspNet-Version: 4.0.30319  
X-Powered-By: ASP.NET

Body:

{"message":"Error setting head commit status (repositoryName=code-cracker/code-cracker, headCommitId=791cf00c5e6ac1fc09e88be9c4d207df38a86432, state=failure): Response status code does not indicate success: 404 (Not Found)."}

Head commit exists: https://github.com/code-cracker/code-cracker/commit/791cf00c5e6ac1f...

Any idea what might be wrong?

  1. Support Staff 1 Posted by Feodor Fitsner on 20 Feb, 2015 07:13 PM

    Feodor Fitsner's Avatar

    OK, could you try creating commit status for that commit using Postman or Fiddler to see what's going on: https://developer.github.com/v3/repos/statuses/#create-a-status ?

  2. 2 Posted by giggio on 20 Feb, 2015 08:55 PM

    giggio's Avatar

    It works. I got a 201 response when I posted to https://api.github.com/repos/code-cracker/code-cracker/statuses/791cf00c5e6ac1fc09e88be9c4d207df38a86432.

    Body:

    {
      "url": "https://api.github.com/repos/code-cracker/code-cracker/statuses/791cf00c5e6ac1fc09e88be9c4d207df38a86432",
      "id": 170607927,
      "state": "success",
      "description": "The build succeeded!",
      "target_url": "https://example.com/build/status",
      "context": "continuous-integration/jenkins",
      "required": false,
      "created_at": "2015-02-20T20:53:10Z",
      "updated_at": "2015-02-20T20:53:10Z",
      "creator": {
        "login": "giggio",
        "id": 334958,
        "avatar_url": "https://avatars.githubusercontent.com/u/334958?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/giggio",
        "html_url": "https://github.com/giggio",
        "followers_url": "https://api.github.com/users/giggio/followers",
        "following_url": "https://api.github.com/users/giggio/following{/other_user}",
        "gists_url": "https://api.github.com/users/giggio/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/giggio/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/giggio/subscriptions",
        "organizations_url": "https://api.github.com/users/giggio/orgs",
        "repos_url": "https://api.github.com/users/giggio/repos",
        "events_url": "https://api.github.com/users/giggio/events{/privacy}",
        "received_events_url": "https://api.github.com/users/giggio/received_events",
        "type": "User",
        "site_admin": false
      }
    }
    

    But nothing changed on https://github.com/code-cracker/code-cracker/commit/791cf00c5e6ac1f.... Should we see the status reported there?

  3. Support Staff 3 Posted by Feodor Fitsner on 20 Feb, 2015 09:03 PM

    Feodor Fitsner's Avatar

    The status is shown here: https://github.com/code-cracker/code-cracker/pull/283

    If AppVeyor got 404 while doing the same that could mean it didn't have enough permissions to do that. GitHub always gives 404 instead of 403.

  4. Support Staff 4 Posted by Feodor Fitsner on 20 Feb, 2015 09:06 PM

    Feodor Fitsner's Avatar

    Would you like doing the same with OAuth token for your account that AppVeyor currently has? I can email token to you or run request for you.

  5. 5 Posted by giggio on 20 Feb, 2015 09:07 PM

    giggio's Avatar

    Sure, just send it over.

  6. 6 Posted by giggio on 20 Feb, 2015 09:09 PM

    giggio's Avatar

    I can work with you to try to find the problem. We can chat on skype, jabbr, whatever.

  7. Support Staff 7 Posted by Feodor Fitsner on 20 Feb, 2015 09:49 PM

    Feodor Fitsner's Avatar

    OK, with OAuth token on your AppVeyor account I got 404 - see attached. URL seems to be correct, request as well. So, this could be like permissions problem.

    Try re-authorizing GitHub in AppVeyor to see if that helps.

  8. 8 Posted by giggio on 20 Feb, 2015 10:36 PM

    giggio's Avatar

    I revoked access to Github and granted it again. Still, same problem.

  9. Support Staff 9 Posted by Feodor Fitsner on 20 Feb, 2015 10:54 PM

    Feodor Fitsner's Avatar

    OK, try issuing "Personal Access Token" with the same scope (read:org,admin:repo_hook,repo:status) and post status with it.

  10. Support Staff 10 Posted by Feodor Fitsner on 20 Feb, 2015 11:14 PM

    Feodor Fitsner's Avatar

    That's interesting to note that the commit itself exists in base repo: https://api.github.com/repos/code-cracker/code-cracker/commits/791c... however related PR is non-mergeable. So, technically that commit still belongs to jwooley's repository: https://github.com/jwooley/code-cracker/commit/791cf00c5e6ac1fc09e8...

    What GitHub username do you use to authorize AppVeyor?

  11. Support Staff 11 Posted by Feodor Fitsner on 20 Feb, 2015 11:15 PM

    Feodor Fitsner's Avatar

    Btw, if you will be able to add commit status with generated Personal Access Token I can put it into your account to try from AV.

  12. 12 Posted by giggio on 20 Feb, 2015 11:29 PM

    giggio's Avatar

    The user is https://github.com/codecrackerbuild
    It did not have write access to https://github.com/code-cracker/code-cracker/. So I fixed that. It does now. I redelivered the notification, and it worked. It failed as non-mergeable, but that is ok.

    Is this notification new? I had never seen it before.

  13. Support Staff 13 Posted by Feodor Fitsner on 20 Feb, 2015 11:32 PM

    Feodor Fitsner's Avatar

    It's been there for a while, you know.

  14. 14 Posted by giggio on 20 Feb, 2015 11:41 PM

    giggio's Avatar

    Strange. Several PR builds worked before, and I had never seen the notification. I am guessing it failed because it was not mergeable.
    I searched the deliveries log, and found other PRs failing as well. Probably it is only failing the delivery when it is not mergeable, and other deliveries (build failure, success, etc) are failing silently. Maybe you could warn that this is hapenning so we can fix it. I actually ended up making my own notification system because I did not know this one existed.

  15. Support Staff 15 Posted by Feodor Fitsner on 20 Feb, 2015 11:46 PM

    Feodor Fitsner's Avatar

    Yes, AppVeyor puts that message for non-mergeable PRs only.

  16. giggio closed this discussion on 24 Feb, 2015 12:45 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac