databricks-cli icon indicating copy to clipboard operation
databricks-cli copied to clipboard

cli not writing errors to Standard Error and not returning non zero exit code

Open roberto-mardeni opened this issue 6 years ago • 1 comments

See the following error from using the databricks cli in an Azure DevOps Release Pipeline to import workspace directory:

2019-03-28T15:23:27.8595199Z ##[section]Starting: Deploy Notebooks
2019-03-28T15:23:27.8597863Z ==============================================================================
2019-03-28T15:23:27.8598126Z Task         : Command Line
2019-03-28T15:23:27.8598206Z Description  : Run a command line script using cmd.exe on Windows and bash on macOS and Linux.
2019-03-28T15:23:27.8598359Z Version      : 2.148.0
2019-03-28T15:23:27.8598472Z Author       : Microsoft Corporation
2019-03-28T15:23:27.8598577Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
2019-03-28T15:23:27.8598845Z ==============================================================================
2019-03-28T15:23:27.9864902Z Generating script.
2019-03-28T15:23:27.9889349Z ========================== Starting Command Output ===========================
2019-03-28T15:23:27.9936973Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/6d6a1b77-880f-40de-a017-bf99ce69d3e9.sh
2019-03-28T15:23:28.0020030Z /home/vsts/work/_temp/6d6a1b77-880f-40de-a017-bf99ce69d3e9.sh: line 1: Release.ReleaseNumber: command not found
2019-03-28T15:23:30.2323008Z {u'message': u'[email protected] does not have View permissions on /. Please contact the owner or an administrator for access.', u'error_code': u'PERMISSION_DENIED'}
2019-03-28T15:23:30.2435902Z 0
2019-03-28T15:23:30.2535995Z ##[section]Finishing: Deploy Notebooks

There are 2 problems with how the CLI is treating this error:

  • Exit Code is 0
  • The error message is written to Standard Output instead of Standard Error

This makes it difficult to understand if the tool succeeded or failed.

roberto-mardeni avatar Mar 28 '19 19:03 roberto-mardeni

any update on this?