Skip to content

Conversation

@gefjon
Copy link
Contributor

@gefjon gefjon commented May 7, 2025

Description of Changes

Prior to this commit, the Rust client SDK was dropping all TableUpdates other than the last within a given DatabaseUpdate, leading to incorrect client cache states, particularly incorrect row multiplicities. This was reported by @lakmatiol in the public Discord, who was kind enough to provide us with a minimal reproducer,
https://github.com/lavirlifiliol/spacetime-repro .

This commit fixes the bug by combining TableUpdates rather than overwriting them. It also adds a new SDK test which does the same thing as the provided reproducer.

Note that this fix affects both the codegen and the SDK itself, meaning we should hold it until a minor version bump.

For ease of review, I've separated the real changes (the bugfix and test) from the autogenerated changes (running spacetime generate for various clients, and also updating an insta snap).

API and ABI breaking changes

Affects the SDK/codegen API, which is internal and unstable, but we don't break at point releases. As such, this will need a minor version bump.

Expected complexity level and risk

Testing

  • Manually ran with the linked reproducer both before and after the fix. It broke before and worked after.
  • Added a new smoketest with the same behavior as the linked repro.

gefjon added 2 commits May 7, 2025 10:47
Prior to this commit,
the Rust client SDK was dropping all `TableUpdate`s other than the last
within a given `DatabaseUpdate`,
leading to incorrect client cache states, particularly incorrect row multiplicities.
This was reported by @lakmatiol in the public Discord,
who was kind enough to provide us with a minimal reproducer,
https://github.com/lavirlifiliol/spacetime-repro .

This commit fixes the bug by combining `TableUpdate`s rather than overwriting them.
It also adds a new SDK test which does the same thing as the provided reproducer.

Note that this fix affects both the codegen and the SDK itself,
meaning we should hold it until a minor version bump.
@gefjon gefjon requested a review from Centril May 7, 2025 15:05
@gefjon gefjon self-assigned this May 7, 2025
@gefjon gefjon added the needs-minor-version-bump A change which requires a minor version bump, not a point release. label May 7, 2025
gefjon added 2 commits May 7, 2025 11:18
I had this during manual testing, but did not intend to commit it.
@gefjon gefjon added this pull request to the merge queue May 8, 2025
Merged via the queue into master with commit 69a2ab7 May 8, 2025
19 checks passed
@bfops bfops mentioned this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-minor-version-bump A change which requires a minor version bump, not a point release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants