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: update and delete activities from skill handler #2912

Merged
merged 27 commits into from
Oct 21, 2020

Conversation

joshgummersall
Copy link
Contributor

Fixes #1995

I slightly refactored the SkillHandler to share more common functionality across events. A new continueConversation method is introduced that accepts a callback parameter that itself accepts some parameters common across the various skill events.

Large test diff is again due to a refactor that better leverages Sinon for mocks/expectations rather than manually patching instances and using assert. Also, some of the test cases that used to target processActivity now target continueConversation.

@joshgummersall
Copy link
Contributor Author

Note: this PR is based on jpg/skills-without-appid-password. I will rebase main once that branch is merged. I also need to manually test this change in the emulator. @gabog can you provide some insight on how you did that?

@joshgummersall joshgummersall changed the title skills: update and delete activities port: update and delete activities from skill handler Oct 19, 2020
@joshgummersall joshgummersall force-pushed the jpg/skills-update-delete-activities branch from 3e027bd to 5c3eca0 Compare October 19, 2020 22:39
@joshgummersall joshgummersall force-pushed the jpg/skills-update-delete-activities branch from 5c3eca0 to e92ced2 Compare October 20, 2020 15:38
@joshgummersall
Copy link
Contributor Author

Verified this change by doing the following:

stevengum and others added 6 commits October 20, 2020 18:16
* [PORT] DialogContextMemoryScope (#2895)

* added DialogContextMemoryScope

* removed setMemory implementation in dialog context memory scope

Co-authored-by: Josh Gummersall <[email protected]>
Co-authored-by: Steven Gum <[email protected]>

* exclude browser*.js from bf-connector .nycrc
* other minor cleanup in bf-connector

* Change vmImage to ubuntu for all JS pipelines (#2931)

* Switch to ubuntu vmimage

* Tweak sed commands

* Add ubuntu to the other builds

* Add var NoPublish

* Fix NoPublish logic

* Rename var to DoNotPublishPackages

* Remove DoNotPublishPackages functionality. Instead we limit automatic releases to main branch.

* Fix Package Names task

Co-authored-by: Steven Gum <[email protected]>

Co-authored-by: Zichuan Ma <[email protected]>
Co-authored-by: Josh Gummersall <[email protected]>
Co-authored-by: BruceHaley <[email protected]>
Base automatically changed from jpg/skills-without-appid-password to main October 21, 2020 19:04
Copy link
Member

@stevengum stevengum left a comment

Choose a reason for hiding this comment

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

:shipit:

Comment on lines +329 to +332
// Note: the original activity ID is passed back here to provide "behavioral" parity with the C# SDK. Due to
// some inconsistent method signatures, the proper response is not propagated back through `context.updateActivity`
// so we have to manually pass this value back.
return { id: activityId };
Copy link
Member

Choose a reason for hiding this comment

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

This is painful but true... Truth be told, I don't understand the scenario where I would need the activity.id of the activity I just updated (when I needed the activity.id to update it). Especially because the activity.id doesn't change on update. But we might as well take it. 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should resolve this entirely by making the updateActivity method return a response as it does in C#. I'll file a separate issue for that parity work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joshgummersall joshgummersall merged commit b685c12 into main Oct 21, 2020
@joshgummersall joshgummersall deleted the jpg/skills-update-delete-activities branch October 21, 2020 22:04
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.

I can Update and Delete activities from a Skill (JS)
3 participants