Commit 7494bec
[ZEPPELIN-6241] Fail fast when default web app context fails to initialize due to missing resources
### What is this PR for?
Currently, the server keeps running even when all web app contexts fail to initialize due to missing files or directories for web resources.
In my opinion, if the web resource path for the default web app context does not exist, it would be better to shut down the server immediately, since the context initialization will fail anyway. In such cases, other essential features like REST APIs and WebSocket communication also won’t work properly, so keeping the server running doesn’t seem meaningful.
The absence of non-default web resources, however, seems generally acceptable. So this PR ensures that we only fail fast when the default web app context is missing its required resources.
### What type of PR is it?
Improvement
### What is the Jira issue?
- https://issues.apache.org/jira/browse/ZEPPELIN-6241
### How should this be tested?
- Start the server with the default web app directory intentionally missing.
- Verify that the server fails to start and exit immediately.
- Ensure that non-default apps can still be missing without preventing startup
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Closes #4969 from tbonelee/fail-fast.
Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
(cherry picked from commit 25cd340)
Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>1 parent e74ffb2 commit 7494bec
2 files changed
Lines changed: 17 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
233 | 228 | | |
234 | | - | |
| 229 | + | |
235 | 230 | | |
236 | | - | |
| 231 | + | |
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
| |||
279 | 274 | | |
280 | 275 | | |
281 | 276 | | |
282 | | - | |
| 277 | + | |
283 | 278 | | |
284 | 279 | | |
285 | 280 | | |
| |||
290 | 285 | | |
291 | 286 | | |
292 | 287 | | |
293 | | - | |
| 288 | + | |
294 | 289 | | |
295 | 290 | | |
296 | 291 | | |
| |||
588 | 583 | | |
589 | 584 | | |
590 | 585 | | |
591 | | - | |
| 586 | + | |
592 | 587 | | |
593 | 588 | | |
594 | 589 | | |
| 590 | + | |
| 591 | + | |
595 | 592 | | |
596 | 593 | | |
597 | 594 | | |
| |||
0 commit comments