web-platform-tests / wpt.live

A live version of the web-platform-tests project
https://wpt.live/
15 stars 11 forks source link

Pull the latest wpt once a minute #10

Closed bmac closed 6 years ago

bmac commented 6 years ago

@jugglinmike I've updated this pull request. There are now 2 cron jobs. 1 runs every minute and pulls the latest changes from git. The other runs once a day and restarts the service to get any changes in the wpt directory. I didn't want to restart the service every minute because restarting causes a momentary bit of downtime where there is nothing to respond to incoming http requests.

jugglinmike commented 6 years ago

For those cases that do involve a change to the server logic, I'm concerned that the heuristic would cause confusion. Contributors could prove that the server had the latest code, but its behavior wouldn't match up.

What do you think about a Bash script that compares the HEAD before and after pulling and only restarts in response to change?

bmac commented 6 years ago

That seems reasonable.

bmac commented 6 years ago

I've updated this pr to only restart the server when the sha of the HEAD changes.

jugglinmike commented 6 years ago

Fantastic!