From 00dff932879333c6ba02053e8c4ec92771096ca9 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Feb 2026 13:05:37 +0100 Subject: [PATCH 1/5] do not remove nil config --- bundle/direct/dresources/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/direct/dresources/config.go b/bundle/direct/dresources/config.go index bc6d77d34d..a8f61c596e 100644 --- a/bundle/direct/dresources/config.go +++ b/bundle/direct/dresources/config.go @@ -78,7 +78,7 @@ func GetResourceConfig(resourceType string) *ResourceLifecycleConfig { if rc, ok := cfg.Resources[resourceType]; ok { return &rc } - return nil + return &ResourceLifecycleConfig{} } // GetGeneratedResourceConfig returns the generated lifecycle config for a given resource type. @@ -88,5 +88,5 @@ func GetGeneratedResourceConfig(resourceType string) *ResourceLifecycleConfig { if rc, ok := cfg.Resources[resourceType]; ok { return &rc } - return nil + return &ResourceLifecycleConfig{} } From 5286f4e1dc44a04e4da7d0b10ec18fef828fce58 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Feb 2026 13:21:02 +0100 Subject: [PATCH 2/5] update contains.py and script --- acceptance/bin/contains.py | 2 +- acceptance/bundle/invariant/migrate/script | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acceptance/bin/contains.py b/acceptance/bin/contains.py index 235de770b6..441d18b9aa 100755 --- a/acceptance/bin/contains.py +++ b/acceptance/bin/contains.py @@ -18,7 +18,7 @@ found.add(t) for t in must_not_find: if t in line: - sys.stderr.write(f"contains error: {t!r} was not expected\n") + sys.stderr.write(f"contains error: {t!r} was not expected: {line.strip()!r}\n") sys.stdout.flush() diff --git a/acceptance/bundle/invariant/migrate/script b/acceptance/bundle/invariant/migrate/script index dd6aeb2444..3f6cfed948 100644 --- a/acceptance/bundle/invariant/migrate/script +++ b/acceptance/bundle/invariant/migrate/script @@ -18,7 +18,7 @@ cp databricks.yml LOG.config cleanup() { trace $CLI bundle destroy --auto-approve &> LOG.destroy - cat LOG.destroy | contains.py '!panic' '!internal error' > /dev/null + cat LOG.destroy | contains.py '!panic:' '!internal error' > /dev/null # Run cleanup script if present CLEANUP_SCRIPT="$TESTDIR/../configs/$INPUT_CONFIG-cleanup.sh" @@ -30,14 +30,14 @@ cleanup() { trap cleanup EXIT trace DATABRICKS_BUNDLE_ENGINE=terraform $CLI bundle deploy &> LOG.deploy -cat LOG.deploy | contains.py '!panic' '!internal error' > /dev/null +cat LOG.deploy | contains.py '!panic:' '!internal error' > /dev/null echo INPUT_CONFIG_OK trace $CLI bundle deployment migrate &> LOG.migrate -cat LOG.migrate | contains.py '!panic' '!internal error' > /dev/null +cat LOG.migrate | contains.py '!panic:' '!internal error' > /dev/null $CLI bundle plan -o json &> plan.json -cat plan.json | contains.py '!panic' '!internal error' > /dev/null +cat plan.json | contains.py '!panic:' '!internal error' > /dev/null verify_no_drift.py plan.json From c989321b67503442ae95463f14a4d755ef539514 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Feb 2026 13:30:53 +0100 Subject: [PATCH 3/5] fix test --- bundle/direct/dresources/config_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/direct/dresources/config_test.go b/bundle/direct/dresources/config_test.go index 8d3845dd5d..6d87126897 100644 --- a/bundle/direct/dresources/config_test.go +++ b/bundle/direct/dresources/config_test.go @@ -12,6 +12,6 @@ func TestMustLoadConfig(t *testing.T) { } func TestGetResourceConfig(t *testing.T) { - assert.NotNil(t, GetResourceConfig("volumes")) - assert.Nil(t, GetResourceConfig("nonexistent")) + assert.NotEmpty(t, GetResourceConfig("volumes").RecreateOnChanges) + assert.Empty(t, GetResourceConfig("nonexistent").RecreateOnChanges) } From 98ecd29557bfe9a8edd5987326ddc723ef647651 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Feb 2026 13:40:03 +0100 Subject: [PATCH 4/5] fix contains test --- acceptance/selftest/contains/output.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance/selftest/contains/output.txt b/acceptance/selftest/contains/output.txt index 21a89bb689..ce55c098d9 100644 --- a/acceptance/selftest/contains/output.txt +++ b/acceptance/selftest/contains/output.txt @@ -20,7 +20,7 @@ Failed script === This should complain about Hello present in output >>> python3 ./success.py Hello world -contains error: 'Hello' was not expected +contains error: 'Hello' was not expected: 'Hello world' === This should not complain >>> python3 ./success.py From 34f0dcf4fb22ad6cd9808e40d401d9386f01c50a Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Feb 2026 13:57:22 +0100 Subject: [PATCH 5/5] lint fix --- bundle/direct/dresources/config.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bundle/direct/dresources/config.go b/bundle/direct/dresources/config.go index a8f61c596e..0a0e26be05 100644 --- a/bundle/direct/dresources/config.go +++ b/bundle/direct/dresources/config.go @@ -39,6 +39,12 @@ var ( globalConfig *Config generatedConfigOnce sync.Once generatedConfig *Config + empty = ResourceLifecycleConfig{ + IgnoreRemoteChanges: nil, + IgnoreLocalChanges: nil, + RecreateOnChanges: nil, + UpdateIDOnChanges: nil, + } ) // MustLoadConfig loads and parses the embedded resources.yml configuration. @@ -78,7 +84,7 @@ func GetResourceConfig(resourceType string) *ResourceLifecycleConfig { if rc, ok := cfg.Resources[resourceType]; ok { return &rc } - return &ResourceLifecycleConfig{} + return &empty } // GetGeneratedResourceConfig returns the generated lifecycle config for a given resource type. @@ -88,5 +94,5 @@ func GetGeneratedResourceConfig(resourceType string) *ResourceLifecycleConfig { if rc, ok := cfg.Resources[resourceType]; ok { return &rc } - return &ResourceLifecycleConfig{} + return &empty }