Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

botskills refresh can't be run in PowerShell task of Azure DevOps release pipelines #3693

Closed
ericchansen opened this issue Oct 16, 2020 · 10 comments
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. in-progress The issue is assigned and it is being worked on.

Comments

@ericchansen
Copy link
Contributor

ericchansen commented Oct 16, 2020

Tool

Name: Dispatch
Version: Latest
Agent pool: Azure pipelines
Agent Specification: vs2017-win2016

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Create a template Bot Framework Virtual Assistant
  2. In the release pipeline, install the pre-requisite npm tools and attempt to use botskills refresh --cs ./path/to/cognitivemodels.json --dispatchFolder ./path/to/Deployment/Resources/dispatch.

Regardless of how you install the required npm packages, it will not work. You will get an error similar to this.

2020-10-16T20:44:18.2228935Z }
2020-10-16T20:44:18.2397954Z Running Luis Generate for Masteren-us...
2020-10-16T20:44:18.2400791Z Executing luisgen for the Masteren-us file
2020-10-16T20:44:21.3236825Z There was an error while refreshing any Skill from the Assistant:
2020-10-16T20:44:21.3238398Z Error: There was an error in the bf luis:generate:cs command:
2020-10-16T20:44:21.3240619Z Command: bf luis:generate:cs --in "D:\a\r1\a\_source\zzz\xxx\yyy\Deployment\Resources\dispatch\qa\en-us\Masteren-us.json" --out "D:\a\r1\a\Services\DispatchLuis.cs" --className DispatchLuis --force
2020-10-16T20:44:21.3242335Z Unknown error during execution. Please file an issue on https://github.com/microsoft/botframework-cli/issues
2020-10-16T20:44:21.3243144Z undefined
2020-10-16T20:44:21.3243507Z 

Expected behavior

Same behavior as on local machine.

Additional context

[bug]

@stevengum
Copy link
Member

stevengum commented Oct 19, 2020

@lzc850612 can you investigate this and transfer to the applicable repository? Thanks!

@ericchansen
Copy link
Contributor Author

I'm also happy to provide any details or documentation that you ask for.

@stevengum stevengum assigned stevengum and lzc850612 and unassigned lzc850612 and stevengum Oct 23, 2020
@stevengum
Copy link
Member

@Batta32 can you investigate this issue? @lzc850612 I've reassigned you to the issue as @Batta32 is not a member of the repository.

@Batta32
Copy link
Collaborator

Batta32 commented Oct 23, 2020

Sure @stevengum! We will review it and add any update as soon as possible. Is it possible to transfer the issue to botframework-solutions repository?

@stevengum stevengum transferred this issue from microsoft/botbuilder-tools Oct 23, 2020
@stevengum stevengum added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels Oct 23, 2020
@ericchansen
Copy link
Contributor Author

Thanks for tracking this. Like I said before, I can provide any info you need. I'm just not sure what you'd want to help solve this.

@Batta32
Copy link
Collaborator

Batta32 commented Oct 23, 2020

Thanks @ericchansen for reporting the issue, we came up with some questions so we can narrow the problem:

  1. Which version of botskills are you using in the pipeline?

  2. We noticed that you attempted to use botskills refresh. Is this correct? Have you executed botskills connect before the botskills refresh?

  3. Reviewing the attached botskills refresh:

    botskills refresh --cs ./path/to/cognitivemodels.json --dispatchFolder ./path/to/Deployment/Resources/dispatch.

    Can you confirm that you are passing ./path/to/cognitivemodels.json value to the --cognitiveModelsFile property? See this.

  4. Have you checked if this happens locally?

We will let you know as soon as we have any update on this 😊.

@chrimc62 chrimc62 added the customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. label Oct 26, 2020
@VictorGrycuk
Copy link
Contributor

Hi @ericchansen, we reproduced the issue. The error happens when the bf luis:generate receives an --out path that contains a folder that does not exist.

To reproduce the issue, we manually executed the bf luis:generate:cs command with an --out parameter and got the same error as yours.

We will work on to analyze why this is happening, and we will get back to you once we have an update.

Issue reproduced
image

@peterinnesmsft peterinnesmsft added the in-progress The issue is assigned and it is being worked on. label Nov 2, 2020
@Batta32
Copy link
Collaborator

Batta32 commented Nov 6, 2020

Hi @ericchansen, sorry for the delay. Make sure to point the Working Directory to the root folder of your Virtual Assistant in the botskills refresh task to have the command correctly working.
After this, you can reduce the command as it will infer your folder structure based on --cs, refer to this document for more information.

botskills refresh --cs

Finally, the undefined error is not verbose because bf luis:generate:cs is not catching correctly the error as they are not wrapped in a try/catch sentence like bf luis:generate:ts. We will raise an issue the repository to fix it.

Hope this fix your problem 😊.

Powershell task with Botskills refresh command configuration
image

Botskills refresh running successfully in Pipelines
image

@Batta32
Copy link
Collaborator

Batta32 commented Nov 13, 2020

@peterinnesmsft - we can close the issue due to inactivity. @ericchansen if you are still experiencing issues, feel free to reactivate and we can pick this up again, or create a new issue!

@stevengum
Copy link
Member

Closing due to inactivity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. in-progress The issue is assigned and it is being worked on.
Projects
None yet
Development

No branches or pull requests

7 participants