build icon indicating copy to clipboard operation
build copied to clipboard

webhook "build-site.sh already running"

Open richardlau opened this issue 3 years ago • 6 comments

Reported as happened with 16.9.0 and now has happened with 16.9.1 -- publishing the release blog post to https://github.com/nodejs/nodejs.org is triggering the webhook but the logs show it is discarded as the website is currently being built

https://nodejs.org/github-webhook.log

event="push", match="ref == "refs/heads/master" && repository.full_name == "nodejs/nodejs.org"", exec="/home/nodejs/build-site.sh nodejs"
Wed Sep 08 2021 08:02:24 GMT+0000 (Coordinated Universal Time)
Took 295248 ms
stdout: build-site.sh already running
event="push", match="ref == "refs/heads/master" && repository.full_name == "nodejs/nodejs.org"", exec="/home/nodejs/build-site.sh nodejs"
Fri Sep 10 2021 19:54:04 GMT+0000 (Coordinated Universal Time)
Took 147 ms
stdout: build-site.sh already running
event="push", match="ref == "refs/heads/master" && repository.full_name == "nodejs/nodejs.org"", exec="/home/nodejs/build-site.sh nodejs"
Fri Sep 10 2021 19:54:04 GMT+0000 (Coordinated Universal Time)
Took 23 ms

richardlau avatar Sep 10 '21 20:09 richardlau

https://github.com/nodejs/nodejs.org/pull/4105 was my original publish (not picked up as OP). I've just pushed https://github.com/nodejs/nodejs.org/pull/4106 and it appears to be working 🤷.

richardlau avatar Sep 10 '21 20:09 richardlau

Possibly a race with check-build-site.sh triggering a website rebuild and the webhook coming in while it's still in progress?

richardlau avatar Sep 10 '21 20:09 richardlau

Probably unrelated but it seems that the live site hasn't been updated with the latest patch from the repo. Could the https://nodejs.org/github-webhook.log be rotated more frequently? Now it's huge making it hard to view/search it.

XhmikosR avatar Dec 28 '21 19:12 XhmikosR

https://nodejs.org/github-webhook.log is giving me a 403. Is that to be expected and I need a login or something?

Trott avatar Mar 02 '22 01:03 Trott

https://nodejs.org/github-webhook.log is giving me a 403. Is that to be expected and I need a login or something?

No, not expected. Maybe a side effect of https://github.com/nodejs/build/pull/2840? cc @rvagg

richardlau avatar Mar 02 '22 01:03 richardlau

fixed in https://github.com/nodejs/build/pull/2882

rvagg avatar Mar 02 '22 04:03 rvagg

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

github-actions[bot] avatar Dec 28 '22 00:12 github-actions[bot]

Idea: When the webhook is called, create an empty file that means "rebuild is needed". In build-site.sh, make the build in a loop. at the end of the loop, if the file exists, delete it and build again, otherwise break.

targos avatar Mar 15 '23 11:03 targos

Probably need to do it with some queue, because you could get out of order publishing with polling alone.

nschonni avatar Mar 15 '23 16:03 nschonni