You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add warning for when required bundle fields are not set (#3044)
## Changes
This PR adds code to emit warnings when required values are not set in
the bundle configuration tree.
Note: We do not show a warning for zero values like "" or `0`, only when
the value is actually omitted from YAML. Acceptance test at
`bundle/validate/required` has coverage for these cases.
## Why
Better user experience for the customers.
## Tests
A new acceptance test at `bundle/validate/required`. The warnings also
show up in existing acceptance tests.
Copy file name to clipboardExpand all lines: acceptance/bundle/paths/fallback/output.txt
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
1
2
2
>>> [CLI] bundle validate -t development -o json
3
+
Warning: required field "entry_point" is not set
4
+
at resources.jobs.my_job.tasks[2].python_wheel_task
5
+
in resources/my_job.yml:33:13
6
+
override_job.yml:29:17
7
+
3
8
Warn: path ../src/notebook.py is defined relative to the [TEST_TMP_DIR]/resources directory ([TEST_TMP_DIR]/override_job.yml:9:32). Please update the path to be relative to the file where it is defined. The current value will no longer be valid in the next release.
4
9
Warn: path ../src/file.py is defined relative to the [TEST_TMP_DIR]/resources directory ([TEST_TMP_DIR]/override_job.yml:13:30). Please update the path to be relative to the file where it is defined. The current value will no longer be valid in the next release.
5
10
Warn: path ../src/dbt_project is defined relative to the [TEST_TMP_DIR]/resources directory ([TEST_TMP_DIR]/override_job.yml:17:36). Please update the path to be relative to the file where it is defined. The current value will no longer be valid in the next release.
@@ -10,6 +15,10 @@ Warn: path ../src/notebook2.py is defined relative to the [TEST_TMP_DIR]/resourc
10
15
Warn: path ../src/file2.py is defined relative to the [TEST_TMP_DIR]/resources directory ([TEST_TMP_DIR]/override_pipeline.yml:10:23). Please update the path to be relative to the file where it is defined. The current value will no longer be valid in the next release.
11
16
12
17
>>> [CLI] bundle validate -t error
18
+
Warning: required field "entry_point" is not set
19
+
at resources.jobs.my_job.tasks[2].python_wheel_task
20
+
in resources/my_job.yml:33:13
21
+
13
22
Error: notebook "resources/this value is overridden" not found. Local notebook references are expected
14
23
to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb]
0 commit comments