Commit 63fed39
Add strict flag to agent (#196)
* Add strict flag to agent
Agent will hard fail if a data gatherer is defined for a missing CRD.
Related [#510](jetstack/preflight-platform#510)
Signed-off-by: oluwole.fadeyi <[email protected]>
* Adds new type of error and changed strict flag
New error type: CRDNotFoundError
This is to catch the edge case that when a CRD is not found
the backoff loop should not be retried
The strict flag has been changed to hard fail if an error of any type
is returned, including if a CRD is not found
Signed-off-by: Jamie Leppard <[email protected]>
* Improves error handling
Error from CRDNotFoundError is now not appeneded to dgError
if not in strict mode.
Strict mode no longer iterates over a multi error but checks to see if
any errors are present at all
Signed-off-by: Jamie Leppard <[email protected]>
* Changes CRDNotFoundError to ConfigError
The CRDNotFound error in the k8s package has been
changed to a more general ConfigError in the local package
Signed-off-by: Jamie Leppard <[email protected]>
* Added new error package for datagatherers
The config error has been moved to a new package dedicated to
error associated with data gatherers
Signed-off-by: Jamie Leppard <[email protected]>
Co-authored-by: oluwole.fadeyi <[email protected]>
Co-authored-by: Jamie Leppard <[email protected]>1 parent c62dbc4 commit 63fed39
File tree
4 files changed
+57
-8
lines changed- cmd
- pkg
- agent
- datagatherer
- error
- k8s
4 files changed
+57
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
210 | | - | |
211 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
212 | 225 | | |
213 | 226 | | |
214 | 227 | | |
| |||
238 | 251 | | |
239 | 252 | | |
240 | 253 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
245 | 259 | | |
246 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
247 | 267 | | |
| 268 | + | |
248 | 269 | | |
249 | 270 | | |
250 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
| |||
0 commit comments