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

Feature request [DAB / CLI] : Return distinct error codes based on failure modes #1444

Open
iandexter opened this issue May 21, 2024 · 0 comments
Labels
CLI CLI related issues Enhancement New feature or request

Comments

@iandexter
Copy link

iandexter commented May 21, 2024

Describe the issue

When databricks bundle run ... fails for some reason, we usually just emit a non-zero code. We should distinguish between client- and server-side errors, eg. Client.Timeout exceeded vs legit job run error.

For context: users may wrap databricks bundle commands inside scripts, and catch errors based on the return codes.

Configuration

Use the basic configuration described here: https://docs.databricks.com/en/workflows/jobs/how-to/use-bundles-with-jobs.html

Steps to reproduce the behavior

  1. Run databricks bundle run ...
  2. If there are any client timeouts, the following error will be produced: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
  3. The return code will be non-zero.

Expected Behavior

There should be distinct, following the pattern in Bash: https://tldp.org/LDP/abs/html/exitcodes.html

Actual Behavior

The error code is just usually "1".

OS and CLI version

Databricks CLI v0.218.0
Darwin KWH5QPFC9G 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64

Is this a regression?

No, it's not.

Debug Logs

No debug logs available. We just capture the return code from the shell.

@iandexter iandexter changed the title Feature request [DAB / CLI] : Return distinct error codes based on failure mode Feature request [DAB / CLI] : Return distinct error codes based on failure modes May 21, 2024
@andrewnester andrewnester added Enhancement New feature or request CLI CLI related issues labels Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI CLI related issues Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants