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 ``` |
||
---|---|---|
.. | ||
testdata | ||
extension.go | ||
instance.go | ||
instance_test.go | ||
schema.go | ||
schema_order.go | ||
schema_order_test.go | ||
schema_test.go | ||
utils.go | ||
utils_test.go | ||
validate_type.go | ||
validate_type_test.go |