-
Notifications
You must be signed in to change notification settings - Fork 134
aitools: Fix default_catalog handling in init-template commands #4312
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
base: main
Are you sure you want to change the base?
Conversation
Don't set default_catalog in config map when catalog flag is empty. This lets the template schema default handle the fallback to hive_metastore, instead of passing an empty string which bypasses the default. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Commit: 841156f
27 interesting tests: 23 KNOWN, 2 flaky, 1 SKIP, 1 FAIL
Top 42 slowest tests (at least 2 minutes):
|
denik
left a comment
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.
Generated projects that used the default template were getting an empty catalog: field instead of using the workspace default.
q - is there an acceptance test? this is something that would be easy to notice there.
Thanks for asking! We have acceptance tests under https://github.com/databricks/cli/blob/main/acceptance/apps/init-template/job/script, but they only test the CLI output. I'd rather not include the full template output there since the template used is 100% the same as the standard default-python/default-empty templates. So the only thing that's not exercised by the existing acceptance tests is the way parameters are passed via Go code here rather than by shell invocations. (And passing a key + empty value in Go was resulting in unexpected behavior.) So altogether, I don't think it's really worth the overhead of adding acceptance test outputs that need to be updated for all future template changes. |
Changes
Only set
default_catalogwhen explicitly provided via--catalogflag.Why
Generated projects that used the
defaulttemplate were getting an emptycatalog:field instead of using the workspace default.