Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
bundle:
name: test-ingestion-defaults-$UNIQUE_NAME

resources:
pipelines:
ingestion:
name: test-ingestion-$UNIQUE_NAME
catalog: main
target: default
ingestion_definition:
connection_name: $INGESTION_CONNECTION_NAME
objects: []

targets:
dev:
default: true

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-ingestion-defaults-[UNIQUE_NAME]/dev/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> jq -s .[] | select(.path=="/api/2.0/pipelines" and .method=="POST") | .body | {name, edition, channel} out.requests.txt
{
"name": "test-ingestion-[UNIQUE_NAME]",
"edition": null,
"channel": null
}
15 changes: 15 additions & 0 deletions acceptance/bundle/resources/pipelines/ingestion-defaults/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
envsubst < databricks.yml.tmpl > databricks.yml

cleanup() {
trace $CLI bundle destroy --auto-approve 2>/dev/null || true
rm -f out.requests.txt
}
trap cleanup EXIT

# Deploy the ingestion pipeline. Verifies that:
# 1. Deployment succeeds without "cluster settings" errors
# 2. edition and channel are absent from the created pipeline's spec
trace $CLI bundle deploy

trace jq -s '.[] | select(.path=="/api/2.0/pipelines" and .method=="POST") | .body | {name, edition, channel}' out.requests.txt
rm -f out.requests.txt
16 changes: 16 additions & 0 deletions acceptance/bundle/resources/pipelines/ingestion-defaults/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Local = false
Cloud = true
RecordRequests = true

# The Terraform engine still injects edition/channel at provider level (SetDefault in
# resource_pipeline.go:253); companion fix: terraform-provider-databricks#5783.
# Only test with direct engine here so we cleanly validate the DABs-side fix.
[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["direct"]

[Env]
# MySQL connection present in the azure test workspace.
INGESTION_CONNECTION_NAME = "name-sbggefbaaidkb"

[CloudEnvs]
azure = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"creator_user_name": "[USERNAME]",
"effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
"last_modified": [UNIX_TIME_MILLIS],
"name": "test-pipeline-[UNIQUE_NAME]",
"pipeline_id": "[MY_ID_2]",
"run_as_user_name": "[USERNAME]",
"spec": {
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"id": "[MY_ID_2]",
"ingestion_definition": {
"connection_name": "my_new_connection",
"objects": [
{}
]
},
"libraries": [
{
"file": {
"path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/files/foo.py"
}
}
],
"name": "test-pipeline-[UNIQUE_NAME]",
"storage": "dbfs:/pipelines/[MY_ID_2]"
},
"state": "IDLE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"creator_user_name": "[USERNAME]",
"effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
"last_modified": [UNIX_TIME_MILLIS],
"name": "test-pipeline-[UNIQUE_NAME]",
"pipeline_id": "[MY_ID_2]",
"run_as_user_name": "[USERNAME]",
"spec": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"edition": "ADVANCED",
"id": "[MY_ID_2]",
"ingestion_definition": {
"connection_name": "my_new_connection",
"objects": [
{}
]
},
"libraries": [
{
"file": {
"path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/files/foo.py"
}
}
],
"name": "test-pipeline-[UNIQUE_NAME]",
"storage": "dbfs:/pipelines/[MY_ID_2]"
},
"state": "IDLE"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
"action": "create",
"new_state": {
"value": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"edition": "ADVANCED",
"ingestion_definition": {
"connection_name": "my_connection",
"objects": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
"action": "recreate",
"new_state": {
"value": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"edition": "ADVANCED",
"ingestion_definition": {
"connection_name": "my_new_connection",
"objects": [
Expand All @@ -31,13 +29,11 @@
}
},
"remote_state": {
"channel": "CURRENT",
"creator_user_name": "[USERNAME]",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"edition": "ADVANCED",
"effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
"id": "[MY_ID]",
"ingestion_definition": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"body": {
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"ingestion_definition": {
"connection_name": "my_connection",
"objects": [
{}
]
},
"libraries": [
{
"file": {
"path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/files/foo.py"
}
}
],
"name": "test-pipeline-[UNIQUE_NAME]"
},
"method": "POST",
"path": "/api/2.0/pipelines"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"body": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"edition": "ADVANCED",
"ingestion_definition": {
"connection_name": "my_connection",
"objects": [
{}
]
},
"libraries": [
{
"file": {
"path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/files/foo.py"
}
}
],
"name": "test-pipeline-[UNIQUE_NAME]"
},
"method": "POST",
"path": "/api/2.0/pipelines"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"method": "DELETE",
"path": "/api/2.0/pipelines/[MY_ID_2]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"method": "DELETE",
"path": "/api/2.0/pipelines/[MY_ID]"
}
{
"body": {
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"ingestion_definition": {
"connection_name": "my_new_connection",
"objects": [
{}
]
},
"libraries": [
{
"file": {
"path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/files/foo.py"
}
}
],
"name": "test-pipeline-[UNIQUE_NAME]"
},
"method": "POST",
"path": "/api/2.0/pipelines"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"method": "DELETE",
"path": "/api/2.0/pipelines/[MY_ID]"
}
{
"body": {
"channel": "CURRENT",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/state/metadata.json"
},
"edition": "ADVANCED",
"ingestion_definition": {
"connection_name": "my_new_connection",
"objects": [
{}
]
},
"libraries": [
{
"file": {
"path": "/Workspace/Users/[USERNAME]/.bundle/acc-[UNIQUE_NAME]/default/files/foo.py"
}
}
],
"name": "test-pipeline-[UNIQUE_NAME]"
},
"method": "POST",
"path": "/api/2.0/pipelines"
}
Loading
Loading