Migration
Some releases of BuildGrid introduce breaking changes which require a migration step, or changes which require consideration when upgrading to the new version.
The bgd migrate CLI can be used to apply any database migrations which have
been added in a new release.
This section documents such changes in each release. If a release is missing from this page, it can be assumed to be too old to need documenting here, or to not have any such changes.
0.4.1
Scheduler schema changes
BuildGrid 0.4.1 includes a database migration which needs to be applied; which
can be found at data/revisions/3737630fc9cf->d1de6a7df71e.sql.
This migration adds a new table to keep a log of jobs cancelled by the cohort assigner when maintaining minimum quotas. See Eviction cooldown for details on how this log is used.
0.4.0
BuildGrid 0.4.0 introduces several changes which require care when migrating.
BuildBox version
Due to reintroduction of long-polling when bots have spare capacity, the minimum supported BuildBox version is now 1.3.51. Older versions of BuildBox will continue to work with BuildGrid 0.4.0, but bots with capacity of more than 1 will experience delays in communication of execution completion when they have spare capacity.
SQLIndex schema changes
The deleted column of the index table is removed. This column was used by
the cleanup daemon to perform a three-step deletion process where blobs were
marked as deleted in the index, removed from the backend storage, and then
deleted from the index.
When migrating to BuildGrid 0.4.0 with an SQL index in use, any cleaners should be temporarily paused to avoid the upgrade effectively “undeleting” blobs which are part-way through this multi-step deletion.
Tip
Ensure that your cleaners are all updated to 0.4.0 before running the
database migration to actually drop the deleted column.
A generated SQL database migration to apply this change can be found in
data/revisions/ff09fbc30c3e->3737630fc9cf.sql.
Removal of SQLIndex fallback-on-get
The fallback-on-get configuration option for an SQL index is removed in
this release. Usage of this option for data migration to a newly-added index
should be replaced with a !replicated-storage with a replica for the newly
indexed stack.