-
Notifications
You must be signed in to change notification settings - Fork 547
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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], |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
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