Skip to content

direct: Fix continuous pipeline restart on every deploy from channel/edition case - #6747

Open
denik wants to merge 6 commits into
mainfrom
denik/issue6745
Open

denik wants to merge 6 commits into
mainfrom
denik/issue6745

Conversation

@denik

@denik denik commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Why

The backend stores a pipeline's channel and edition as canonical upper-case enums (and case-normalizes catalog), so a config value in a different case reads back changed and never converges. On a continuous pipeline the resulting phantom EditPipeline on every deploy cancels the running update and starts a new one (SETTINGS_CHANGE). The terraform provider suppressed the same diffs (EqualFoldDiffSuppress / SetSuppressDiff), so this only regressed after migrating to the direct engine.

Changes

Add a normalize_case rule (sibling of normalize_slash) that skips a change when local and remote differ only by case, and apply it to pipeline channel, edition and catalog.

Tests

New invariant config pipeline_normalize_case.yml.tmpl: a continuous pipeline with lower-case channel/edition; the mock now upper-cases them like the backend. Verified on aws that it drifts without the fix and converges with it, including after bundle deployment migrate. Unit test for the slash/case composition in shouldSkipNormalized.

This pull request and its description were written by Isaac.

denik and others added 2 commits September 18, 2026 11:24
…edition case

The backend stores a pipeline's channel and edition as canonical upper-case
enums (and case-normalizes catalog), so a config value in a different case reads
back changed and never converges. On a continuous pipeline the resulting phantom
EditPipeline on every deploy cancels the running update and starts a new one
(SETTINGS_CHANGE). The terraform provider suppressed the same diffs, so this
only regressed after migrating to the direct engine.

Add a normalize_case rule (sibling of normalize_slash) that skips a change when
local and remote differ only by case, and apply it to pipeline channel, edition
and catalog.

Fixes #6745

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

7 files changed
Suggested: @janniklasrose
Also eligible: @andrewnester, @pietern, @shreyas-goenka, @anton-107, @lennartkats-db

/bundle/ - needs approval

4 files changed
Suggested: @janniklasrose
Also eligible: @andrewnester, @pietern, @shreyas-goenka, @anton-107, @lennartkats-db

General files (require maintainer)

Files: .nextchanges/bundles/pipeline-normalize-case.md, libs/testserver/pipelines.go
Based on git history:

  • @janniklasrose -- recent work in .nextchanges/bundles/, bundle/direct/, acceptance/bundle/invariant/configs/

Any maintainer (@andrewnester, @anton-107, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

denik and others added 2 commits September 18, 2026 11:42
…s config

Handle a field listed under both normalize_slash and normalize_case: strip
trailing slashes before the case-insensitive compare so a value differing on
both axes at once still converges. Add a unit test for shouldSkipNormalized.

Drop pipeline_continuous.yml.tmpl: pipeline_normalize_case.yml.tmpl is already a
continuous pipeline, so it covers the same no-drift/migrate paths.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 267e404

Run: 35340165166

Env ✅​pass 🙈​skip Time
✅​ aws linux 319 380 8:09
✅​ aws windows 321 378 12:32
✅​ azure linux 318 380 8:11
✅​ azure windows 320 378 12:45
✅​ gcp linux 319 380 10:42
✅​ gcp windows 321 378 11:42
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:53 azure windows TestAccept
3:44 gcp windows TestAccept
3:31 aws windows TestAccept
2:01 aws windows TestAccept/bundle/invariant/migrate/DATABRICKS_BUNDLE_ENGINE=direct/DMS=/INPUT_CONFIG=app.yml.tmpl

denik and others added 2 commits September 18, 2026 12:17
The mock now lower-cases catalog like the backend, and the normalize_case
fixture uses a mixed-case catalog, so the catalog rule has real regression
coverage (removing it now fails the test instead of silently passing).

Simplify shouldSkipNormalized to look up the slash rule once and trim the
compared values once before the case-insensitive fold.

Co-authored-by: Isaac <no-reply@databricks.com>
migrate deploys via Terraform first, and for a continuous pipeline the TF provider
blocks until the pipeline update reaches RUNNING. The local mock never leaves IDLE,
so the deploy hangs until the per-test timeout. This is the first continuous invariant
config, so it is the first to hit this. Exclude it from migrate (same pattern as
volume_uppercase); no_drift on the direct engine covers it.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
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