-
Notifications
You must be signed in to change notification settings - Fork 109
Added support for --bind flag in bundle generate
#3782
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
Conversation
73 failing tests:
|
| @@ -0,0 +1,26 @@ | |||
| # This test is using a workspace import API to load a notebook file. | |||
| # This API has a logic on how to accept notebook files and distinguishes them from regular python files. | |||
| # To succeed locally we would need to replicate this logic in the fake_workspace | |||
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.
Worth doing some time?
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.
Certainly, there are a bunch of other tests that need this, worth doing this as a separate PR
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.
forgot to publish my review last week.
| Two-step workflow (manual bind): | ||
| 1. Generate: databricks bundle generate job --existing-job-id 123 --key my_job | ||
| 2. Bind: databricks bundle deployment bind my_job 123 | ||
| 3. Deploy: databricks bundle deploy | ||
| One-step workflow (automatic bind): | ||
| 1. Generate and bind: databricks bundle generate job --existing-job-id 123 --key my_job --bind | ||
| 2. Deploy: databricks bundle deploy |
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.
nit:
| Two-step workflow (manual bind): | |
| 1. Generate: databricks bundle generate job --existing-job-id 123 --key my_job | |
| 2. Bind: databricks bundle deployment bind my_job 123 | |
| 3. Deploy: databricks bundle deploy | |
| One-step workflow (automatic bind): | |
| 1. Generate and bind: databricks bundle generate job --existing-job-id 123 --key my_job --bind | |
| 2. Deploy: databricks bundle deploy | |
| Three-step workflow (manual bind): | |
| 1. Generate: databricks bundle generate job --existing-job-id 123 --key my_job | |
| 2. Bind: databricks bundle deployment bind my_job 123 | |
| 3. Deploy: databricks bundle deploy | |
| Two-step workflow (automatic bind): | |
| 1. Generate and bind: databricks bundle generate job --existing-job-id 123 --key my_job --bind | |
| 2. Deploy: databricks bundle deploy |
| // This function is shared between the bind command and generate commands with --bind flag. | ||
| func BindResource(cmd *cobra.Command, resourceKey, resourceId string, autoApprove, forceLock bool) error { | ||
| ctx := cmd.Context() | ||
| b := utils.ConfigureBundleWithVariables(cmd) |
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.
Note: This means functions like root.MustConfigureBundle end up being called twice on the command struct.
| } | ||
|
|
||
| if !exists { | ||
| return fmt.Errorf("%s with an id '%s' is not found", resource.ResourceDescription().SingularName, resourceId) |
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.
grammer nit:
| return fmt.Errorf("%s with an id '%s' is not found", resource.ResourceDescription().SingularName, resourceId) | |
| return fmt.Errorf("%s with an id '%s' was not found", resource.ResourceDescription().SingularName, resourceId) |
## Release v0.275.0 ### Notable Changes * Python support for Databricks Asset Bundles is now generally available. ### CLI * Remove `inplace` mode for the `--progress-format` flag ([#3811](#3811)) * Remove `json` mode for the `--progress-format` flag ([#3812](#3812)) * Deprecate the `--progress-format` flag ([#3819](#3819)) ### Bundles * Add support for `--bind` flag in `bundle generate` ([#3782](#3782)) * Add `pydabs` template replacing `experimental-jobs-as-code` template ([#3806](#3806)) * You can now use the top-level `python` section instead of `experimental/python` ([#3540](#3540))
Changes
Added support for --bind flag in
bundle generateWhy
This allows us to generate and bind the resources using one command instead of 2 separate commands.
Tests
Added an acceptance test