-
Notifications
You must be signed in to change notification settings - Fork 536
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
[For 2.20] Move ContainerRuntime class to internal scope #23341
[For 2.20] Move ContainerRuntime class to internal scope #23341
Conversation
5f75fd4
to
b84092a
Compare
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.
Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.
Files not reviewed (3)
- packages/runtime/container-runtime/api-report/container-runtime.legacy.alpha.api.md: Evaluated as low risk
- packages/runtime/container-runtime/src/containerRuntime.ts: Evaluated as low risk
- packages/framework/aqueduct/src/container-runtime-factories/baseContainerRuntimeFactory.ts: Evaluated as low risk
Comments suppressed due to low confidence (2)
packages/test/test-utils/src/testContainerRuntimeFactory.ts:91
- [nitpick] The variable name 'runtime' is ambiguous. It should be renamed to 'containerRuntime'.
public async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {
packages/test/test-utils/src/testContainerRuntimeFactory.ts:109
- [nitpick] The variable name 'runtime' is ambiguous. It should be renamed to 'containerRuntime'.
public async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {
Co-authored-by: jzaffiro <[email protected]>
It was used to justify breaking the type here.
@@ -121,14 +123,11 @@ export class BaseContainerRuntimeFactory | |||
* Called at the start of initializing a container, to create the container runtime instance. | |||
* @param context - The context for the container being initialized | |||
* @param existing - Whether the container already exists and is being loaded (else it's being created new just now) | |||
* | |||
* @deprecated This function should not be called directly, use instantiateRuntime instead. |
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.
@microsoft/fluid-cr-api -- I had marked this as deprecated to justify this break. Simplest thing is to remove the deprecation as I add the new type, as you see here.
But taking a step back, I think preInitialize
, along with instantiateFirstTime
and instantiateFromExisting
should be protected
not public
. Once instantiated, this class (and base class RuntimeFactoryHelper
) should only be referenced via the interface IRuntimeFactory
, IMO.
If we go that direction I can leave this deprecated and do a follow-up PR to deprecate the others, and then in 2.30 switch them all to protected
. Maybe I'm missing something though. Thoughts?
See also the deprecation release note for when I marked this as deprecated.
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 would only leave it deprecated if you plan follow up and finish it, otherwise i'd just file a bug, but let the person who takes it on do the deprecation
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.
🥳
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
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.
Approved for docs!
Description
Fixes AB#26794
See #23329
Stop exporting ContainerRuntime class under the
/legacy
path. See deprecation release noteBreaking Changes
This is a breaking change since
ContainerRuntime
has been exported before. It's deprecated as of 2.12.0, and all known usages in partner codebases have been or are being removed.