Skip to content

expose runtime option overrides in createDOProviderContainerRuntimeFactory #24689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

znewton
Copy link
Contributor

@znewton znewton commented May 22, 2025

Description

We need a way to alter runtime options more directly in internal projects to enable features like createBlobPayloadPending without adding more compatibility options until we're ready to make those public.

Breaking Changes

Only internal changes, all optional, none breaking

@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 17:06
@github-actions github-actions bot added area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch labels May 22, 2025
Copy link
Contributor

@Copilot 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

This PR exposes an internal mechanism to override container runtime options in createDOProviderContainerRuntimeFactory without altering public APIs.

  • Adds runtimeOptionOverrides parameter to the factory API.
  • Wires the overrides through DOProviderContainerRuntimeFactory, merging with default runtime options.
  • Imports and uses the new IContainerRuntimeOptions type.
Comments suppressed due to low confidence (1)

packages/framework/fluid-static/src/rootDataObject.ts:200

  • [nitpick] Add unit tests for createDOProviderContainerRuntimeFactory to verify that overrides are correctly merged into the runtime options and that default behavior remains unchanged when no overrides are provided.
runtimeOptionOverrides?: Partial<IContainerRuntimeOptions>;

runtimeOptions: {
...compatibilityModeRuntimeOptions[compatibilityMode],
...runtimeOptionOverrides,
},
provideEntryPoint,
minVersionForCollab: compatibilityModeToMinVersionForCollab[compatibilityMode],
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we may need to also override minVersionForCollab as well. I have a pending PR that will throw if we set a config to a value that requires a higher minVersionForCollab than provided (#24625). In this scenario, if a customer sets createBlobPayloadPending: true, then it would throw unless minVersionForCollab is at least "2.40.0" (release when createBlobPayloadPending was added).

Copy link
Contributor

Choose a reason for hiding this comment

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

It may be worth considering to add a "2.40" compat mode. We could either use that to set createBlobPayloadPending: true automatically in the compatibilityModeRuntimeOptions map, or require using "2.40" compat mode to be allowed to set createBlobPayloadPending: true in the runtime options override object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we're currently trying to avoid public API alterations. @ChumpChief can weigh in though if he thinks createBlobPayloadPending is ready for the public limelight

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd modify the compat modes when createBlobPayloadPending becomes on-by-default (i.e. then it would be set to false for compat modes "1" and "2"). I don't think we'd need to set it to true in any compat mode just because we don't need to be particularly aggressive about enabling it (esp. if the individual customer has this option of enabling it themselves).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants