Skip to content

feat(runtime): Add option to disable Document Schema upgrades#26713

Merged
scottn12 merged 5 commits intomicrosoft:mainfrom
scottn12:disableDocSchemaUpgradesOption
Mar 19, 2026
Merged

feat(runtime): Add option to disable Document Schema upgrades#26713
scottn12 merged 5 commits intomicrosoft:mainfrom
scottn12:disableDocSchemaUpgradesOption

Conversation

@scottn12
Copy link
Contributor

@scottn12 scottn12 commented Mar 12, 2026

Description

This PR adds an option disableSchemaUpgrade to ContainerRuntimeOptions. When enabled, it will prevent the runtime from sending DocumentSchemaChange ops and will throw on incoming DocumentSchemaChange ops.

This is useful for applications that don't require schema upgrades, as it guarantees that no mid-session errors can arise from schema upgrades.

Misc

AB#53703
Spec

@scottn12 scottn12 marked this pull request as ready for review March 17, 2026 18:18
@scottn12 scottn12 requested a review from a team as a code owner March 17, 2026 18:18
Copilot AI review requested due to automatic review settings March 17, 2026 18:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new runtime option to disable document schema upgrades, preventing outgoing DocumentSchemaChange ops and rejecting incoming ones to avoid mid-session schema transitions.

Changes:

  • Introduces disableSchemaUpgrade on ContainerRuntimeOptions (defaulting to false) and threads it into schema controller behavior.
  • Updates schema controller logic to no-op on send and throw on receive when schema upgrades are disabled.
  • Extends tests and option matrices to exercise the new flag and updates API/type-validation artifacts.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/test/test-service-load/src/optionsMatrix.ts Adds the new flag to load-test runtime option permutations.
packages/service-clients/azure-client/src/test/AzureClient.spec.ts Updates expected runtime options to include the new flag.
packages/runtime/container-runtime/src/test/types/validateContainerRuntimePrevious.generated.ts Marks the API type compatibility break as expected.
packages/runtime/container-runtime/src/test/documentSchema.spec.ts Adds coverage for disabled-upgrade behavior and updates controller construction calls.
packages/runtime/container-runtime/src/test/containerRuntime.spec.ts Updates expected runtime options and telemetry assertions to include the new flag.
packages/runtime/container-runtime/src/summary/documentSchema.ts Implements the disable-upgrade behavior in the schema controller and updates docs.
packages/runtime/container-runtime/src/containerRuntime.ts Adds the new option to the public runtime options API and wires it into construction.
packages/runtime/container-runtime/src/containerCompatibility.ts Excludes the new option from doc-schema-affecting runtime options.
packages/runtime/container-runtime/package.json Records the API compatibility break in type validation configuration.
packages/runtime/container-runtime/api-report/container-runtime.legacy.beta.api.md Updates the API report to include the new option.
Comments suppressed due to low confidence (1)

packages/runtime/container-runtime/src/summary/documentSchema.ts:1

  • Adding another positional boolean parameter to an already-long constructor signature increases the chance of call-site mistakes (especially since many call sites now pass a bare false). Consider making this parameter optional with a default (disableSchemaUpgrade = false) or switching to an options object for the trailing parameters so call sites are self-documenting and future additions don’t require broad mechanical edits.
/*!

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  257792 links
    1822 destination URLs
    2063 URLs ignored
       0 warnings
       0 errors


@scottn12 scottn12 merged commit d8ec0f8 into microsoft:main Mar 19, 2026
34 checks passed
@scottn12 scottn12 deleted the disableDocSchemaUpgradesOption branch March 19, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants