Commit 6a0dd0b
fix(bootstrap): improve logging and graph cleanup
1. **Fix logging condition for multiple-versions mode**
- Change from `if len(results) > 1` to `if self.multiple_versions`
- Now logs version count whenever multiple-versions mode is requested,
not just when we get more than 1 result
- Helps users understand what happened even when 0 or 1 versions match
- Applied in both resolve_and_add_top_level() and bootstrap()
2. **Fix dangling parent references in dependency graph**
- Problem: remove_dependency() only cleaned up forward edges (children)
but not back-references (parents), leaving dangling references
- Solution: Before deleting node, iterate children and remove the
back-references from each child's parents list
- Prevents issues in graph traversals like _collect_dependents()
- Updated docstring to document both cleanup operations
All 447 unit tests pass. All graph-related e2e tests pass.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Rohan Devasthale <rdevasth@redhat.com>1 parent 321a95f commit 6a0dd0b
2 files changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| |||
357 | 359 | | |
358 | 360 | | |
359 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
360 | 373 | | |
361 | 374 | | |
362 | 375 | | |
363 | | - | |
364 | | - | |
| 376 | + | |
365 | 377 | | |
366 | 378 | | |
367 | 379 | | |
| |||
0 commit comments