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.
This commit is contained in:
shreyas-goenka 2025-03-03 14:51:39 +05:30 committed by GitHub
parent b95662c18e
commit 03e4bb2575
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 8 deletions

View File

@ -2,10 +2,8 @@ Warning: Include section is defined outside root file
at include at include
in a.yml:2:3 in a.yml:2:3
The include section is defined in a file that is not the root file. An include section is defined in a file that is not databricks.yml.
These values will be ignored because only the includes defined in Only includes defined in databricks.yml are applied.
the bundle root file (that is databricks.yml or databricks.yaml)
are loaded.
Name: include_outside_root Name: include_outside_root
Target: default Target: default

View File

@ -165,10 +165,8 @@ func (m *processInclude) Apply(_ context.Context, b *bundle.Bundle) diag.Diagnos
diags = diags.Append(diag.Diagnostic{ diags = diags.Append(diag.Diagnostic{
Severity: diag.Warning, Severity: diag.Warning,
Summary: "Include section is defined outside root file", Summary: "Include section is defined outside root file",
Detail: `The include section is defined in a file that is not the root file. Detail: `An include section is defined in a file that is not databricks.yml.
These values will be ignored because only the includes defined in Only includes defined in databricks.yml are applied.`,
the bundle root file (that is databricks.yml or databricks.yaml)
are loaded.`,
Locations: this.GetLocations("include"), Locations: this.GetLocations("include"),
Paths: []dyn.Path{dyn.MustPathFromString("include")}, Paths: []dyn.Path{dyn.MustPathFromString("include")},
}) })