Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Notify HipChat when a new version of the Khan Academy website is set as default

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 third_party
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 hipchat
Octocat-spinner-32 notify.py
Octocat-spinner-32 readme.md
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 secrets.py.example
readme.md

This runs as a process on our Continuous Integration server (codename toby). Every 10 seconds it will check the version returned by http://www.khanacademy.org/api/v1/dev/version and send a notification to HipChat if it has changed since the last check.

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 http://stackoverflow.com/questions/15416938/app-engine-version-served-by-default-appears-to-be-inconsistent-and-thrash-for

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.

You can download the hipchat source here: https://github.com/Khan/python-hipchat

You can install ConfigObj with: pip install configobj

After modifying this script, the deployment steps are: 1. ssh toby 2. Find the current process and kill it with ps aux | grep notify.py and kill 3. cd gae-default-version-notifier 4. git pull ?? 5. nohup python ~/gae-default-version-notifier/notify.py &

Something went wrong with that request. Please try again.