phetsims / perennial

Maintenance tools that won't change with different versions of chipper checked out
MIT License
2 stars 5 forks source link

Add build-server status report #298

Closed mattpen closed 1 year ago

mattpen commented 1 year ago

@zepumph and I thought that an http endpoint that returns a simple report of the build-server's queue status would be a nice-to-have feature.

https://phetsims.slack.com/archives/C6HPE0J91/p1672936506159459?thread_ts=1672875653.698849&cid=C6HPE0J91

Michael Kauzmann Yeah, perhaps a "currentState" or "log" or "debug" endpoint that gives some json info from a browser?

Matt Pennington Probably wouldn’t be hard to add a path like phet.colorado.edu/build-server/status that is just a simple text list or even json array of the current queue and maybe some timing

Michael Kauzmann I like it! Likely not urgent, but a fun idea. Up to you.

This would be pretty quick to knock out in tandem with parallel checkouts.

This would be useful for quickly determining status during batch translations and maintenance releases, where we currently have to manually parse through the build-server logs on phet-server2

mattpen commented 1 year ago

I was able to get a quick report working that shows the current build and any builds in the queue and the times they were added to the queue. Some additional features that might be nice: error status on failed builds, historical log of prior builds and their success/failure status. Adding more features will probably tilt the scales toward setting up a simple DB table to manage this rather than a file.

I'll be testing this out today on phet-server-dev.

mattpen commented 1 year ago

Looks like it is working nicely. Here is the output for 3 builds (all identical) on ox-dev:

image
mattpen commented 1 year ago

I deployed this to phet-server2 (our production instance) and it is working well there too. It needs an update to the varnish config to be accessible from outside the server. I'll deploy that change tonight after hours.

mattpen commented 1 year ago

This was deployed to production tonight. Closing.

zepumph commented 1 year ago

Could you post a link to this? Either in slack or this issue?

zepumph commented 1 year ago

https://phet.colorado.edu/deploy-status