Repository navigation
Commit 634cea7
Do not check required fields inside a pure reference (#7226)
## Changes
The required-field warning check (`bundle/config/validate/required.go`)
skips a value that is a pure `${...}` reference.
## Why
`schedule: ${resources.jobs.base.schedule}` produced `required field
"quartz_cron_expression" is not set` (and `timezone_id`) for the
referring job, although the referenced schedule sets both. The same
happens on main for e.g. `queue: ${...}`. The referenced value is
checked where it is defined.
Stacked on #7225 (the test only
gets past validate with that fix).
Port note: the fix lives in `warnForMissingFields` and is dyn-specific
(it walks the dyn tree); a typed walker needs the same skip for fields
held as references.
## Tests
- Unit test in `bundle/config/validate/required_test.go`.
- `acceptance/bundle/validate/references/job_schedule_whole_reference`:
warnings gone, Badness removed.
This pull request and its description were written by Isaac.
---------
Co-authored-by: Isaac <no-reply@databricks.com>1 parent da7a8be commit 634cea7
5 files changed
Lines changed: 38 additions & 18 deletions
File tree
- .nextchanges/bundles
- acceptance/bundle/validate/references/job_schedule_whole_reference
- bundle/config/validate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 3 | | |
12 | 4 | | |
13 | 5 | | |
14 | 6 | | |
15 | 7 | | |
16 | 8 | | |
17 | | - | |
| 9 | + | |
18 | 10 | | |
19 | 11 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 12 | | |
29 | 13 | | |
30 | 14 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments