Skip to content
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

Fix 9990 - Rationalize ISummaryConfiguration & ISummaryRuntimeOption #10047

Merged
merged 26 commits into from
May 3, 2022

Conversation

NicholasCouri
Copy link
Contributor

@NicholasCouri NicholasCouri commented Apr 26, 2022

Draft for fixing #9990

  • The idea is to release a PR to update the protocol-definitions (to update the ISummaryConfiguration) and them remove the ISummaryConfiguration we've added to the ContainerRuntime.ts in this PR as per Vlad's suggestion.

@NicholasCouri NicholasCouri requested review from msfluid-bot and a team as code owners April 26, 2022 03:08
@github-actions github-actions bot added area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc public api change Changes to a public API base: next PRs targeted against next branch labels Apr 26, 2022
@NicholasCouri NicholasCouri requested a review from vladsud April 26, 2022 03:09
@vladsud
Copy link
Contributor

vladsud commented Apr 26, 2022

I'd think that packages/test/snapshots/content should not be changed.


In reply to: 1109910732


In reply to: 1109910732


In reply to: 1109910732

@vladsud vladsud requested a review from kian-thompson April 26, 2022 15:04
@NicholasCouri
Copy link
Contributor Author

I will revert it - as it changed locally, I thought it would need to be checked in.


In reply to: 1109910732

@NicholasCouri NicholasCouri requested a review from a team as a code owner April 26, 2022 18:19
@github-actions github-actions bot added the area: dds Issues related to distributed data structures label Apr 26, 2022
@agarwal-navin
Copy link
Contributor

agarwal-navin commented Apr 29, 2022

This needs a note in BREAKING.md.


In reply to: 1113575560

* Flag that will enable changing elected summarizer client after maxOpsSinceLastSummary.
* This defaults to false (disabled) and must be explicitly set to true to enable.
*/
summarizerClientElection: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

We can move it into separate issue (assuming I'm right).
But I'm not sure I see a point of these two properties above if heuristics are disabled, and we only can do on-demand summaries (at least that's how it looks from code). If that's true, then I'd expect a caller (i.e. outside process) fully controlling it, and making its own decisions which clients (and how often) Ok to run summaries. And probably by virtue of that - controlling lifetime of summarizer client as well.

I think this mode was built for Word specifically (or any other scenario that wants to run summaries on dedicated client in service). I'd think the right direction here - remove the overhead of needing two clients (main + summarizer) and have a way for Word to directly create summarizer client and controlling it directly, removing whole client that is not needed. I think this workflow is possible, and in such case these options should not be needed.

Let's follow up on that separately.

@@ -226,7 +221,7 @@ export class Summarizer extends EventEmitter implements ISummarizer {
private async start(
onBehalfOf: string,
runCoordinator: ICancellableSummarizerController,
options?: Readonly<Partial<ISummarizerOptions>>): Promise<RunningSummarizer> {
newConfig?: ISummaryConfiguration): Promise<RunningSummarizer> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why overwrite (in the form of newConfig) is even needed here. We are getting full settings in constructor - they should be exactly same settings we would get here. If so, I believe we should remove it.
I think the reason it was different in the past is that we were passing only "core" settings in ctor - ISummaryConfiguration, which dd not include ISummarizerOptions. Now we properly merged all settings into one structure, and the need to pass data piecemeal is gone.

Copy link
Contributor Author

@NicholasCouri NicholasCouri Apr 29, 2022

Choose a reason for hiding this comment

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

hahaha Vlad, it used to be a ISummarizerConfig -> DisableHeuristics argument and I had moved to a boolean. You asked to move to a config :)

The containerruntime exports summarizeOnDemand that ends up calling summaryManager.summarizeOnDemand
That will spawn a summarizer with Heuristics disabled.

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 will follow-up in a different issue - for now I'm removing the argument but we might still have a problem if I have my config enabled, the summarizer is not running and we try to run a summarizer on demand. I will clarify on the issue.

@github-actions github-actions bot added the breaking change This PR or issue would introduce a breaking change label Apr 30, 2022
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Apr 30, 2022

Could not find a usable baseline build with search starting at CI ec15d8a

Generated by 🚫 dangerJS against dd861f8

# Conflicts:
#	packages/runtime/container-runtime/src/runningSummarizer.ts
#	packages/runtime/container-runtime/src/summarizerHeuristics.ts
#	packages/runtime/container-runtime/src/test/summarizerHeuristics.spec.ts
@NicholasCouri NicholasCouri merged commit fe4cf69 into microsoft:next May 3, 2022
kian-thompson added a commit that referenced this pull request Feb 13, 2024
#10047 Introduced
changes to summary heuristics. This PR is some cleanup around old unused
variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds Issues related to distributed data structures area: driver Driver related issues area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: next PRs targeted against next branch breaking change This PR or issue would introduce a breaking change public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants