appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 66 forks source link

Incorrect branches for GitHub webhooks #1801

Closed 3F closed 7 years ago

3F commented 7 years ago
git push master exp_map dev_v2

https://ci.appveyor.com/project/3Fs/mvssln/build/build-19 - master 4f806c75 https://ci.appveyor.com/project/3Fs/mvssln/build/build-20 - master 4f806c75 https://ci.appveyor.com/project/3Fs/mvssln/build/build-21 - master 4f806c75

that is, for all this has been placed the following command:

git clone -q --branch=master ...

here https://ci.appveyor.com/project/3Fs/dllexport/history was ok at least for:

git push exp_38_gnt master

some new changes or a bug ? o_O

IlyaFinkelshteyn commented 7 years ago

Those 3 builds seems to be started manually, not with as a result of webhooks. To benefit from GitHub integration, AppVeyor project should be created as a GitHub, but this project is created as a generic git one.

3F commented 7 years ago

http://help.appveyor.com/discussions/questions/1983-how-to-change-bitbucket-repository-on-similar-repo-from-github

why you don't want to support this for your git repository type ?

X-GitHub-Delivery: 91a3f086-9d4a-11e7-8f0a-b6c3fa4a77df
"ref": "refs/heads/dev_v2",
...
X-GitHub-Delivery: 917a5cc6-9d4a-11e7-8375-ac9f1da32ee1
"ref": "refs/heads/master",
...
X-GitHub-Delivery: 90d7036e-9d4a-11e7-833a-6af38efb2830
"ref": "refs/heads/exp_map",
...

and wait again, what about DllExport project o_O it's fully same type as for project above. I mean, it worked before current or prev. month, see other projects.

3F commented 7 years ago

btw, now it also does not work for single branch:

git push <any_other_branch>
git push dev

still starts from master >( please return it back as before !

:angry:

IlyaFinkelshteyn commented 7 years ago

I am not aware of any changes. Please send us link to specific build to check.

3F commented 7 years ago

https://ci.appveyor.com/project/3Fs/mvssln/build/build-22

pushed as git push dev_v2

why it still git clone -q --branch=master ... ?!

check it:

2017-09-27 17:33:39
User-Agent: GitHub-Hookshot/f767822
X-GitHub-Delivery: da98d83c-a390-11e7-9138-51145d4cd666
...
"ref": "refs/heads/dev_v2",

?

for 2+ years I don't remember similar problems, I have a lot of other projects that was linked to AppVeyor: see https://ci.appveyor.com/project/3Fs

IlyaFinkelshteyn commented 7 years ago

Commit was done 2 days ago, while build started 7 hours ago. And I do not see webhook coming in our logs before that build. Which means that build was not triggered by webhook.

Update: to clarify: you can redeliver specific webhook to check that behavior.

3F commented 7 years ago

because it was in my local repo and pushed only after (that is, separately, if you can't support git push master dev_v2 today)

see hook:

User-Agent: GitHub-Hookshot/f767822
X-GitHub-Delivery: e561208a-a390-11e7-9efa-d2d6f9de4358
IlyaFinkelshteyn commented 7 years ago

When in GitHub's recent deliveries it was sent (exact time with time zone)? What you see if you redeliver it?

3F commented 7 years ago

What you see if you redeliver it?

please clarify, what do you need ?

  1. dev_v2 in 2017-09-27 17:33:39 - first push
  2. master in 2017-09-27 17:33:57 - second

recent_deliveries

IlyaFinkelshteyn commented 7 years ago

The one you do not see expected results, probably dev_v2

IlyaFinkelshteyn commented 7 years ago

Also I do not see a time zone so I cannot check my logs for previous deliveries

3F commented 7 years ago

I clicked "Redeliver" and yes it still master, so... what's going on o_O

IlyaFinkelshteyn commented 7 years ago

please send specific time with time zone and GitHub delivery id

IlyaFinkelshteyn commented 7 years ago

Disregard, I see it. 5 sec

IlyaFinkelshteyn commented 7 years ago

Sorry I still need GitHub delivery id for webhooks you resent

3F commented 7 years ago

please send specific time with time zone

where I should to look this ?

X-GitHub-Delivery: e561208a-a390-11e7-9efa-d2d6f9de4358

    "created_at": 1497814220,
    "updated_at": "2017-07-09T21:22:28Z",
    "pushed_at": 1506522837,

  Response: 
     Date: Wed, 27 Sep 2017 22:32:49 GMT
X-GitHub-Delivery: da98d83c-a390-11e7-9138-51145d4cd666

    "created_at": 1497814220,
    "updated_at": "2017-07-09T21:22:28Z",
    "pushed_at": 1506522819,

   Response:    
     Date: Wed, 27 Sep 2017 22:31:42 GMT
3F commented 7 years ago

Sorry I still need GitHub delivery id for webhooks you resent

missed reply

you about webhook id from appveyor ?

Request URL: https://ci.appveyor.com/api/git/webhook?id=d5bb7dfdtma1fv01

or I don't understand, thye GitHub delivery id isn't this id: e561208a-a390-11e7-9efa-d2d6f9de4358 and da98d83c-a390-11e7-9138-51145d4cd666 ?

IlyaFinkelshteyn commented 7 years ago

It is not very safe to expose your webhook id, sorry for not asking clearly. We reset your webhook id, you can find in in project settings.

As for main problem, reason is that your webhook is ignored, because content type should be set to application/json for generic Git webhook. It is probably set to application/x-www-form-urlencoded

3F commented 7 years ago

just noticed :)

yes, content type for this old projects - application/json:

and yes application/x-www-form-urlencoded for this problem.

I updated webhook id and changed type to json, now it seems has a correct branch:

https://ci.appveyor.com/project/3Fs/mvssln/build/build-26

so probably it should work also for several branch as git push b1 b2 b3 I'll check it later.

thanks for the information