Rename the OpenPlural format to PluralPort - #283
Merged
Conversation
The interchange format Sheaf co-designed was renamed upstream after a name conflict. The spec version string is unchanged at 0.1, so this is branding plus one new envelope key, not a format revision. Producers now emit `pluralport_version` and Sheaf's bundles are `.pluralport.zip` carrying `pluralport.json`. The API's format and source values become `pluralport` / `pluralport_file`, with the preview endpoint at /v1/import/pluralport/preview. Per the spec's versioning rule, v0.1 importers must keep accepting the deprecated `openplural_version` key with identical semantics, and `pluralport_version` wins when a file carries both - including when the new key is the invalid one. Sheaf also keeps accepting the legacy `openplural.json` bundle member, the old API format/source values, the old preview route (hidden from the schema), `.openplural.zip` in the web file picker, and the OPENPLURAL_MAX_PRESERVED_MB env var. A data-only migration relabels stored import-job source and export-job format values; both columns are plain strings, so there is no type surgery. One name is deliberately left alone: the `systems.openplural_archive` column, its model attribute, and `system_openplural_archive_aad`. That string is the AAD bound into every encrypted residual-archive blob, so renaming it would make existing data undecryptable. Every site touching it now carries a comment saying so. The exported JSON key does move to `pluralport_archive`, and the native importer accepts both spellings. Tests cover each compatibility path: legacy envelope key, both-keys precedence in either direction, legacy bundle member, legacy source and format values, the legacy preview route, the legacy archive key, and the old env var.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The interchange format Sheaf co-designed was renamed upstream after a name conflict. The spec version string is unchanged at
0.1, so this is branding plus one new envelope key, not a format revision. The spec now lives at PluralPort/spec.What changes on the wire
Exports stamp
pluralport_version: "0.1"and download as.pluralport.zipcarryingpluralport.json. The API's values becomeformat=pluralportandsource=pluralport_file, and the preview endpoint is/v1/import/pluralport/preview. Internally the services, schemas, tests, docs and web modules all follow the name.Nothing existing breaks
The spec's v0.1 versioning rule requires importers to keep accepting the deprecated
openplural_versionkey with identical semantics, and requirespluralport_versionto win when a file carries both. That last part is the easy thing to get backwards, so it is pinned by a test in both directions: a file with a boguspluralport_versionand a validopenplural_versionis rejected, not quietly imported under the alias.Beyond the envelope key, every other old spelling is still accepted as a deprecated alias: the legacy
openplural.jsonbundle member,format=openplural,source=openplural_file, the old preview route (still working, butinclude_in_schema=Falseso the generated schema stays pluralport-only),.openplural.zipin the web file picker so exports already sitting on disk still select, and theOPENPLURAL_MAX_PRESERVED_MBenv var for selfhosters (the newPLURALPORT_MAX_PRESERVED_MBwins if both are set).The one name that does not move
systems.openplural_archive, its model attribute, andsystem_openplural_archive_aadkeep their pre-rename spelling. That string is the AAD bound into every encrypted residual-archive blob, so renaming it would make existing stored data undecryptable. All 24 sites that reference it now carry a comment saying why, because a partially-renamed file reading anopenplural-named attribute is exactly where someone would later "finish the job". The exported JSON key does move topluralport_archive, and the native importer accepts both spellings with the new one winning.Migration and deploy note
The migration is data-only: it relabels
import_jobs.sourceandexport_jobs.format. Both areString(32)rather than Postgres enums, so there is no type surgery and no lock-taking DDL. Downgrade is symmetric.Worth picking a quiet moment for the deploy: during a rolling restart there is a narrow window where an old instance sees a relabelled row. Harmless for the historical completed rows, but an import job sitting
pendingat that exact moment with the old source value would fail and need re-running.Verification
Ruff, tsc, eslint and the web build are clean. The legacy env var alias, the query-param alias normalisation (
?format=openpluralreturns 200 while a bogus value still 422s), and the generated OpenAPI enums were each checked directly rather than assumed. Stackless parity and unit tests pass; the full behavioural suite on theselfhosted/noneconfig is 2051 passed / 155 skipped, which includes bringing up a stack and running the new migration.New tests cover each compatibility path individually: legacy envelope key, both-keys precedence in either direction, legacy bundle member, legacy source and format values, the legacy preview route, the legacy archive key, and the old env var.
Not in scope
Historical alembic migrations and historical changelog entries keep their original wording, as does the record of upstream issues filed under the old name.