Commit 00a99cb
committed
pkg/types/featuregates: improve ergonomics
This commit removes error checking from the GenerateCustomFeatures
function. There are two possible errors that are caught in this
function, and both are already handled separately by validation. So
continually checking for errors throughout the code makes using
feature gate checks less ergonomic for no benefit.
The two potential errors are:
1. Unknown feature set within FeatureGateFromFeatureSets, which is
already validated here:
https://github.com/openshift/installer/blob/b36d7c201e0114aa0e9261cf8ae5b8d68c74bf07/pkg/types/validation/installconfig.go#L1051
2. The other is that a custom feature gate was incorrectly entered,
which is validated here:
https://github.com/openshift/installer/blob/master/pkg/types/validation/installconfig.go#L11031 parent 9b07817 commit 00a99cb
File tree
4 files changed
+20
-40
lines changed- pkg
- asset/manifests
- types
- featuregates
- validation
4 files changed
+20
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 50 | + | |
56 | 51 | | |
57 | 52 | | |
58 | | - | |
| 53 | + | |
59 | 54 | | |
60 | 55 | | |
61 | 56 | | |
62 | | - | |
| 57 | + | |
63 | 58 | | |
64 | 59 | | |
65 | 60 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 61 | + | |
70 | 62 | | |
71 | 63 | | |
72 | 64 | | |
| |||
75 | 67 | | |
76 | 68 | | |
77 | 69 | | |
78 | | - | |
| 70 | + | |
79 | 71 | | |
80 | 72 | | |
81 | 73 | | |
82 | 74 | | |
83 | | - | |
| 75 | + | |
84 | 76 | | |
85 | 77 | | |
86 | 78 | | |
87 | 79 | | |
88 | 80 | | |
89 | | - | |
| 81 | + | |
90 | 82 | | |
91 | 83 | | |
92 | 84 | | |
93 | 85 | | |
94 | 86 | | |
95 | 87 | | |
96 | 88 | | |
97 | | - | |
| 89 | + | |
98 | 90 | | |
99 | 91 | | |
100 | | - | |
| 92 | + | |
101 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
526 | 526 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 527 | + | |
531 | 528 | | |
532 | 529 | | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
538 | 533 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
1132 | | - | |
| 1127 | + | |
1133 | 1128 | | |
| 1129 | + | |
1134 | 1130 | | |
1135 | 1131 | | |
1136 | 1132 | | |
| |||
0 commit comments