When a new release is being planned, it is useful to give admins some notice if the release includes a database migration. Releases without migrations can be applied with minimal downtime (just the time needed to unpack the files and restart the daemons).
LAVA is also planning changes to support scaling and high availability, these changes may involve creating multiple dockers accessing the same external database. This provides for no downtime when upgrading to a new LAVA release, each docker could be restarted independently, jobs can continue to be submitted etc.. However, as soon as the release includes even one database migration, scheduled downtime becomes unavoidable and services trying to submit jobs would get a HTTP502 error. All docker containers would have to be stopped before the database is migrated and then updated containers started which use the new code to match the effect of the migrations.
To help admins with future releases, the plan is to "batch up" migrations into a single release and then give warning on lava-announce when work starts on that release (not at the point of announcing the release itself).
Merge requests which include database changes will have the database changes label applied: https://git.lavasoftware.org/lava/lava/merge_requests?label_name%5B%5D=Datab...
Issues which are expected to require database changes will have the same label: https://git.lavasoftware.org/lava/lava/issues?label_name%5B%5D=Database+chan...
Issues and merge requests with the label will be put into the same milestone and the milestone will mention that database changes are expected: https://git.lavasoftware.org/groups/lava/-/milestones/2?milestone%5Btitle%5D...
When developers are planning changes which include database migrations, please make sure that this is declared (on this list and in all issues or merge requests), the relevant label is attached and a suitable milestone is set.
Avoid merging any MR which has a milestone ahead of the next release.
Milestones are tracked here: https://git.lavasoftware.org/groups/lava/-/milestones
One suggestion for developers would be to host the change which includes one or more migrations in a dedicated docker container and keep your localhost on the master branch.
Comments? Problems?
lava-devel@lists.lavasoftware.org