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: Improve reliability of Orchestrator downloader #6672

Merged
merged 15 commits into from
Apr 6, 2021

Conversation

taicchoumsft
Copy link
Member

@taicchoumsft taicchoumsft commented Apr 4, 2021

Description

The Orchestrator language model downloader did not properly catch exceptions in Orchestrator.baseModelGetAsync. This would lead to the download notification spinning endlessly if the language model download fails in some cases, though it can be dismissed.

This PR propagates the error messages by forwarding errors with >400 status codes. This will be caught by the axios promise rejection in the frontend, and a notification failure with the error message will be shown if the download fails.

Task Item

#minor

@coveralls
Copy link

coveralls commented Apr 4, 2021

Coverage Status

Coverage decreased (-0.02%) to 51.655% when pulling c1e3152 on tachou/orchImproveDownloader into 4774755 on main.

Composer/packages/types/src/orchestrator.ts Outdated Show resolved Hide resolved
// Licensed under the MIT License.

export type IOrchestratorModelRequest = {
type: 'en_intent' | 'multilingual_intent';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: type is a reserved keyword, I suggest using somethingType or kind

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @hatpick , I was using the convention that others used here. Is interface ok?

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant the key you use here, type, in strict mode it will complain about it but I guess we are not in that mode. It's still a good practice if you replace it with somethingType or kind:
type: 'en_intent' | 'multilingual_intent';

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah ok understood thanks, will change to kind.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to kind here, enclosed the orchestrator controller in a class, added all other requested changes. Thanks @hatpick

Composer/packages/server/src/controllers/orchestrator.ts Outdated Show resolved Hide resolved
Composer/packages/server/src/controllers/orchestrator.ts Outdated Show resolved Hide resolved
hatpick
hatpick previously approved these changes Apr 5, 2021
@taicchoumsft taicchoumsft merged commit 77820e6 into main Apr 6, 2021
@taicchoumsft taicchoumsft deleted the tachou/orchImproveDownloader branch April 6, 2021 20:35
@cwhitten cwhitten mentioned this pull request May 20, 2021
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Improve reliability of Orchestrator downloader

Co-authored-by: Soroush <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants