From 03e4bb25754efb0c325f28e33afaabb5827c83b8 Mon Sep 17 00:00:00 2001 From: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:51:39 +0530 Subject: [PATCH] Update warning for includes outside root to only mention databricks.yml (#2411) ## Why Addresses feedback from this thread: https://github.com/databricks/cli/pull/2389#discussion_r1975760462. --- acceptance/bundle/includes/include_outside_root/output.txt | 6 ++---- bundle/config/loader/process_include.go | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/acceptance/bundle/includes/include_outside_root/output.txt b/acceptance/bundle/includes/include_outside_root/output.txt index 720c3a826..f4f49f3ac 100644 --- a/acceptance/bundle/includes/include_outside_root/output.txt +++ b/acceptance/bundle/includes/include_outside_root/output.txt @@ -2,10 +2,8 @@ Warning: Include section is defined outside root file at include in a.yml:2:3 -The include section is defined in a file that is not the root file. -These values will be ignored because only the includes defined in -the bundle root file (that is databricks.yml or databricks.yaml) -are loaded. +An include section is defined in a file that is not databricks.yml. +Only includes defined in databricks.yml are applied. Name: include_outside_root Target: default diff --git a/bundle/config/loader/process_include.go b/bundle/config/loader/process_include.go index 4f7dd47ca..9458ff09e 100644 --- a/bundle/config/loader/process_include.go +++ b/bundle/config/loader/process_include.go @@ -165,10 +165,8 @@ func (m *processInclude) Apply(_ context.Context, b *bundle.Bundle) diag.Diagnos diags = diags.Append(diag.Diagnostic{ Severity: diag.Warning, Summary: "Include section is defined outside root file", - Detail: `The include section is defined in a file that is not the root file. -These values will be ignored because only the includes defined in -the bundle root file (that is databricks.yml or databricks.yaml) -are loaded.`, + Detail: `An include section is defined in a file that is not databricks.yml. +Only includes defined in databricks.yml are applied.`, Locations: this.GetLocations("include"), Paths: []dyn.Path{dyn.MustPathFromString("include")}, })