Commit 7669f36
authored
Add cycle detection with panic (#346)
Fixes aws-controllers-k8s/community#1327
Description of changes:
The majority of our code-generator templates and methods rely on our custom resource properties being represented as DAGs. That is, they can recurse through their children until they reach primitive values at the base. Without a major refactor, it is not possible to support a cyclic field reference. This pull request adds logic to detect a cycle as we are iterating over new fields and will panic to tell the user about the limitation.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent a45f3b9 commit 7669f36
File tree
5 files changed
+1853
-2
lines changed- pkg
- model
- testdata/models/apis/emrcontainers/0000-00-00
5 files changed
+1853
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
232 | 249 | | |
233 | 250 | | |
234 | 251 | | |
| |||
269 | 286 | | |
270 | 287 | | |
271 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
272 | 298 | | |
273 | 299 | | |
274 | 300 | | |
275 | 301 | | |
276 | 302 | | |
277 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
278 | 314 | | |
279 | | - | |
280 | | - | |
| 315 | + | |
| 316 | + | |
281 | 317 | | |
| 318 | + | |
282 | 319 | | |
283 | 320 | | |
284 | 321 | | |
| |||
287 | 324 | | |
288 | 325 | | |
289 | 326 | | |
| 327 | + | |
290 | 328 | | |
291 | 329 | | |
292 | 330 | | |
| |||
| 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 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments