Skip to content

Forcing Updates

Nick Watts edited this page Jan 31, 2024 · 2 revisions

Since Terra UI runs in users' browsers, when a new version of Terra UI is deployed, any users who are using Terra at that time don't immediately update to the new version. They keep on running the version of Terra UI that was loaded when they first opened the tab. They'll only update if they refresh their browser or open Terra in a new tab.

To encourage users to update to the latest version of Terra UI once it's available, Terra UI polls /build-info.json every 15 minutes for the latest version available. If the latest version is different than the version currently running, Terra UI shows a notification nudging the user to refresh/update.

Screenshot 2024-01-30 at 5 28 25 PM

Occasionally, we may want to force users to update to the latest version. For example, if we've discovered a serious bug in a particular version of Terra UI. Terra UI provides a mechanism to do this.

Once Terra UI has determined that an update is available, it will poll a bad-versions.txt file in the firecloud-alerts bucket (https://storage.googleapis.com/firecloud-alerts/bad-versions.txt.json). The expected format of this file is for each line to contain a version (specified as a git hash). It can also contain comments (lines starting with '#'). For example:

# This version erases all your files
abcdef1234567890abcdef1234567890abcdef12

If Terra UI finds its current version in that bad-versions.txt file, it will show a banner to the user and count down from 10 minutes. Once the count down reaches 0, it will automatically refresh the page, which will load the latest version.

Screenshot 2024-01-30 at 5 30 00 PM

The git hash of the currently deployed version can be found at https://app.terra.bio/build-info.json

Daily production deploy jobs also log the git hash of the deployed version (see the "Output revision" step of the "deploy" job).

Clone this wiki locally