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

e2e testing: Using Get LUIS or Get QnA Key option does not work in Composer #6963

Closed
2 of 8 tasks
Kaiqb opened this issue Apr 14, 2021 · 11 comments · Fixed by #7553, #7575 or #7623
Closed
2 of 8 tasks

e2e testing: Using Get LUIS or Get QnA Key option does not work in Composer #6963

Kaiqb opened this issue Apr 14, 2021 · 11 comments · Fixed by #7553, #7575 or #7623
Assignees
Labels
Area: Publish P0 Must Fix. Release-blocker ShipRoom-Approved Ship room has approved this issue for the release Type: Bug Something isn't working
Milestone

Comments

@Kaiqb
Copy link
Contributor

Kaiqb commented Apr 14, 2021

Creating QnA and LUIS resources for an Enterprise Bot using "Get LUIS keys" and "Get QnA keys" does not work

Version

image

Browser

  • Electron distribution
  • Chrome
  • Safari
  • Firefox
  • Edge

OS

  • macOS
  • Windows
  • Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Create an Enterprise bot in Composer
  2. Click on 'Project Settings' in left nav to go to the following page

image

  1. Click on 'Get LUIS keys', the dialog box is greyed out, see below:
    image

Note: QnA keys also show a dialog that has the subscription greyed out.

Expected behavior

I should be able to select the subscription and proceed.

@Kaiqb Kaiqb added Type: Bug Something isn't working Needs-triage A new issue that require triage labels Apr 14, 2021
@cwhitten cwhitten added this to the R13 milestone Apr 14, 2021
@srinaath srinaath assigned pavolum and unassigned GeoffCoxMSFT Apr 15, 2021
@srinaath srinaath removed the Needs-triage A new issue that require triage label Apr 15, 2021
@srinaath
Copy link
Contributor

@pavolum Can you verify this fix?

@Dewain27
Copy link
Contributor

This seems associated to the non-corporate logon. We need to test it that way, it seems to not be an issue with Enterprise logons.

@cwhitten cwhitten added the P0 Must Fix. Release-blocker label Apr 21, 2021
@pavolum
Copy link
Contributor

pavolum commented Apr 26, 2021

I am able to repro a bug with a non organizational account but now get blocked at this modal
image

@cwhitten
Copy link
Member

History:

#5706

#6112

@cwhitten
Copy link
Member

@a-b-r-o-w-n can you work with Patrick on understanding the delta with this dialog?

@cwhitten cwhitten added the ShipRoom-Approved Ship room has approved this issue for the release label Apr 27, 2021
@benbrown
Copy link
Contributor

Based on #6112 this seems reasonable.

The key thing I need @a-b-r-o-w-n to way in on is whether a tenant SELECTION is required here...

@benbrown benbrown self-assigned this Apr 27, 2021
@a-b-r-o-w-n
Copy link
Contributor

I did some digging on this today and unfortunately didn't make much progress. I am able to sign in with an MSA account during provisioning so I suspect that tenant selection / arm token will be required. I plan on testing this 1st thing in the morning with a signed build.

@a-b-r-o-w-n
Copy link
Contributor

I have identified the root cause. We need to get an ARM token in order to work with MSA accounts. We will need to port the tenant selection UX from azureProvisionDialog.tsx to ManageService.tsx as well as ABSChannels.tsx. I have also written a guide to help the engineering effort.

Getting an ARM token process

ARM tokens are required for managing Azure resources with MSA accounts (personal accounts). Here is the process to get an ARM token for a user.

  1. Invoke the getTenants() api. This initiates a login flow which returns a token that is valid to request the list of tenants (aka directories) that a user belongs to.
  2. Once the tenants are fetched, show some UI so that the user can select which tenant they want to modify resources in.
  3. Once the user selects a tenant, use the getArmTokenForTenant(tenantId) api to fetch a token that is valid for interacting with Azure resources.

Use the code in azureProvisionDialog.tsx as a guide — pay attention to error handling at each step and handle the errors based on your specific scenario.

fetching tenants example - https://github.com/microsoft/BotFramework-Composer/blob/main/extensions/azurePublish/src/components/azureProvisionDialog.tsx#L443
fetching an arm token example - https://github.com/microsoft/BotFramework-Composer/blob/main/extensions/azurePublish/src/components/azureProvisionDialog.tsx#L485

@a-b-r-o-w-n a-b-r-o-w-n removed their assignment Apr 28, 2021
@cwhitten cwhitten assigned VamsiModem and unassigned benbrown and pavolum Apr 28, 2021
@cwhitten
Copy link
Member

@VamsiModem will need a design peer on this. @emivers8 would this be you?

@benbrown
Copy link
Contributor

Just to re-iterate what @a-b-r-o-w-n said, this problem also exists on the 'connections' section of the settings page, and would hopefully also be addressed by this solution.

@sgellock
Copy link
Member

sgellock commented May 3, 2021

Shiproom - we need to get this in by Tuesday please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment