A coming update to SourceHut's internal design calls for the values of the ID columns in our databases to be made uniform. Each database (e.g. for git, hg, builds, etc) maintained its own copy of tables with shared information, sourcing updates from meta.sr.ht via webhooks, but each of these rows had an ID specific to each database. This change will make these IDs uniform across all services in preparation for linking our services more tightly together through GraphQL Federation.
This document outlines the extra steps required to perform this upgrade for third-party instances.
Ensure meta.sr.ht is running version 0.60.5 or later. Then, for each service, one at a time:
$service-migrate upgrade head (e.g. gitsrht-migrate) for each service
and monitor the migration progress
Note: hub.sr.ht must be upgraded last, if present, and the other services must be running during its upgrade.
Both git.sr.ht and hg.sr.ht cache user IDs and usernames in Redis. Run the following command to clear the Redis cache after the services have been turned off and before they are turned on again:
redis-cli --scan --pattern "*.sr.ht.ssh-keys.*" | xargs redis-cli del
A special upgrade process is required for pages.sr.ht, which does not use the same system for database migrations as other services. Perform the same steps as described above, then run the scripts in contrib in the following order:
To downgrade, repeat these commands in the reverse order with "downgrade".
For each service (excluding meta.sr.ht), one at a time:
$service-migrate downgrade $version, selecting $version from the list
below, for each service
Last schema revision prior to this change, for reference if downgrading: