Commit 64e62eb
fix: resolve refs from disabled manifest nodes (transient ClickHouse CI failure) (#944)
* fix: resolve refs from disabled manifest nodes when elementary_enabled=False corrupts manifest
When a test runs dbt with elementary_enabled=False (e.g. test_collect_metrics_elementary_disabled),
dbt rewrites target/manifest.json with elementary models in the 'disabled' section instead of 'nodes'.
If a subsequent test on the same xdist worker uses AdapterQueryRunner to read_table, it reads this
stale manifest and fails with 'Cannot resolve ref: not found in dbt manifest'.
Fix: _load_manifest_maps now scans both 'nodes' and 'disabled' sections. For disabled nodes that
lack relation_name (dbt skips compilation for disabled nodes), the relation name is synthesized
from database/schema/alias using the adapter's Relation class.
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* address review: add debug logging to fallback paths, simplify disabled node handling
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* address review: use adapter include_policy instead of try/except for database handling
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Itamar Hartstein <haritamar@gmail.com>1 parent c69ebaf commit 64e62eb
1 file changed
Lines changed: 47 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
118 | 141 | | |
119 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
120 | 150 | | |
121 | 151 | | |
122 | 152 | | |
| |||
126 | 156 | | |
127 | 157 | | |
128 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
129 | 165 | | |
130 | | - | |
131 | | - | |
| 166 | + | |
132 | 167 | | |
133 | | - | |
134 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
135 | 177 | | |
136 | 178 | | |
137 | 179 | | |
| |||
0 commit comments