Skip to content

bundle: don't set edition/channel defaults for ingestion pipelines#5418

Open
shreyas-goenka wants to merge 5 commits into
mainfrom
ingestion-pipeline-defaults
Open

bundle: don't set edition/channel defaults for ingestion pipelines#5418
shreyas-goenka wants to merge 5 commits into
mainfrom
ingestion-pipeline-defaults

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Ingestion pipelines (ingestion_definition) use serverless compute. Setting edition or channel on them causes:

cannot create pipeline: You cannot provide cluster settings when using serverless compute

This PR skips those defaults for ingestion pipelines. Regular DLT pipelines are unaffected. Gateway (CDC) pipelines run on classic compute where these fields are accepted, so they intentionally keep the defaults — mirroring the companion provider fix.

Note: The Terraform provider applies the same defaults unconditionally at the provider level (resource_pipeline.go:253), so deploys through the terraform engine still fail until terraform-provider-databricks#5783 ships. The cloud acceptance test records both engines, with a Badness entry tracking the terraform failure.

Tests:

  • bundle/validate/pipeline_defaults (local): edition/channel defaulted for regular pipelines, absent for ingestion pipelines.
  • bundle/resources/pipelines/recreate-keys/change-ingestion-definition (local): per-engine create/recreate request recordings document the provider-injected edition/channel.
  • bundle/resources/pipelines/ingestion-defaults (cloud, azure): real deploy succeeds on the direct engine and fails on the terraform engine.

Ingestion pipelines (those with `ingestion_definition`) use serverless
compute by default. The Databricks API rejects `edition` and `channel`
fields as "cluster settings" when a pipeline runs on serverless compute.

Previously, DABs unconditionally set `edition: ADVANCED` and `channel:
CURRENT` as defaults for all pipeline types. This caused creation of
LakeFlow Connect ingestion pipelines to fail with:
  "cannot create pipeline: You cannot provide cluster settings when
   using serverless compute"

The fix conditionally applies these defaults only to pipelines without
`ingestion_definition`. The test `change-ingestion-definition` is
restructured to use per-engine output files since the TF provider
independently adds these defaults for all pipeline types.

Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: a8f3a47

Run: 27411939510

Env ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 2 1 6 15 264 974 7:13
❌​ aws windows 2 7 15 266 972 18:46
❌​ aws-ucws linux 2 1 6 15 360 888 23:08
❌​ aws-ucws windows 2 1 6 15 362 886 16:22
❌​ azure linux 2 1 17 267 972 7:44
❌​ azure windows 2 1 17 269 970 14:50
💚​ azure-ucws linux 1 17 367 884 12:59
🔄​ azure-ucws windows 2 1 17 367 882 18:36
❌​ gcp linux 2 1 17 263 975 9:38
❌​ gcp windows 2 1 17 265 973 13:42
26 interesting tests: 15 SKIP, 7 KNOWN, 2 FAIL, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 💚​R 💚​R 🟨​K 🟨​K
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 🟨​K 💚​R 💚​R
❌​ TestAccept/bundle/resources/pipelines/ingestion-defaults ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/pipelines/ingestion-defaults/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestFetchRepositoryInfoAPI_FromRepo/root ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestFetchRepositoryInfoAPI_FromRepo/subdir ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
Top 36 slowest tests (at least 2 minutes):
duration env testname
7:17 azure-ucws windows TestAccept
5:06 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
5:02 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:49 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:40 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:30 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:25 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:24 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:05 aws-ucws linux TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_BUNDLE_ENGINE=terraform
4:03 aws-ucws linux TestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=terraform
3:43 aws-ucws linux TestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=direct
3:39 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:31 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:17 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:16 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:07 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:06 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:58 aws-ucws linux TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_BUNDLE_ENGINE=direct
2:53 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:52 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:51 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:51 aws-ucws linux TestAccept/bundle/destroy/jobs-and-pipeline/DATABRICKS_BUNDLE_ENGINE=direct
2:48 azure-ucws linux TestAccept
2:44 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:40 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:39 azure-ucws linux TestAccept/bundle/generate/auto-bind/DATABRICKS_BUNDLE_ENGINE=terraform
2:36 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:35 aws-ucws linux TestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=terraform
2:34 aws-ucws linux TestAccept/bundle/deployment/bind/job/generate-and-bind/DATABRICKS_BUNDLE_ENGINE=direct
2:33 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:33 aws-ucws linux TestAccept/bundle/resources/jobs/check-metadata/DATABRICKS_BUNDLE_ENGINE=terraform
2:31 aws-ucws linux TestAccept/bundle/resources/permissions/dashboards/create/DATABRICKS_BUNDLE_ENGINE=terraform
2:18 aws-ucws linux TestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=direct
2:14 aws-ucws linux TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform
2:08 aws-ucws linux TestAccept/bundle/destroy/jobs-and-pipeline/DATABRICKS_BUNDLE_ENGINE=terraform
2:05 aws-ucws linux TestAccept/bundle/resources/dashboards/generate_inplace/DATABRICKS_BUNDLE_ENGINE=direct

Replace the dyn.Value pattern walk with a direct loop over
b.Config.Resources.Pipelines to conditionally apply edition/channel
defaults. Also remove the now-unused setPipelineDefault helper.

Add acceptance/bundle/resources/pipelines/ingestion-defaults, a cloud
test (direct engine) that deploys an ingestion pipeline and asserts
edition and channel are absent from the POST /api/2.0/pipelines request
body. The deploy fails with "connection not found" — not "cluster
settings" — confirming the fix.

Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
@shreyas-goenka shreyas-goenka changed the title bundle: skip edition/channel defaults for ingestion pipelines bundle: don't set edition/channel defaults for ingestion pipelines Jun 4, 2026
Extends the ingestion-defaults acceptance test to run both direct and
terraform engines, showing the contrast:
- Direct engine: edition/channel absent from POST (DABs fix working)
- Terraform engine: edition/channel present (provider-level SetDefault,
  companion fix in terraform-provider-databricks#5783)

Badness clause documents the known terraform engine gap.

Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
Replaces the error-capture test with a real end-to-end deployment on the
azure cloud environment using a MySQL ingestion connection. The test:
  - Deploys an ingestion pipeline via the direct engine
  - Asserts deployment succeeds (no "cluster settings" error)
  - Verifies edition and channel are absent from the POST request body
  - Destroys the pipeline on exit

Also confirms classic compute (serverless: false) works the same way.

The Terraform-engine gap (provider-level SetDefault still injects
edition/channel) is documented in Badness and fixed in
terraform-provider-databricks#5783.

Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
…ogrammatically

The change-ingestion-definition test now records create and recreate
requests per engine, which documents the terraform provider injecting
edition/channel for ingestion pipelines (fix: terraform-provider-databricks#5783).
The destroy-phase DELETE is identical across engines, so it is recorded once.

Also build the pipeline defaults pattern with dyn.NewPattern instead of
string concatenation, which removes the pattern parse and its error paths.

Co-authored-by: Isaac
@shreyas-goenka shreyas-goenka marked this pull request as ready for review June 15, 2026 13:53
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

21 files changed
Suggested: @denik
Also eligible: @andrewnester, @janniklasrose, @pietern, @anton-107, @lennartkats-db

/bundle/ - needs approval

Files: bundle/config/mutator/resourcemutator/resource_mutator.go
Suggested: @denik
Also eligible: @andrewnester, @janniklasrose, @pietern, @anton-107, @lennartkats-db

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants