-
Notifications
You must be signed in to change notification settings - Fork 72
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
Mark adapter.dispose as async, Add dispose option to ignore disposing of the callAgent #5329
base: main
Are you sure you want to change the base?
Conversation
Storybook 8 URL https://60c7ae6891f0e90039d7cd54-xyebaaxihc.chromatic.com/ |
Calling bundle size is not changed.
|
CallWithChat bundle size is not changed.
|
Chat bundle size is decreased✅.
|
Storybook 8 URL https://60c7ae6891f0e90039d7cd54-afavwpcjih.chromatic.com/ |
@azure/communication-react jest test coverage for stable.
|
@azure/communication-react jest test coverage for beta.
|
Storybook 8 URL https://60c7ae6891f0e90039d7cd54-wkissivhen.chromatic.com/ |
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 17 changed files in this pull request and generated 1 comment.
Files not reviewed (12)
- change-beta/@azure-communication-react-0f94f856-0d7e-4f92-9e16-2c58149052ac.json: Language not supported
- change-beta/@azure-communication-react-7c38ebea-7a13-4fee-8d1d-0cfca4f07642.json: Language not supported
- change/@azure-communication-react-0f94f856-0d7e-4f92-9e16-2c58149052ac.json: Language not supported
- change/@azure-communication-react-7c38ebea-7a13-4fee-8d1d-0cfca4f07642.json: Language not supported
- packages/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.ts: Evaluated as low risk
- packages/react-composites/tests/app/lib/MockCallAdapter.ts: Evaluated as low risk
- samples/CallWithChat/src/app/views/CallScreen.tsx: Evaluated as low risk
- samples/Calling/src/app/views/CallCompositeContainer.tsx: Evaluated as low risk
- packages/react-composites/src/composites/CallComposite/MockCallAdapter.ts: Evaluated as low risk
- packages/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.ts: Evaluated as low risk
- packages/react-composites/src/composites/CallComposite/adapter/CallAdapter.ts: Evaluated as low risk
- packages/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts: Evaluated as low risk
@@ -625,10 +625,12 @@ export class AzureCommunicationCallAdapter<AgentType extends CallAgent | TeamsCa | |||
this.muteAllRemoteParticipants.bind(this); | |||
} | |||
|
|||
public dispose(): void { | |||
public async dispose(options?: { doNotDisposeCallAgent?: boolean }): Promise<void> { | |||
this.resetDiagnosticsForwarder(); |
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.
The error message thrown inside resetDiagnosticsForwarder is not awaited. This could lead to unhandled promise rejections. Ensure that the error message is awaited.
this.resetDiagnosticsForwarder(); | |
await this.resetDiagnosticsForwarder(); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
What
Why
If the adapter is created through createadapterWithDeps we should not be disposing of the callAgent. However to remove this would be a breaking change so adding an option to dispose instead.
Marking the dispose as async is a breaking change, but technically this is already performing async behavior so we just need ARB sign off on this. Keeping in draft until ARB sign off.
How Tested
CI only