Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions acceptance/bundle/override/pipeline_cluster/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
>>> [CLI] bundle validate -o json -t development
{
"foo": {
"channel": "CURRENT",
"clusters": [
{
"label": "default",
Expand All @@ -16,6 +17,7 @@
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/override_pipeline_cluster/development/state/metadata.json"
},
"edition": "ADVANCED",
"name": "job",
"permissions": []
}
Expand All @@ -24,6 +26,7 @@
>>> [CLI] bundle validate -o json -t staging
{
"foo": {
"channel": "CURRENT",
"clusters": [
{
"label": "default",
Expand All @@ -38,6 +41,7 @@
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/override_pipeline_cluster/staging/state/metadata.json"
},
"edition": "ADVANCED",
"name": "job",
"permissions": []
}
Expand Down
2 changes: 2 additions & 0 deletions acceptance/bundle/paths/invalid_pipeline_globs/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Exit code: 1
"resources": {
"pipelines": {
"nyc_taxi_pipeline": {
"channel": "CURRENT",
"edition": "ADVANCED",
"libraries": [
{
"notebook": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Exit code: 1
"resources": {
"pipelines": {
"nyc_taxi_pipeline": {
"channel": "CURRENT",
"edition": "ADVANCED",
"libraries": [
{
"file": {
Expand Down
2 changes: 2 additions & 0 deletions acceptance/bundle/paths/pipeline_globs/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"resources": {
"pipelines": {
"nyc_taxi_pipeline": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/pipeline_glob_paths/default/state/metadata.json"
},
"edition": "ADVANCED",
"libraries": [
{
"notebook": {
Expand Down
4 changes: 4 additions & 0 deletions acceptance/bundle/python/pipelines-support/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@
"resources": {
"pipelines": {
"my_pipeline_1": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/my_project/default/state/metadata.json"
},
"edition": "ADVANCED",
"name": "My Pipeline 1 (updated)",
"permissions": []
},
"my_pipeline_2": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/my_project/default/state/metadata.json"
},
"edition": "ADVANCED",
"name": "My Pipeline 2 (updated)",
"permissions": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
},
"pipelines": {
"project_name_[UNIQUE_NAME]_pipeline": {
"channel": "CURRENT",
"configuration": {
"bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src"
},
Expand All @@ -124,6 +125,7 @@
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/state/metadata.json"
},
"development": true,
"edition": "ADVANCED",
"libraries": [
{
"notebook": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ Resources:
+ "url": "[DATABRICKS_URL]/jobs/[NUMBER]"
}
},
@@ -125,4 +126,5 @@
},
@@ -127,4 +128,5 @@
"development": true,
"edition": "ADVANCED",
+ "id": "[UUID]",
"libraries": [
{
@@ -133,6 +135,6 @@
@@ -135,6 +137,6 @@
],
"name": "[dev [USERNAME]] project_name_[UNIQUE_NAME]_pipeline",
- "permissions": [],
Expand All @@ -89,7 +89,7 @@ Resources:
+ "url": "[DATABRICKS_URL]/pipelines/[UUID]"
}
}
@@ -143,5 +145,4 @@
@@ -145,5 +147,4 @@
]
},
- "targets": null,
Expand Down Expand Up @@ -197,8 +197,8 @@ Validation OK!
+ "pause_status": "UNPAUSED",
"periodic": {
"interval": 1,
@@ -118,21 +107,20 @@
"project_name_[UNIQUE_NAME]_pipeline": {
@@ -119,22 +108,21 @@
"channel": "CURRENT",
"configuration": {
- "bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src"
+ "bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/files/src"
Expand All @@ -209,6 +209,7 @@ Validation OK!
+ "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/state/metadata.json"
},
- "development": true,
"edition": "ADVANCED",
"libraries": [
{
"notebook": {
Expand All @@ -224,7 +225,7 @@ Validation OK!
+ "schema": "project_name_[UNIQUE_NAME]_prod"
}
}
@@ -145,10 +133,10 @@
@@ -147,10 +135,10 @@
"targets": null,
"workspace": {
- "artifact_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/artifacts",
Expand Down Expand Up @@ -347,8 +348,8 @@ Resources:
+ "pause_status": "UNPAUSED",
"periodic": {
"interval": 1,
@@ -119,21 +112,20 @@
"project_name_[UNIQUE_NAME]_pipeline": {
@@ -120,11 +113,10 @@
"channel": "CURRENT",
"configuration": {
- "bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src"
+ "bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/files/src"
Expand All @@ -359,8 +360,9 @@ Resources:
+ "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/state/metadata.json"
},
- "development": true,
"edition": "ADVANCED",
"id": "[UUID]",
"libraries": [
@@ -132,10 +124,10 @@
{
"notebook": {
- "path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src/dlt_pipeline"
Expand All @@ -374,7 +376,7 @@ Resources:
+ "schema": "project_name_[UNIQUE_NAME]_prod",
"url": "[DATABRICKS_URL]/pipelines/[UUID]"
}
@@ -146,10 +138,10 @@
@@ -148,10 +140,10 @@
},
"workspace": {
- "artifact_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/artifacts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Warning: Ignoring Databricks CLI version constraint for development build. Requi
"pipelines": {
"my_jobs_as_code_pipeline": {
"catalog": "catalog_name",
"channel": "CURRENT",
"configuration": {
"bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/my_jobs_as_code/dev/files/src"
},
Expand All @@ -91,6 +92,7 @@ Warning: Ignoring Databricks CLI version constraint for development build. Requi
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/my_jobs_as_code/dev/state/metadata.json"
},
"development": true,
"edition": "ADVANCED",
"libraries": [
{
"notebook": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
{
"pipelines": {
"rname": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/BUNDLE/default/state/metadata.json"
},
"edition": "ADVANCED",
"permissions": []
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Warning: unknown field: grants
{
"pipelines": {
"rname": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/BUNDLE/default/state/metadata.json"
},
"edition": "ADVANCED",
"permissions": []
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
{
"pipelines": {
"rname": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/BUNDLE/default/state/metadata.json"
},
"edition": "ADVANCED",
"permissions": []
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"pipelines": {
"my_pipeline": {
"channel": "CURRENT",
"clusters": [
{
"label": "default",
Expand All @@ -14,6 +15,7 @@
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/foobar/use-default-variable-values/state/metadata.json"
},
"edition": "ADVANCED",
"name": "a_string",
"permissions": []
}
Expand All @@ -24,6 +26,7 @@
{
"pipelines": {
"my_pipeline": {
"channel": "CURRENT",
"clusters": [
{
"label": "default",
Expand All @@ -35,6 +38,7 @@
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/foobar/override-string-variable/state/metadata.json"
},
"edition": "ADVANCED",
"name": "overridden_string",
"permissions": []
}
Expand All @@ -45,6 +49,7 @@
{
"pipelines": {
"my_pipeline": {
"channel": "CURRENT",
"clusters": [
{
"label": "default",
Expand All @@ -56,6 +61,7 @@
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/foobar/override-int-variable/state/metadata.json"
},
"edition": "ADVANCED",
"name": "a_string",
"permissions": []
}
Expand All @@ -66,6 +72,7 @@
{
"pipelines": {
"my_pipeline": {
"channel": "CURRENT",
"clusters": [
{
"label": "default",
Expand All @@ -77,6 +84,7 @@
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/foobar/override-both-bool-and-string-variables/state/metadata.json"
},
"edition": "ADVANCED",
"name": "overridden_string",
"permissions": []
}
Expand Down
5 changes: 5 additions & 0 deletions bundle/config/mutator/resourcemutator/resource_mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ func applyInitializeMutators(ctx context.Context, b *bundle.Bundle) diag.Diagnos
//{"resources.jobs.*.job_clusters[*].new_cluster.num_workers", 0},
{"resources.jobs.*.job_clusters[*].new_cluster.workload_type.clients.notebooks", true},
{"resources.jobs.*.job_clusters[*].new_cluster.workload_type.clients.jobs", true},

// Pipelines (same as terraform)
// https://github.com/databricks/terraform-provider-databricks/blob/v1.75.0/pipelines/resource_pipeline.go#L253
{"resources.pipelines.*.edition", "ADVANCED"},
{"resources.pipelines.*.channel", "CURRENT"},
}

for _, defaultDef := range defaults {
Expand Down
Loading