This repository was archived by the owner on May 3, 2022. It is now read-only.
Commit c11dff7
committed
release controller: move cluster choosing to scheduling
This may or may not make conceptual sense (it does to me, but I could
not find out why choosing clusters and scheduling a release was two
separate steps in the first place, although after #166[1] I'm fairly
convinced this was just a technical artifact), but it sure is
convenient: we move all the error handling during the scheduling step
to a single chunk of code. This fixes an issue where errors in
ChooseClusters were not reflected in any condition, making the Release
object not change during the sync, and therefore not triggering any
events, being essentially invisible to users.
As a bonus, I restored the actual testing part of this in the unit
tests. We were previously just checking that ChooseClusters didn't
trigger any updates, without actually checking if it was doing the right
thing (choosing clusters).
[1] https://github.com/bookingcom/shipper/pull/166/files#diff-caffe52421149f1f8d77a0e7c749867dR327-R3411 parent 01d854e commit c11dff7
File tree
3 files changed
+31
-37
lines changed- pkg/controller/release
3 files changed
+31
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | 389 | | |
408 | 390 | | |
409 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 355 | + | |
362 | 356 | | |
363 | | - | |
364 | | - | |
| 357 | + | |
| 358 | + | |
365 | 359 | | |
366 | 360 | | |
367 | 361 | | |
368 | | - | |
369 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
370 | 367 | | |
371 | 368 | | |
372 | 369 | | |
| |||
391 | 388 | | |
392 | 389 | | |
393 | 390 | | |
394 | | - | |
| 391 | + | |
395 | 392 | | |
396 | | - | |
397 | | - | |
| 393 | + | |
| 394 | + | |
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
401 | | - | |
402 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
0 commit comments