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 progressNote: 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 serviceLast schema revision prior to this change, for reference if downgrading:
commit 93f98ec8f78010de4f1ef9edc6b89c11afce9216 Author: Conrad Hoffmann <ch@bitfehler.net> Date: 2024-09-24T17:03:25+02:00 ops: remove stale links to topology page