microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
869 stars 372 forks source link

[Rant] Attempting to deploy a skill and then connect to it from a local root bot is inconsistent and a bit broken #7947

Open JonathanFingold opened 3 years ago

JonathanFingold commented 3 years ago

Description

I can't get the scenario to work in a satisfying or consistent way to fix the documentation for connecting to a remote skill.

This is a blocking issue for the doc, and I will pull this doc from the TOC until next release.

Version

Latest release (non-nightly)

Version: 2.0.0 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0

Discussion

  1. Create a local root and skill bot, similar to what's described in Create and test a local skill.
  2. Publish the skill as a skill.
  3. While it's doing its thing, open the Publish view. When it says "Provision success", open the Create view?! image
    1. Isn't the Export as skill command supposed to provision and publish the skill?
    2. Why is Composer getting confused when I navigate around while it's provisioning things?
    3. Why do I not yet have information about the manifest? Why hasn't the manifest been created already?
  4. Go back to the Publish view. And publish the skill from there, using the profile created in the previous step.
    1. It claims success, but I still don't have my manifest file?
    2. Checking on Azure, whoa, it's there at the app service URL + "/manifests/EchoSkill-2-1-manifest.json".

Well, I didn't get to the other issue I had intended to complain about. Will continue to list my tail of woe in this thread as I try to get my local root bot working with a published remote skill.

JonathanFingold commented 3 years ago

Noticed this bit of UI weirdness today, as I was cleaning up my test bot. The insertion caret is odd here, as the bot names are not editable in the publishing profile view: publish-profiles

JonathanFingold commented 3 years ago

Trying a new tack today:

  1. Clean up the test bot: delete the manifest manually, delete all publishing profiles, delete Azure resources. Then, close and reopen the bot in Composer.
  2. Notice this warning and select the manifest.json link. image
  3. This takes you to the Export your bot page. Fill it out and the rest of the pages in the flow and select Create new publish profile. The UI here is a bit weird, too, as the page only has a Cancel button at the bottom, and you need to click the link text near the top of the page to continue. Unfortunately, I didn't think to take a screen shot of that.
  4. Create a publishing profile for the skill: create new resources, deselect all optional resources...again, and select Create. Composer begins to provision the skill, then to publish it.
    • Not sure automatically publishing the skill is called for here, as the warning went away after the provisioning step.
  5. This time, I'm rewarded with a manifest!
  6. Try to add the remote version of the skill to my [root bot] project.
  7. The Connect to a skill page pops up. Select Cancel, as I will do the App ID and Password dance later.
    • I am a little confused that my root bot already appears to have an app ID, though. image
    • Error: the remote skill has not been added to the project!
    • Repeat the previous step after cursing the gods, but this time copy the app ID and select Next to presumably select app ID and password.
    • Error 2: since the skill is already allowing all callers by using "*", this is not necessary. The description reads, "To ensure a secure connection, the remote skill needs to know the Microsoft App ID of your bot."
    • Error 3: On the next page, I get this, which claims to be now gathering information about the remote skill for my root bot?! This is the opposite of what I'd expect, given the description on the previous page. Plus, the skill's app ID is in the skill's manifest. image
    • Select Cancel, because I lost the app ID that had been in the clipboard...
    • Error 4: Go to add the remote skill again and immediately end up back on the Add a skill page that's asking for the skill's app ID.

Checking the detritus of this attempt, the skill manifest on Azure looks like this:

{
  "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json",
  "$id": "EchoSkill-a193397c-b7c7-45f1-ba1d-08386346f3b8",
  "endpoints": [
    {},
    {
      "protocol": "BotFrameworkV3",
      "name": "skill",
      "endpointUrl": "https://v-jofin-skill.azurewebsites.net/api/messages",
      "description": "<description>",
      "msAppId": "83a0a1c4-2bea-4a06-b119-b99f2409f2a8"
    }
  ],
  "name": "EchoSkill",
  "version": "0.9.1",
  "publisherName": "me",
  "activities": {
    "EchoSkill": {
      "type": "event",
      "name": "EchoSkill"
    }
  }
}

The local manifest looks like this (before any hand editing):

{
  "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json",
  "$id": "EchoSkill-a193397c-b7c7-45f1-ba1d-08386346f3b8",
  "endpoints": [
    {}
  ],
  "name": "EchoSkill",
  "version": "0.9.1",
  "publisherName": "me",
  "activities": {
    "EchoSkill": {
      "type": "event",
      "name": "EchoSkill"
    }
  }
}

Postscript:

  1. I hand edited the local manifest, and scratched my head a bit about how I was supposed to push those changes out, Publish as skill again or just publish from the existing profile. I decided to try publishing from the existing profile.
  2. I selected the profile and chose Edit, since I wanted to double check the properties.
  3. I'm unexpectedly take through the dialog sequence again, just this time with some of the values prefilled. o_O
  4. I end up on a bizarre version of the Add resources page where
    1. The required resources aren't present (sort of expected) but the description at the top of the page is the same (unexpected and disconcerting).
    2. I need to deselect all the optional resources...again. image
  5. I deselect all the optional resources and the Next button suddenly and inexplicably becomes disabled?!
  6. Hold my nose and cancel out of the editing process.
  7. Try publishing the echo skill with the existing profile.
  8. Well, that at least worked to update the remote skill manifest to a usable state.
JonathanFingold commented 3 years ago

PS. This is not a full catalog of all the different paths I've tried to take. I have not yet successfully got this scenario to work in Composer 2.x.

cwhitten commented 3 years ago

Hey @vivekkshankar I've added you to this to tease apart Jonathan's feedback and tentatively have changes here loaded up for R15.