Uh oh!
There was an error while loading. Please reload this page.
Added support for --bind flag in bundle generate - #3782
Conversation
73 failing tests:
|
Uh oh!
There was an error while loading. Please reload this page.
| @@ -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.
Certainly, there are a bunch of other tests that need this, worth doing this as a separate PR
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
shreyas-goenka
left a comment
There was a problem hiding this comment.
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.
nit:
| Two-stepworkflow (manualbind): | |
| 1. Generate: databricksbundlegeneratejob--existing-job-id123--keymy_job | |
| 2. Bind: databricksbundledeploymentbindmy_job123 | |
| 3. Deploy: databricksbundledeploy | |
| One-stepworkflow (automaticbind): | |
| 1.Generateand bind: databricksbundlegeneratejob--existing-job-id123--keymy_job--bind | |
| 2. Deploy: databricksbundledeploy | |
| Three-stepworkflow (manualbind): | |
| 1. Generate: databricksbundlegeneratejob--existing-job-id123--keymy_job | |
| 2. Bind: databricksbundledeploymentbindmy_job123 | |
| 3. Deploy: databricksbundledeploy | |
| Two-stepworkflow (automaticbind): | |
| 1.Generateand bind: databricksbundlegeneratejob--existing-job-id123--keymy_job--bind | |
| 2. Deploy: databricksbundledeploy |
Uh oh!
There was an error while loading. Please reload this page.
| // 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.
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.
grammer nit:
| returnfmt.Errorf("%s with an id '%s' is not found", resource.ResourceDescription().SingularName, resourceId) | |
| returnfmt.Errorf("%s with an id '%s' was not found", resource.ResourceDescription().SingularName, resourceId) |
Uh oh!
There was an error while loading. Please reload this page.
## 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 generate` ## Why This allows us to generate and bind the resources using one command instead of 2 separate commands. ## Tests Added an acceptance test <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
## 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