Skip to content

Bootstrap tokenserver's services table #1991

@data-sync-user

Description

@data-sync-user

We should populate the services table with the required sync-1.5 entry, at least on the postgres backend (we currently don’t, to match the mysql backend and to accommodate the test suite populating it).

History on why mysql doesn’t populate it:

The rust tokenserver (MySQL) originally populated the services table with entries for sync-1.1 and sync-1.5 via a migration. This was reverted (https://github.com/mozilla-services/syncstorage-rs/issues/1144) due to the entries being “incompatible with the services table that exists on the old Tokenserver”.

This seems to have been an part of an attempt to adapt the migrations to support working with a pre-existing database (from the Python version) while still serving to bootstrap a brand new Tokenserver service. https://github.com/mozilla-services/syncstorage-rs/pull/1282 seems to have been another fix to serve this requirement.

However that requirement was later abandoned: instead we ended up defaulting the migrations to not run at startup: https://github.com/mozilla-services/syncstorage-rs/pull/1286 – and they’ve never ran on production.

With all this in mind, we should populate the sync-1.5 entry: I don’t see any form of Tokenserver ever running without it and it would remove one extra step in bootstrapping a new service.

We don’t need an old sync-1.1 entry: this was for the old Sync protocol, now unsupported, and production may not have ever included an entry for it (or it was removed a long time ago).

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions