- Notifications
You must be signed in to change notification settings - Fork 492
Add Runtime project and tests #4968
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
Conversation
…ing project references.
EricDahlvang left a comment
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 a phenomenal amount of work, with great improvements to the sdk's support of the composer experience!
Mostly, my comments are regarding TODOs and missing documentation or comments. I didn't look through the tests. I'm not sure some of these files are 'SDK type' files, but the overall direction of this PR looks like it will help alleviate many pain points with Composer/SDK integration.
libraries/Microsoft.Bot.Builder.Runtime.WebHost/Controllers/SkillController.cs Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime.WebHost/Controllers/SkillController.cs Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime.WebHost/Microsoft.Bot.Builder.Runtime.WebHost.csproj Outdated Show resolved Hide resolved
| }); | ||
| | ||
| services.AddSingleton<IBotFrameworkHttpAdapter, CoreBotAdapter>(); | ||
| services.AddSingleton<BotAdapter>( |
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.
Please describe with a comment with there's two registrations here.
| | ||
| namespace Microsoft.Bot.Builder.Runtime.Providers.Adapter | ||
| { | ||
| public interface IAdapterProvider : IProvider |
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.
comments.
Is this necessary? it is an empty interface. interfaces are hard to extend in a versioning system within c#. has that been considered here?
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.
Documentation added in latest commit. Will evaluate the necessity in another pass tomorrow.
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.
On a related note: Is this Provider/Builder/Extensions framework something we would ever expect devs to extend or modify? Or is this an implementation detail of Runtime? I am having a hard time imagining a case where they would need to. The "public" portion of this is the runtime.json, and all this simply loads that in a platform specific way.
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 intention is that developers can implement custom Providers and Builders that can be registered as part of our extensibility story and ultimately incorporated via the standard runtime configuration mechanisms (i.e. runtime.json, for now).
The intention behind this is to ensure that the specified provider in the JSON configuration is indeed one intended to register IStorage and related/dependent services with IServiceCollection. I'm not having any immediate thoughts of how else to enforce this constraint outside of an interface without it becoming further convoluted. Open to suggestions, but I think for now I would say this is needed.
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.
While allowing the developer to extend this is desirable long term, it's not a requirement in R12/13. Given the controversial nature of Providers/Builders, it should be marked internal to allow it time to bake and simplify. Since we are also building other extensibility stories on this (Custom Actions, OnTurnError, etc...), this isn't easily simplified, changed, or eliminated. This will also allow us the space and time to develop additional collateral, like samples and docs, around this story.
libraries/Microsoft.Bot.Builder.Runtime/Providers/Channel/DeclarativeChannelProvider.cs Show resolved Hide resolved
gabog left a comment
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.
First pass at reviewing this.
I checked general project structure and dependencies at this point. I'd like to understand what Builders and Providers do and what will the extensibility points are before reviewing the rest.
Some thoughts include:
- Will the dev be able to change Azure services by something else?
- Will the dev be able to change QnA and or LUIS by something else?
- How will the dev register other cognitive services? (add image recognizer for example)
- Will the dev be able to change the adapter and use a different one?
- Will we let the dev change or swap telemetry?
- Will they be able to use TeamsActivityHandler instance of ActivityHandler?
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Extensions/IConfigurationBuilderExtensions.cs Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Builder.Runtime/Microsoft.Bot.Builder.Runtime.csproj Outdated Show resolved Hide resolved
…for InternalsVisibleTo
# Conflicts: # .github/CODEOWNERS
| Deferring integration with SDK until later. |
Note that the warning for missing code comments has been disabled. Another issues has been opened to address that.