Skip to content

Conversation

@TommyBrosman
Copy link
Contributor

@TommyBrosman TommyBrosman commented Nov 17, 2025

Follow-up for #25861.

Description

This change adds tests around a couple interesting compatibility cases:

  • Using allowUnknownOptionalFields to allow for forward compatibility. This is the case where the original schema specifies that it can view content persisted with future schemas whose fields it does not know.
  • Staged schema upgrades, which prevent the future schema from viewing content persisted by the previous schema until the upgrades are applied.

@TommyBrosman TommyBrosman requested a review from a team as a code owner November 17, 2025 19:22
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree base: main PRs targeted against main branch labels Nov 17, 2025
TommyBrosman and others added 3 commits November 17, 2025 11:49
…tyChecker.spec.ts

Co-authored-by: Craig Macomber (Microsoft) <42876482+CraigMacomber@users.noreply.github.com>
const backwardsCompatibilityStatus = checkCompatibility(oldViewSchema, currentViewSchema);

// The staged string schema in the old schema is supported in the current schema
assert.equal(backwardsCompatibilityStatus.canView, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is true, we have a major issue. This should require an upgrade to add support for strings. If it does not, then new clients could add strings to a document whose stored schema does not support them, which is invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: tree area: dds Issues related to distributed data structures base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants