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

[PORT] Bot Change Detection #3804

Merged
merged 4 commits into from
Apr 27, 2020
Merged

[PORT] Bot Change Detection #3804

merged 4 commits into from
Apr 27, 2020

Conversation

tomlm
Copy link
Contributor

@tomlm tomlm commented Apr 24, 2020

  • Add dialoginstance.version property for saving version string between turns.
  • Add dialog.GetVersion() which allows a dialog to return unique string for a configuration
  • Add DialogSet.GetVersion() which will be different if collection of dialogs and the GetVersion() have changed.
  • Add DialogContainer.GetInternalVersion() - which detects at the container level internal changes for children.
    Add DialogContainer.CheckForVersionChange() - which is called on BeginDialog/ContinueDialog/ResumeDialog() to detect that a dialogContainer has changed
  • Add DialogEvents.VersionChanged event which is fired when change is detected
  • Implement AdaptiveDialog.GetInternalVersion() to detect triggers changes, schema changes as well as dialog changes
    Unit tests, etc.

Tom Laird-McConnell added 3 commits April 24, 2020 11:23
Add dialog.GetVersion()
Add DialogSet.GetVersion()
Add DialogContainer.GetInternalVersion()
Add DialogContainer.CheckForVersionChange()
Implement AdaptiveDialog.GetInternalVersion() to detect triggers, schema as well as dialog changes
Unit tests, etc.
@tomlm tomlm linked an issue Apr 24, 2020 that may be closed by this pull request
@tomlm tomlm changed the title Implement Change detection in dialogs [Port] Change Detection from bb-js Apr 24, 2020
@tomlm tomlm changed the title [Port] Change Detection from bb-js [PORT] Bot Change Detection Apr 24, 2020
@tomlm tomlm added the R9 Release 9 - May 15th, 2020 label Apr 25, 2020
/// GetInternalVersion - Returns internal version identifier for this container.
/// </summary>
/// <remarks>
/// DialogContainers detect changes of all sub-components in the container and map that to an DialogChanged event.
Copy link
Contributor

Choose a reason for hiding this comment

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

DialogChanged [](start = 102, length = 13)

Should be: VersionChanged

@@ -5,10 +5,34 @@ namespace Microsoft.Bot.Builder.Dialogs
{
public class DialogEvents
{
/// <summary>
/// Event fired when a dialog beginDialog() is called.
Copy link
Contributor

Choose a reason for hiding this comment

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

beginDialog [](start = 38, length = 11)

Should be: BeginDialogAsync()

Copy link
Contributor

@Stevenic Stevenic left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Contributor

@cleemullins cleemullins left a comment

Choose a reason for hiding this comment

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

I've got no usefull feedback to add. LGTM with @Stevenic signed off

sb.Append(trigger.GetExpression().ToString());
}

return Convert.ToBase64String(SHA256.Create().ComputeHash(Encoding.UTF8.GetBytes(sb.ToString())));
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is in several places. Worth moving to a shared static somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R9 Release 9 - May 15th, 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PORT] Bot Change Detection
3 participants