Commit 16905bc
authored
chore: improve debug formatting in path builder (#1355)
This produces format that is easier to read:
```
CreatePlanningPaths
===================
[pathBuilderVisitor]: EnterSelectionSet ref: 2
[pathBuilderVisitor]: EnterField ref: 2 fieldName: accounts typeName: Query
[pathBuilderVisitor]: saveAddedPath {"ds":11987355753863978781,"path":"query","shouldWalkFields":true,"pathType":"parent"}
[pathBuilderVisitor]: saveAddedPath {"ds":11987355753863978781,"path":"query.accounts","fieldRef": 2,"typeName":"Query","shouldWalkFields":true,"isRootNode":true,"pathType":"field"}
... SNIP ...
[pathBuilderVisitor]: LeaveSelectionSet ref: 2
Planned paths on initial run #1:
should revisit
has missing paths
has fields waiting for dependency
Missing paths:
query.accounts.full
Run #1. Planner ID 0
ParentPath: query
Datasource ID: id-1, name: id-1, hash: 11987355753863978781
Paths:
{"ds":11987355753863978781,"path":"query","shouldWalkFields":true,"pathType":"parent"}
{"ds":11987355753863978781,"path":"query.accounts","fieldRef": 2,"typeName":"Query","shouldWalkFields":true,"isRootNode":true,"pathType":"field"}
{"ds":11987355753863978781,"path":"query.accounts.id","fieldRef": 0,"typeName":"User","shouldWalkFields":true,"isRootNode":true,"pathType":"field"}
{"ds":11987355753863978781,"path":"query.accounts.__typename","fieldRef": 4,"typeName":"User","shouldWalkFields":true,"isRootNode":false,"pathType":"field"}
Run #1. Planner ID 1
ParentPath: query.accounts
Datasource ID: id-2, name: id-2, hash: 14787246084284009732
Depends on planner IDs: [0]
Required fields:
key: {"type_name":"User","selection_set":"id","RemappedPaths":null}
Paths:
{"ds":14787246084284009732,"path":"query.accounts","shouldWalkFields":true,"pathType":"parent"}
{"ds":14787246084284009732,"path":"query.accounts.title","fieldRef": 3,"typeName":"User","shouldWalkFields":true,"isRootNode":true,"pathType":"field"}
[pathBuilderVisitor]: EnterSelectionSet ref: 2
[pathBuilderVisitor]: EnterField ref: 2 fieldName: accounts typeName: Query
[pathBuilderVisitor]: EnterSelectionSet ref: 1
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Standardized and clarified diagnostic/log output across selection and
planning flows: run-aware headers, consistent labeling/indentation,
unified messages for node selection and path planning, improved
revisit/missing-path reporting, and deterministic handling of
potentially missing paths to improve troubleshooting.
* **Tests**
* Non-functional test change: an optional debug line added but left
commented out (no behavior change).
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 8200315 commit 16905bc
File tree
4 files changed
+39
-36
lines changed- execution/engine
- v2/pkg/engine/plan
4 files changed
+39
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
| 162 | + | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 92 | + | |
96 | 93 | | |
97 | | - | |
| 94 | + | |
98 | 95 | | |
99 | 96 | | |
100 | 97 | | |
| |||
116 | 113 | | |
117 | 114 | | |
118 | 115 | | |
119 | | - | |
120 | | - | |
| 116 | + | |
| 117 | + | |
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
| |||
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
149 | | - | |
| 151 | + | |
150 | 152 | | |
151 | | - | |
152 | | - | |
| 153 | + | |
| 154 | + | |
153 | 155 | | |
154 | | - | |
155 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
159 | | - | |
| 163 | + | |
160 | 164 | | |
161 | 165 | | |
162 | | - | |
| 166 | + | |
163 | 167 | | |
164 | 168 | | |
165 | | - | |
| 169 | + | |
166 | 170 | | |
167 | 171 | | |
168 | | - | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
| |||
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
179 | | - | |
| 183 | + | |
180 | 184 | | |
181 | | - | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1232 | 1232 | | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
| 1235 | + | |
1239 | 1236 | | |
1240 | | - | |
| 1237 | + | |
| 1238 | + | |
1241 | 1239 | | |
| 1240 | + | |
1242 | 1241 | | |
1243 | 1242 | | |
1244 | 1243 | | |
| |||
0 commit comments