SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Allow databases from 1.0.1 to be run on 1.0.0

Open coolreader18 opened this issue 9 months ago • 1 comments

Description of Changes

From the comment I put in the code:

set the patch version of newly-created metadata files to 0 [which means that patch number of existing metadata files won't be updated past 0 either] -- v1.0.0 set cmp.patch = Some(file_version.patch) when checking version compatibility, meaning it won't be forwards-compatible with a database claiming to be created on v1.0.1, even though that should work. This can be changed once we release v1.1.0, since we don't care about its DBs being backwards-compatible with v1.0.0 anyway.

Expected complexity level and risk

2 - it's slightly tricky to figure out the right thing to do to maintain compatibility while disallowing incompatibility, but I'm confident this is it :)

Testing

  • [x] Added unit tests to make sure it all works, including that v1.0.0 will be compatible with v1.0.1

coolreader18 avatar Mar 14 '25 19:03 coolreader18

Here is the end-to-end testing I did:

  1. Start a server on the local branch
  2. Publish a module
  3. Run 1.0.0 spacetime start

When my local branch is master, the 1.0.0 spacetime start fails; when my local branch is this PR, spacetime start starts up happily.

bfops avatar Mar 18 '25 18:03 bfops