mirror of https://github.com/databricks/cli.git
3700785dfa
## Changes Updates to bundle templates can require updated versions of the CLI. This PR extends the JSON schema representation to allow template authors to set a min CLI version they require for their templates. This is required to make improvements/additions to the mlops-stacks repo ## Tests Tested using unit tests and manually. For manualy testing, I created a custom build of the CLI using go releaser and then tested it against a local instance of mlops-stack When mlops-stack schema has: ``` "min_databricks_cli_version": "v5000.1.1", ``` output (error as expected) ``` shreyas.goenka@THW32HFW6T bricks % ./dist/cli_darwin_arm64/databricks bundle init ~/mlops-stack Error: minimum CLI version "v5000.1.1" is greater than current CLI version "v0.207.2-dev+1b992c0". Please upgrade your current Databricks CLI ``` When the mlops-stack schema has: ``` "min_databricks_cli_version": "v0.1.1", ``` output (validation passes) ``` shreyas.goenka@THW32HFW6T bricks % ./dist/cli_darwin_arm64/databricks bundle init ~/mlops-stack Welcome to MLOps Stack. For detailed information on project generation, see the README at https://github.com/databricks/mlops-stack/blob/main/README.md. Project Name [my-mlops-project]: ^C ``` |
||
---|---|---|
.. | ||
acc | ||
build | ||
bundle | ||
python | ||
testdata | ||
testjsons | ||
testutil | ||
alerts_test.go | ||
api_test.go | ||
clusters_test.go | ||
filer_test.go | ||
fs_cat_test.go | ||
fs_cp_test.go | ||
fs_ls_test.go | ||
fs_mkdir_test.go | ||
fs_rm_test.go | ||
git_clone_test.go | ||
helpers.go | ||
init_test.go | ||
jobs_test.go | ||
locker_test.go | ||
repos_test.go | ||
secrets_test.go | ||
sync_test.go | ||
tags_test.go | ||
version_test.go | ||
workspace_test.go |