-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for installing the CLI on DBR #85
Conversation
run: ./setup-cli/install.sh | ||
shell: bash | ||
env: | ||
DATABRICKS_RUNTIME_VERSION: value-does-not-matter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this env variable always set on DBR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it's not documented to be guaranteed, it's been present on all clusters I have tried out and is very well-established as a rubric to detect that code is being run from DBR.
For example, Mlflow also uses the same check here
https://github.com/mlflow/mlflow/blob/30462203357010cba51d743a96c0cae5397e7e1b/mlflow/utils/databricks_utils.py#L180
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to install the CLI at $HOME/bin when the
install.sh
installation script is invoked from DBR. This allows us to provide the CLI in DBR though a proxy trampoline script that's installed in DBR at/usr/local/bin
.This PR also adds a couple of tests and assertions to make this functionality robust for use in DBR.