Skip to content
Notify HipChat when a new version of the Khan Academy website is set as default
Find file
Latest commit cdbe0bf Dec 2, 2015 @benjaminjkraft benjaminjkraft Check the version of the default module
By default, `/api/internal/dev/` gets routed to frontend-highmem because it
contains a lot of slow and memory-intensive routes.  Now we'll explicitly check
the default module.

Test Plan:
Deploy it, then watch timestamps on a few deploys to see that it matches when
default flipped, rather than frontend-highmem.

Reviewers: mroth, csilvers

Reviewed By: csilvers

Differential Revision:


Every 10 seconds it will check the version returned by and send a notification to Slack if it has changed since the last check.

This runs as a process on our internal webserver, toby.

Since GAE will serve this URL from different instances for about an hour after a new default version is designated, we have added some buffering to alleviate flip-flopping. This behavior is documented at

This means we cannot detect when an actual rollback to a previous version has occurred within a short window. But after 2 hours, we reset our history and can detect an inadvertant flip.

This uses alertlib (a sub-repo) to talk to Slack. alertlib requires being able to import a file called with the contents:

slack_alertlib_webhook_url = "<slack url value>"

This service is controlled via upstart, so after modifying, you can restart like so:

% sudo stop gae-default-version-notifier
% sudo start gae-default-version-notifier
Something went wrong with that request. Please try again.