Commit 48e647c
authored
Improve PyDABs acceptance test consistency error (#3874)
## Changes
The PyDABs consistency acceptance test now shows actionable errors. This
PR also removes the unnecessary second test pass from `make
test-update-templates`.
**Before:** When there is an inconsistency between the yml version and
.py version of the `default` template we'd get a diff like this:
```
$ make test
[...]
>>> diff -Naur enable_pydabs=yes enable_pydabs=no
--- enable_pydabs=yes
+++ enable_pydabs=no
@@ -101,7 +101,6 @@
"pipelines": {
"my_pydabs_etl": {
- "catalog": "hive_metastore",
[... 10+ more times with different line numbers like @@ -72,7... @@ -60,7... etc ...]
```
**After:** Such an inconsistency comes with a more actionable error:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ PyDABs Template Consistency Check Failed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Python and YAML resource templates are generating different configurations!
📁 Check ALL template files in:
libs/template/templates/default/template/{{.project_name}}/resources/
• *.py.tmpl (Python resource definitions)
• *.yml.tmpl (YAML resource definitions)
💡 Steps to fix:
1. Look at the diff above to identify which field differs
2. Find which *.py.tmpl file contains that field
3. Compare it to the corresponding *.yml.tmpl file
4. Ensure the field has the same active/commented state in both formats
```
## Why
Template inconsistencies produced cryptic diffs with no context. Second
test pass was cargo-culted from `test-update` but does nothing.
## Tests
Manual verification with intentional template inconsistency1 parent 090a9ca commit 48e647c
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| |||
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
21 | 46 | | |
0 commit comments