Commit ee4bab5
š fix: Configuration validation errors now show "Failed" status instead of "Absent" (#2465)
* Make config errors permanent instead of retrying
When configuration is invalid, mark it as a permanent error so the
system doesn't keep trying to install it over and over. This saves
resources and makes it clear the user needs to fix their config.
Assisted-by: Claude <noreply@anthropic.com>
* Show "Failed" status when config is wrong
Before: Invalid config showed status as "Absent" which was confusing
After: Shows "Failed" so users know something is wrong
Only checks the latest attempt, not old ones that don't matter anymore.
Assisted-by: Claude <noreply@anthropic.com>
* Fix status not updating when BOXCUTTER config fails
BOXCUTTER runtime was returning early on config errors without
setting the status. Now it updates the status first so users can
see what went wrong.
Assisted-by: Claude <noreply@anthropic.com>
* Add tests for config error handling
Tests check:
- Config errors are permanent (not retried)
- Status shows "Failed" when config is wrong
- Namespace names are validated
- AllNamespaces operators reject watchNamespace config
Includes both unit tests and end-to-end tests.
Assisted-by: Claude <noreply@anthropic.com>
* Remove 'terminal error:' prefix from status messages
When TerminalError is used, unwrap it before showing the error
message in status conditions. This prevents the 'terminal error:'
prefix from appearing in user-facing messages.
Changes:
- Add UnwrapTerminal() helper function to cleanly unwrap terminal errors
- Use the helper in setStatusProgressing and wrapErrorWithResolutionInfo
- Don't set Installed condition when Progressing is Blocked (terminal error)
since the Progressing condition already provides all necessary information
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add custom TerminalError with granular Reason support
Previously, all terminal errors used the generic "Blocked" reason in
the Progressing condition. This wasn't semantically correct - "Blocked"
was intended for external blockers like resource collisions, not for
user configuration errors.
This commit introduces a custom TerminalError type that can carry a
specific Reason field, allowing more precise categorization of terminal
errors in status conditions.
Changes:
- Add ReasonInvalidConfiguration constant for configuration errors
- Create NewTerminalError(reason, err) to wrap errors with a reason
- Add ExtractTerminalReason(err) to retrieve the reason from errors
- Update setStatusProgressing to use extracted reason when available
- Fall back to ReasonBlocked for backward compatibility with plain
reconcile.TerminalError() usage
- Update config validation to use ReasonInvalidConfiguration
- Update tests and e2e expectations accordingly
Result:
- Config errors now show: Progressing: False, Reason: InvalidConfiguration
- Generic terminal errors show: Progressing: False, Reason: Blocked
- More helpful and semantically correct status reporting
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Update internal/operator-controller/controllers/boxcutter_reconcile_steps.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 5c4bf7b commit ee4bab5
File tree
10 files changed
+362
-17
lines changed- api/v1
- internal
- operator-controller
- applier
- conditionsets
- controllers
- test/e2e/features
10 files changed
+362
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
103 | 135 | | |
104 | 136 | | |
105 | 137 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
458 | 472 | | |
459 | 473 | | |
460 | 474 | | |
| |||
Lines changed: 52 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 60 | + | |
| 61 | + | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| |||
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
74 | 111 | | |
75 | 112 | | |
76 | 113 | | |
| |||
119 | 156 | | |
120 | 157 | | |
121 | 158 | | |
122 | | - | |
| 159 | + | |
| 160 | + | |
123 | 161 | | |
124 | 162 | | |
125 | 163 | | |
126 | 164 | | |
127 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
128 | 173 | | |
129 | 174 | | |
130 | 175 | | |
| |||
0 commit comments