diff --git a/acceptance/bundle/includes/nested_include_section/a.yml b/acceptance/bundle/includes/nested_include_section/a.yml new file mode 100644 index 00000000000..0c17d51038e --- /dev/null +++ b/acceptance/bundle/includes/nested_include_section/a.yml @@ -0,0 +1,3 @@ +# An included file with its own include section. +include: + - c.yml diff --git a/acceptance/bundle/includes/nested_include_section/c.yml b/acceptance/bundle/includes/nested_include_section/c.yml new file mode 100644 index 00000000000..f47125ec806 --- /dev/null +++ b/acceptance/bundle/includes/nested_include_section/c.yml @@ -0,0 +1,3 @@ +variables: + from_c: + default: loaded diff --git a/acceptance/bundle/includes/nested_include_section/databricks.yml b/acceptance/bundle/includes/nested_include_section/databricks.yml new file mode 100644 index 00000000000..eebd5439e4f --- /dev/null +++ b/acceptance/bundle/includes/nested_include_section/databricks.yml @@ -0,0 +1,5 @@ +bundle: + name: test-bundle + +include: + - a.yml diff --git a/acceptance/bundle/includes/nested_include_section/out.test.toml b/acceptance/bundle/includes/nested_include_section/out.test.toml new file mode 100644 index 00000000000..a927a5fbc06 --- /dev/null +++ b/acceptance/bundle/includes/nested_include_section/out.test.toml @@ -0,0 +1,2 @@ +Cloud = false +EnvMatrix.DMS = ["", "true"] diff --git a/acceptance/bundle/includes/nested_include_section/output.txt b/acceptance/bundle/includes/nested_include_section/output.txt new file mode 100644 index 00000000000..c4651eea2a7 --- /dev/null +++ b/acceptance/bundle/includes/nested_include_section/output.txt @@ -0,0 +1,13 @@ + +>>> [CLI] bundle validate -o json +Warning: Include section is defined outside root file + at include + in a.yml:3:3 + +An include section is defined in a file that is not databricks.yml. +Only includes defined in databricks.yml are applied. + +[ + "a.yml", + "c.yml" +] diff --git a/acceptance/bundle/includes/nested_include_section/script b/acceptance/bundle/includes/nested_include_section/script new file mode 100644 index 00000000000..6cdbf5682c1 --- /dev/null +++ b/acceptance/bundle/includes/nested_include_section/script @@ -0,0 +1,2 @@ +# The include list keeps the include section of an included file, which is not loaded. +trace $CLI bundle validate -o json | jq .include diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/databricks.yml b/acceptance/bundle/resources/pipelines/glob_libraries_locations/databricks.yml new file mode 100644 index 00000000000..9d0df44605e --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/databricks.yml @@ -0,0 +1,12 @@ +bundle: + name: test-bundle + +resources: + pipelines: + p: + name: p + libraries: + - notebook: + path: ./nbs/*.py + maven: + repo: https://repo.example.test diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/a.py b/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/a.py new file mode 100644 index 00000000000..7c87acfa794 --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/a.py @@ -0,0 +1,2 @@ +# Databricks notebook source +print(1) diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/b.py b/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/b.py new file mode 100644 index 00000000000..7c87acfa794 --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/b.py @@ -0,0 +1,2 @@ +# Databricks notebook source +print(1) diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/c.py b/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/c.py new file mode 100644 index 00000000000..7c87acfa794 --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/nbs/c.py @@ -0,0 +1,2 @@ +# Databricks notebook source +print(1) diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/out.test.toml b/acceptance/bundle/resources/pipelines/glob_libraries_locations/out.test.toml new file mode 100644 index 00000000000..a927a5fbc06 --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/out.test.toml @@ -0,0 +1,2 @@ +Cloud = false +EnvMatrix.DMS = ["", "true"] diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/output.txt b/acceptance/bundle/resources/pipelines/glob_libraries_locations/output.txt new file mode 100644 index 00000000000..3fb4b98c1c9 --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/output.txt @@ -0,0 +1,19 @@ + +>>> [CLI] bundle validate +Warning: required field "coordinates" is not set + at resources.pipelines.p.libraries[0].maven + in databricks.yml:12:13 + +Warning: required field "coordinates" is not set + at resources.pipelines.p.libraries[1].maven + +Warning: required field "coordinates" is not set + at resources.pipelines.p.libraries[2].maven + +Name: test-bundle +Target: default +Workspace: + User: [USERNAME] + Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default + +Found 3 warnings diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/script b/acceptance/bundle/resources/pipelines/glob_libraries_locations/script new file mode 100644 index 00000000000..a5d4b7f3f4f --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/script @@ -0,0 +1,2 @@ +# The glob expands to three libraries. The warning of each one points at the line of the glob. +trace $CLI bundle validate diff --git a/acceptance/bundle/resources/pipelines/glob_libraries_locations/test.toml b/acceptance/bundle/resources/pipelines/glob_libraries_locations/test.toml new file mode 100644 index 00000000000..412e4d10d7f --- /dev/null +++ b/acceptance/bundle/resources/pipelines/glob_libraries_locations/test.toml @@ -0,0 +1 @@ +Badness = "The libraries that a glob expands to lose the location of the glob: only the first warning has a location."