botbuilder-python icon indicating copy to clipboard operation
botbuilder-python copied to clipboard

port: Settings scope: support backward compat setting scope, remove ComponentRegistration in DialogStateManager (#5397)

Open github-actions[bot] opened this issue 4 years ago • 0 comments

The changes in Settings scope: support backward compat setting scope, remove ComponentRegistration in DialogStateManager (#5397) may need to be ported to maintain parity with microsoft/botbuilder-dotnet.

SettingsScope was not working in a backward compatible way because of 3 subtle things happening simultaneously:
  • DialogStateManager was registering the DialogcomponentRegistration by itself
  • We removed IConfiguration from the turnState, so legacy SettingsMemoryScope did not have access to configuration in turn state (so the registration in dialog state manager was not getting any settings)
  • SettingsMemoryScope only gets evaluated once

Here we remove the DialogStateManager call to DialogComponentRegistration since this is the last call to ComponentRegistration in non-test code. Legacy code will still work because legacy adapters still add IConfiguration to the turnState. New code will use the new route.

Also, fixing a breaking change where we would break folks using the default constructor of SettingsMemoryScope.

Note that tests still rely on ComponentRegistration and we have an R14 change to remove these, basically by moving the TestAdapter and TestScript to the BotComponent pattern. This work is tracked here: https://github.com/microsoft/botbuilder-dotnet/issues/5396

Please review and, if necessary, port the changes.

github-actions[bot] avatar Mar 31 '21 16:03 github-actions[bot]