Describe the bug
I am trying to publish my bot service to the azure bot service using azure cli but I got the below error
[email protected] publish /Users/macbook/Workspace/bot/botName
az bot publish --name [botName] --resource-group [resourceGroup] --subscription 'subscription' --code-dir [codeDirectory] --verbose --version v4
The behavior of this command has been altered by the following extension: botservice
Creating upload zip file.
Creating upload zip file, code directory ../botName.
Adding node_modules to folders to exclude from zip file.
Compressing bot source into /Users/macbook/Workspace/bot/botName/upload.zip.
Zip file path created, at /Users/macbook/Workspace/bot/botName/upload.zip.
__init__() missing 1 required positional argument: 'logger'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 328, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 386, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 379, in _run_job
six.reraise(sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 356, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 171, in __call__
return self.handler(args, kwargs)
File "/usr/local/Cellar/azure-cli/2.0.57/libexec/lib/python3.7/site-packages/azure/cli/core/__init__.py", line 441, in default_command_handler
return op(command_args)
File "/Users/macbook/.azure/cliextensions/botservice/azext_bot/custom.py", line 86, in publish_app
kudu_client = KuduClient(cmd, resource_group_name, resource_name, bot)
TypeError: __init__() missing 1 required positional argument: 'logger'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] publish: 'az bot publish --name [botName] --resource-group [resourceGroup] --subscription 'subscription' --code-dir [codeDirectory] --verbose --version v4'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] publish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/macbook/.npm/_logs/2019-02-07T12_20_21_780Z-debug.log
To Reproduce
Inside the sample code that you can download from azure bot service you can run the following command
az bot publish --name [botName] --resource-group [resourceGroup] --subscription 'subscription' --code-dir [codeDirectory] --verbose --version v4
Expected behavior
The sample bot code get successfully uploaded.
Environment summary
Install Method
brew update && brew install azure-cli
CLI version
azure-cli (2.0.57)
acr (2.1.13)
acs (2.3.16)
advisor (2.0.0)
ams (0.4.0)
appservice (0.2.12)
backup (1.2.1)
batch (3.4.1)
batchai (0.4.7)
billing (0.2.0)
botservice (0.1.5)
cdn (0.2.0)
cloud (2.1.0)
cognitiveservices (0.2.4)
command-modules-nspkg (2.0.2)
configure (2.0.20)
consumption (0.4.2)
container (0.3.13)
core (2.0.57)
cosmosdb (0.2.7)
dla (0.2.3)
dls (0.1.7)
dms (0.1.2)
eventgrid (0.2.1)
eventhubs (0.3.3)
extension (0.2.3)
feedback (2.1.4)
find (0.2.13)
hdinsight (0.3.0)
interactive (0.4.1)
iot (0.3.5)
iotcentral (0.1.5)
keyvault (2.2.10)
kusto (0.1.0)
lab (0.1.5)
maps (0.3.3)
monitor (0.2.9)
network (2.3.1)
nspkg (3.0.3)
policyinsights (0.1.0)
profile (2.1.3)
rdbms (0.3.6)
redis (0.3.2)
relay (0.1.3)
reservations (0.4.1)
resource (2.1.9)
role (2.3.1)
search (0.1.1)
security (0.1.0)
servicebus (0.3.3)
servicefabric (0.1.12)
signalr (1.0.0)
sql (2.1.8)
sqlvirtualmachine (0.1.0)
storage (2.3.1)
telemetry (1.0.1)
vm (2.2.14)
Extensions:
botservice (0.4.3)
Python location '/usr/local/opt/python/bin/python3.7'
Extensions directory '/Users/macbook/.azure/cliextensions'
Python (Darwin) 3.7.2 (default, Jan 13 2019, 12:50:01)
[Clang 10.0.0 (clang-1000.11.45.5)]
Legal docs and information: aka.ms/AzureCliLegal
OS version
MacOs - Mojave
Shell Type
bash
Additional context
@tjprescott What is this supposed to mean ?
@mohammedibrahim do you mean the error or the labeling? The labeling is simply a convention within our team. These commands are maintained by the Bot Service team, and most issues are initially flagged with "Question".
Since this throws a stack trace, we would consider it a bug.
@tjprescott I meant the labeling yes.
Thanks for the clarification
@tjprescott Any updates regarding this issue ?
@stevengum can you comment?
@mohammedibrahim, please uninstall the botservice extension via az extension -n botservice
The version of azure cli that you鈥檙e using does not need the botservice extension, all the functionality is already in the core botservice command module.
Let us know if that unblocks you, thanks!
@stevengum your module has the code that should suppress the extension. Does it need to be updated? If a bug from the extension is still expressing itself despite the suppression, there may be an CLI core bug.
@tjprescott it looks like we haven't updated the extension supression as it still targets 0.4.1 and lower, I'll cut a PR to fix this.
Thanks @stevengum!
@stevengum
Thanks for your reply
I tried this command:
az extension -n botservice
but it gives me this error
az extension: 'botservice' is not in the 'az extension' command group. See 'az extension --help'.
I think you missed the remove argument so the command must be:
az extension remove -n botservice