-
Notifications
You must be signed in to change notification settings - Fork 535
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
Remove unnecessary ContainerRuntime members #23625
base: main
Are you sure you want to change the base?
Remove unnecessary ContainerRuntime members #23625
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.
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Files not reviewed (1)
- packages/runtime/container-runtime/src/containerRuntime.ts: Evaluated as low risk
Comments suppressed due to low confidence (3)
packages/runtime/container-runtime/src/summary/summaryCollection.ts:38
- The code assumes that op.timestamp is always defined, which may not be the case. Add a check to ensure op.timestamp is defined before using it.
const lastOpTimestamp = op.timestamp;
packages/runtime/container-runtime/src/connectionTelemetry.ts:153
- Ensure that ITelemetryBaseLogger provides all the necessary methods and properties that ITelemetryLoggerExt did.
logger: ITelemetryBaseLogger,
packages/runtime/container-runtime/src/connectionTelemetry.ts:171
- Ensure that this.logger is properly initialized before being passed to createSampledLogger.
this.deltaLatencyLogger = createSampledLogger(this.logger, deltaLatencyEventSampler);
16cce3e
to
9fcb28f
Compare
// back-compat: initialSummarizerDelayMs was moved from ISummaryRuntimeOptions | ||
// to ISummaryConfiguration in 0.60. | ||
initialSummarizerDelayMs = runtimeOptions.summaryOptions.initialSummarizerDelayMs ?? 0, | ||
} = isSummariesDisabled(summaryConfiguration) ? {} : summaryConfiguration; |
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.
This is terse but kind of confusing to follow as the assignment precedence bounces between lines. Looks like this has resulted in summaryConfiguration overriding summaryOptions for initialSummarizerDelayMs, a behavior change since currently summaryOptions takes precedence?
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.
summaryConfiguration is a really hard type to work with, so i'm not surprised the deprecated field is still around and used. i fixed precedence issue. i would like to fix the type, but is it exposed, so hard to make changes.
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.
None of either summaryConfiguration nor summaryOptions is directly exposed publicly AFAICT, and since the class is now hidden maybe there's some opportunity to precompute these in loadContainerRuntime such that the ctor can just take a simple initialSummarizerDelayMs directly. Might be nice to (1) externalize that complication from the class, (2) pass the tough objects through as few calls as possible, and (3) probably makes the class simpler to test directly? Not needed for this PR but something to think about.
…to cleanup-containerRuntime
01881ea
to
4e70de8
Compare
🔗 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.
Seems cool!
This change removes unnecessary ContainerRuntime members. These members just increased complexity of the class, and most could be moved to just be function scoped variables.