databricks-cli/libs/template
Lennart Kats (databricks) 08a0d083c3
Ignore metastore permission error during template generation (#1819)
## Changes

This extends the `{{default_catalog}}` helper in templates to ignore any
`PERMISSION_DENIED` error. We're still reviewing when exactly this error
occurs, but if it does, it should not break templates. We should fall
back to assuming there's no default catalog (and no UC) instead.

## Testing

I have not been able to reproduce this issue, but there is a customer
report about "access denied to clusters that don't have unity catalog
enabled" being returned on a non-UC workspace. The error code in this PR
corresponds to that message.

## Next steps
We'll work together with the UC team to review if this error even makes
sense for this API. If that discussion leads to a behavior change in the
API we can update the CLI code again.
2024-10-11 12:28:56 +00:00
..
templates Always prepend bundle remote paths with /Workspace (#1724) 2024-10-02 15:34:00 +00:00
testdata Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
config.go Allow unknown properties in the config file for template initialization (#1315) 2024-03-26 13:02:09 +00:00
config_test.go Make bundle JSON schema modular with `$defs` (#1700) 2024-09-10 13:55:18 +00:00
file.go Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
file_test.go Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
helpers.go Ignore metastore permission error during template generation (#1819) 2024-10-11 12:28:56 +00:00
helpers_test.go Add UUID function to bundle template functions (#1612) 2024-07-19 11:38:20 +00:00
materialize.go Make dbt-sql and default-sql templates public (#1463) 2024-06-04 08:57:13 +00:00
materialize_test.go Improve error message when path is not a bundle template (#985) 2023-11-22 12:25:16 +00:00
renderer.go Update error checks that use the `os` package to use `errors.Is` (#1461) 2024-06-03 12:39:36 +00:00
renderer_test.go Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00