opral / inlang-message-sdk

0 stars 0 forks source link

sdk persistence: migration requirements #37

Open jldec opened 2 months ago

jldec commented 2 months ago

Context

sdk-persistence means that we can improve how the inlang sdk handles upgrades as we add features.

There is currently no migration mechanism for plugins. This means that users can (and do) get stuck on outdated plugins.

(correction April 23. The inlang message format plugin does have a migration capability for v1.x -> v2.x, documented in the changelog.)

Proposal

  1. Existing projects using plugins should be able to migrate to sdk persistence
    • Initally this can be a one-time, user-initiated process, e.g. triggered by the inlang CLI
    • Once stable, we should nudge users and offer to do this also from other apps
  2. The sdk should detect internal persisted format changes, and auto-migrate the sdk message store, without user intervention.
    • Some backward and forward sdk <-> file-format compatiblity is needed (details tbd)
    • Ensure all-or-nothing (atomic) migrations, and avoid file corruption.