Botframework-solutions: botskills refresh can't be run in PowerShell task of Azure DevOps release pipelines

Created on 16 Oct 2020  路  10Comments  路  Source: microsoft/botframework-solutions

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]

Bot Services bug customer-replied-to customer-reported in-progress

Most helpful comment

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.

All 10 comments

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

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

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

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?

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.

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.

  1. Have you checked if this happens locally?

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

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

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

@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!

Closing due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lauren-mills picture lauren-mills  路  4Comments

VladPapacostea-SM picture VladPapacostea-SM  路  3Comments

lauren-mills picture lauren-mills  路  3Comments

elaine-chang picture elaine-chang  路  4Comments

esoler-sage picture esoler-sage  路  3Comments