Commit adf42d3
committed
fix: improve missing CRD detection
If starting the event source throws a 404 error, this means that there
is no API endpoint to handle the resource on the server. This is
indicative of the associated CRD not being deployed yet. We therefore
need to handle this case to throw a MissingCRDException. Since we don't
have the needed CRD information at the point of the exception, we let
the exception trickle up and provide the information (crd name and
version) where we know about it.
Fixes #4601 parent 5eab911 commit adf42d3
File tree
2 files changed
+32
-16
lines changed- operator-framework-core/src/main/java/io/javaoperatorsdk/operator
- processing/event
2 files changed
+32
-16
lines changedLines changed: 24 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
130 | | - | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 133 | + | |
143 | 134 | | |
144 | 135 | | |
145 | 136 | | |
146 | 137 | | |
147 | 138 | | |
148 | 139 | | |
149 | 140 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
154 | 149 | | |
155 | 150 | | |
156 | 151 | | |
| |||
171 | 166 | | |
172 | 167 | | |
173 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
174 | 182 | | |
175 | 183 | | |
176 | 184 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
0 commit comments