mirror of https://github.com/databricks/cli.git
Compare commits
4 Commits
dfa6efdef2
...
95673233b9
Author | SHA1 | Date |
---|---|---|
|
95673233b9 | |
|
8d849fe868 | |
|
f2096eddcc | |
|
b151ed7572 |
4
Makefile
4
Makefile
|
@ -28,7 +28,7 @@ test:
|
||||||
|
|
||||||
cover:
|
cover:
|
||||||
rm -fr ./acceptance/build/cover/
|
rm -fr ./acceptance/build/cover/
|
||||||
CLI_GOCOVERDIR=build/cover ${GOTESTSUM_CMD} -- -coverprofile=coverage.txt ${PACKAGES}
|
VERBOSE_TEST=1 CLI_GOCOVERDIR=build/cover ${GOTESTSUM_CMD} -- -coverprofile=coverage.txt ${PACKAGES}
|
||||||
rm -fr ./acceptance/build/cover-merged/
|
rm -fr ./acceptance/build/cover-merged/
|
||||||
mkdir -p acceptance/build/cover-merged/
|
mkdir -p acceptance/build/cover-merged/
|
||||||
go tool covdata merge -i $$(printf '%s,' acceptance/build/cover/* | sed 's/,$$//') -o acceptance/build/cover-merged/
|
go tool covdata merge -i $$(printf '%s,' acceptance/build/cover/* | sed 's/,$$//') -o acceptance/build/cover-merged/
|
||||||
|
@ -61,6 +61,6 @@ integration: vendor
|
||||||
$(INTEGRATION)
|
$(INTEGRATION)
|
||||||
|
|
||||||
integration-short: vendor
|
integration-short: vendor
|
||||||
$(INTEGRATION) -short
|
VERBOSE_TEST=1 $(INTEGRATION) -short
|
||||||
|
|
||||||
.PHONY: lint tidy lintcheck fmt test cover showcover build snapshot vendor schema integration integration-short acc-cover acc-showcover docs
|
.PHONY: lint tidy lintcheck fmt test cover showcover build snapshot vendor schema integration integration-short acc-cover acc-showcover docs
|
||||||
|
|
|
@ -30,8 +30,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
KeepTmp bool
|
KeepTmp bool
|
||||||
NoRepl bool
|
NoRepl bool
|
||||||
|
VerboseTest bool = os.Getenv("VERBOSE_TEST") != ""
|
||||||
)
|
)
|
||||||
|
|
||||||
// In order to debug CLI running under acceptance test, set this to full subtest name, e.g. "bundle/variables/empty"
|
// In order to debug CLI running under acceptance test, set this to full subtest name, e.g. "bundle/variables/empty"
|
||||||
|
@ -261,7 +262,7 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont
|
||||||
// 2. The test is configured to record requests and assert on them. We need
|
// 2. The test is configured to record requests and assert on them. We need
|
||||||
// a duplicate of the default server to record requests because the default
|
// a duplicate of the default server to record requests because the default
|
||||||
// server otherwise is a shared resource.
|
// server otherwise is a shared resource.
|
||||||
if len(config.Server) > 0 || config.RecordRequests {
|
if cloudEnv == "" && (len(config.Server) > 0 || config.RecordRequests) {
|
||||||
server = testserver.New(t)
|
server = testserver.New(t)
|
||||||
server.RecordRequests = config.RecordRequests
|
server.RecordRequests = config.RecordRequests
|
||||||
server.IncludeRequestHeaders = config.IncludeRequestHeaders
|
server.IncludeRequestHeaders = config.IncludeRequestHeaders
|
||||||
|
@ -412,7 +413,7 @@ func doComparison(t *testing.T, repls testdiff.ReplacementsContext, dirRef, dirN
|
||||||
testutil.WriteFile(t, pathRef, valueNew)
|
testutil.WriteFile(t, pathRef, valueNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !equal && printedRepls != nil && !*printedRepls {
|
if VerboseTest && !equal && printedRepls != nil && !*printedRepls {
|
||||||
*printedRepls = true
|
*printedRepls = true
|
||||||
var items []string
|
var items []string
|
||||||
for _, item := range repls.Repls {
|
for _, item := range repls.Repls {
|
||||||
|
|
|
@ -10,6 +10,8 @@ description: Learn about resources supported by Databricks Asset Bundles and how
|
||||||
|
|
||||||
This article outlines supported resource types for bundles and provides details and an example for each supported type. For additional examples, see [_](/dev-tools/bundles/resource-examples.md).
|
This article outlines supported resource types for bundles and provides details and an example for each supported type. For additional examples, see [_](/dev-tools/bundles/resource-examples.md).
|
||||||
|
|
||||||
|
.. tip:: To generate YAML for any existing resource, use the `databricks bundle generate` command. See [_](/dev-tools/cli/bundle-commands.md#generate).
|
||||||
|
|
||||||
## <a id="resource-types"></a> Supported resources
|
## <a id="resource-types"></a> Supported resources
|
||||||
|
|
||||||
The following table lists supported resource types for bundles. Some resources can be created by defining them in a bundle and deploying the bundle, and some resources only support referencing an existing resource to include in the bundle.
|
The following table lists supported resource types for bundles. Some resources can be created by defining them in a bundle and deploying the bundle, and some resources only support referencing an existing resource to include in the bundle.
|
||||||
|
@ -19,53 +21,112 @@ Resources are defined using the corresponding [Databricks REST API](/api/workspa
|
||||||
.. tip:: The `databricks bundle validate` command returns warnings if unknown resource properties are found in bundle configuration files.
|
.. tip:: The `databricks bundle validate` command returns warnings if unknown resource properties are found in bundle configuration files.
|
||||||
|
|
||||||
|
|
||||||
.. list-table::
|
.. azure-aws::
|
||||||
:header-rows: 1
|
|
||||||
|
|
||||||
* - Resource
|
.. list-table::
|
||||||
- Create support
|
:header-rows: 1
|
||||||
- Corresponding REST API object
|
|
||||||
|
|
||||||
* - [cluster](#cluster)
|
* - Resource
|
||||||
- ✓
|
- Create support
|
||||||
- [Cluster object](/api/workspace/clusters/create)
|
- Corresponding REST API object
|
||||||
|
|
||||||
* - [dashboard](#dashboard)
|
* - [app](#apps)
|
||||||
-
|
- ✓
|
||||||
- [Dashboard object](/api/workspace/lakeview/create)
|
- [App object](/api/workspace/apps/create)
|
||||||
|
|
||||||
* - [experiment](#experiment)
|
* - [cluster](#clusters)
|
||||||
- ✓
|
- ✓
|
||||||
- [Experiment object](/api/workspace/experiments/createexperiment)
|
- [Cluster object](/api/workspace/clusters/create)
|
||||||
|
|
||||||
* - [job](#job)
|
* - [dashboard](#dashboards)
|
||||||
- ✓
|
-
|
||||||
- [Job object](/api/workspace/jobs/create)
|
- [Dashboard object](/api/workspace/lakeview/create)
|
||||||
|
|
||||||
* - [model (legacy)](#model-legacy)
|
* - [experiment](#experiments)
|
||||||
- ✓
|
- ✓
|
||||||
- [Model (legacy) object](/api/workspace/modelregistry/createmodel)
|
- [Experiment object](/api/workspace/experiments/createexperiment)
|
||||||
|
|
||||||
* - [model_serving_endpoint](#model-serving-endpoint)
|
* - [job](#jobs)
|
||||||
- ✓
|
- ✓
|
||||||
- [Model serving endpoint object](/api/workspace/servingendpoints/create)
|
- [Job object](/api/workspace/jobs/create)
|
||||||
|
|
||||||
* - [pipeline](#pipeline)
|
* - [model (legacy)](#models)
|
||||||
- ✓
|
- ✓
|
||||||
- [Pipeline object](/api/workspace/pipelines/create)
|
- [Model (legacy) object](/api/workspace/modelregistry/createmodel)
|
||||||
|
|
||||||
* - [quality_monitor](#quality-monitor)
|
* - [model_serving_endpoint](#model_serving_endpoints)
|
||||||
- ✓
|
- ✓
|
||||||
- [Quality monitor object](/api/workspace/qualitymonitors/create)
|
- [Model serving endpoint object](/api/workspace/servingendpoints/create)
|
||||||
|
|
||||||
* - [registered_model](#registered-model) (<UC>)
|
* - [pipeline](#pipelines)
|
||||||
- ✓
|
- ✓
|
||||||
- [Registered model object](/api/workspace/registeredmodels/create)
|
- [Pipeline object]](/api/workspace/pipelines/create)
|
||||||
|
|
||||||
* - [schema](#schema) (<UC>)
|
* - [quality_monitor](#quality_monitors)
|
||||||
- ✓
|
- ✓
|
||||||
- [Schema object](/api/workspace/schemas/create)
|
- [Quality monitor object](/api/workspace/qualitymonitors/create)
|
||||||
|
|
||||||
* - [volume](#volume) (<UC>)
|
* - [registered_model](#registered_models) (<UC>)
|
||||||
- ✓
|
- ✓
|
||||||
- [Volume object](/api/workspace/volumes/create)
|
- [Registered model object](/api/workspace/registeredmodels/create)
|
||||||
|
|
||||||
|
* - [schema](#schemas) (<UC>)
|
||||||
|
- ✓
|
||||||
|
- [Schema object](/api/workspace/schemas/create)
|
||||||
|
|
||||||
|
* - [volume](#volumes) (<UC>)
|
||||||
|
- ✓
|
||||||
|
- [Volume object](/api/workspace/volumes/create)
|
||||||
|
|
||||||
|
.. gcp::
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Resource
|
||||||
|
- Create support
|
||||||
|
- Corresponding REST API object
|
||||||
|
|
||||||
|
* - [cluster](#clusters)
|
||||||
|
- ✓
|
||||||
|
- [Cluster object](/api/workspace/clusters/create)
|
||||||
|
|
||||||
|
* - [dashboard](#dashboards)
|
||||||
|
-
|
||||||
|
- [Dashboard object](/api/workspace/lakeview/create)
|
||||||
|
|
||||||
|
* - [experiment](#experiments)
|
||||||
|
- ✓
|
||||||
|
- [Experiment object](/api/workspace/experiments/createexperiment)
|
||||||
|
|
||||||
|
* - [job](#job)
|
||||||
|
- ✓
|
||||||
|
- [Job object](/api/workspace/jobs/create)
|
||||||
|
|
||||||
|
* - [model (legacy)](#models)
|
||||||
|
- ✓
|
||||||
|
- [Model (legacy) object](/api/workspace/modelregistry/createmodel)
|
||||||
|
|
||||||
|
* - [model_serving_endpoint](#model_serving_endpoints)
|
||||||
|
- ✓
|
||||||
|
- [Model serving endpoint object](/api/workspace/servingendpoints/create)
|
||||||
|
|
||||||
|
* - [pipeline](#pipelines)
|
||||||
|
- ✓
|
||||||
|
- [Pipeline object]](/api/workspace/pipelines/create)
|
||||||
|
|
||||||
|
* - [quality_monitor](#quality_monitors)
|
||||||
|
- ✓
|
||||||
|
- [Quality monitor object](/api/workspace/qualitymonitors/create)
|
||||||
|
|
||||||
|
* - [registered_model](#registered_models) (<UC>)
|
||||||
|
- ✓
|
||||||
|
- [Registered model object](/api/workspace/registeredmodels/create)
|
||||||
|
|
||||||
|
* - [schema](#schemas) (<UC>)
|
||||||
|
- ✓
|
||||||
|
- [Schema object](/api/workspace/schemas/create)
|
||||||
|
|
||||||
|
* - [volume](#volumes) (<UC>)
|
||||||
|
- ✓
|
||||||
|
- [Volume object](/api/workspace/volumes/create)
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
github.com/databricks/cli/bundle/config.Artifact:
|
github.com/databricks/cli/bundle/config.Artifact:
|
||||||
"build":
|
"build":
|
||||||
"description": |-
|
"description": |-
|
||||||
An optional set of non-default build commands to run locally before deployment.
|
An optional set of build commands to run locally before deployment.
|
||||||
"executable":
|
"executable":
|
||||||
"description": |-
|
"description": |-
|
||||||
The executable type. Valid values are `bash`, `sh`, and `cmd`.
|
The executable type. Valid values are `bash`, `sh`, and `cmd`.
|
||||||
"files":
|
"files":
|
||||||
"description": |-
|
"description": |-
|
||||||
The source files for the artifact.
|
The relative or absolute path to the built artifact files.
|
||||||
"path":
|
"path":
|
||||||
"description": |-
|
"description": |-
|
||||||
The location where the built artifact will be saved.
|
The local path of the directory for the artifact.
|
||||||
"type":
|
"type":
|
||||||
"description": |-
|
"description": |-
|
||||||
Required. The type of the artifact.
|
Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`.
|
||||||
"markdown_description": |-
|
"markdown_description": |-
|
||||||
Required. The type of the artifact. Valid values are `whl`.
|
Required. The type of the artifact. Valid values are `whl`.
|
||||||
github.com/databricks/cli/bundle/config.ArtifactFile:
|
github.com/databricks/cli/bundle/config.ArtifactFile:
|
||||||
"source":
|
"source":
|
||||||
"description": |-
|
"description": |-
|
||||||
Required. The path of the files used to build the artifact.
|
Required. The artifact source file.
|
||||||
github.com/databricks/cli/bundle/config.Bundle:
|
github.com/databricks/cli/bundle/config.Bundle:
|
||||||
"cluster_id":
|
"cluster_id":
|
||||||
"description": |-
|
"description": |-
|
||||||
|
@ -28,7 +28,7 @@ github.com/databricks/cli/bundle/config.Bundle:
|
||||||
The ID of a cluster to use to run the bundle. See [_](/dev-tools/bundles/settings.md#cluster_id).
|
The ID of a cluster to use to run the bundle. See [_](/dev-tools/bundles/settings.md#cluster_id).
|
||||||
"compute_id":
|
"compute_id":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
Deprecated. The ID of the compute to use to run the bundle.
|
||||||
"databricks_cli_version":
|
"databricks_cli_version":
|
||||||
"description": |-
|
"description": |-
|
||||||
The Databricks CLI version to use for the bundle.
|
The Databricks CLI version to use for the bundle.
|
||||||
|
@ -225,7 +225,7 @@ github.com/databricks/cli/bundle/config.Root:
|
||||||
"description": |-
|
"description": |-
|
||||||
Specifies a list of path globs that contain configuration files to include within the bundle.
|
Specifies a list of path globs that contain configuration files to include within the bundle.
|
||||||
"markdown_description": |-
|
"markdown_description": |-
|
||||||
Specifies a list of path globs that contain configuration files to include within the bundle. See [_](/dev-tools/bundles/settings.md#include)
|
Specifies a list of path globs that contain configuration files to include within the bundle. See [_](/dev-tools/bundles/settings.md#include).
|
||||||
"permissions":
|
"permissions":
|
||||||
"description": |-
|
"description": |-
|
||||||
Defines a permission for a specific entity.
|
Defines a permission for a specific entity.
|
||||||
|
@ -414,57 +414,47 @@ github.com/databricks/cli/bundle/config/resources.Permission:
|
||||||
"user_name":
|
"user_name":
|
||||||
"description": |-
|
"description": |-
|
||||||
The name of the user that has the permission set in level.
|
The name of the user that has the permission set in level.
|
||||||
github.com/databricks/cli/bundle/config/resources.Pipeline:
|
|
||||||
"allow_duplicate_names":
|
|
||||||
"description": |-
|
|
||||||
PLACEHOLDER
|
|
||||||
"dry_run":
|
|
||||||
"description": |-
|
|
||||||
PLACEHOLDER
|
|
||||||
"run_as":
|
|
||||||
"description": |-
|
|
||||||
PLACEHOLDER
|
|
||||||
github.com/databricks/cli/bundle/config/variable.Lookup:
|
github.com/databricks/cli/bundle/config/variable.Lookup:
|
||||||
"alert":
|
"alert":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the alert for which to retrieve an ID.
|
||||||
"cluster":
|
"cluster":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the cluster for which to retrieve an ID.
|
||||||
"cluster_policy":
|
"cluster_policy":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the cluster_policy for which to retrieve an ID.
|
||||||
"dashboard":
|
"dashboard":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the dashboard for which to retrieve an ID.
|
||||||
"instance_pool":
|
"instance_pool":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the instance_pool for which to retrieve an ID.
|
||||||
"job":
|
"job":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the job for which to retrieve an ID.
|
||||||
"metastore":
|
"metastore":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the metastore for which to retrieve an ID.
|
||||||
"notification_destination":
|
"notification_destination":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the notification_destination for which to retrieve an ID.
|
||||||
"pipeline":
|
"pipeline":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the pipeline for which to retrieve an ID.
|
||||||
"query":
|
"query":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the query for which to retrieve an ID.
|
||||||
"service_principal":
|
"service_principal":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the service_principal for which to retrieve an ID.
|
||||||
"warehouse":
|
"warehouse":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The name of the warehouse for which to retrieve an ID.
|
||||||
github.com/databricks/cli/bundle/config/variable.TargetVariable:
|
github.com/databricks/cli/bundle/config/variable.TargetVariable:
|
||||||
"default":
|
"default":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The default value for the variable.
|
||||||
"description":
|
"description":
|
||||||
"description": |-
|
"description": |-
|
||||||
The description of the variable.
|
The description of the variable.
|
||||||
|
@ -485,7 +475,7 @@ github.com/databricks/cli/bundle/config/variable.Variable:
|
||||||
Defines a custom variable for the bundle. See [_](/dev-tools/bundles/settings.md#variables).
|
Defines a custom variable for the bundle. See [_](/dev-tools/bundles/settings.md#variables).
|
||||||
"default":
|
"default":
|
||||||
"description": |-
|
"description": |-
|
||||||
PLACEHOLDER
|
The default value for the variable.
|
||||||
"description":
|
"description":
|
||||||
"description": |-
|
"description": |-
|
||||||
The description of the variable
|
The description of the variable
|
||||||
|
|
Loading…
Reference in New Issue