[ZEPPELIN-6216] Show clear message when job manager is disabled instead of infinite loading#5035
Conversation
|
The original branch was deleted, so I recreated it and opened this new PR. I’ve rebased and merged up to the latest commits. @Reamer @tbonelee |
46e70e5 to
eeefcbf
Compare
Reamer
left a comment
There was a problem hiding this comment.
Backend Code LGTM
We need a review for the frontend part.
tbonelee
left a comment
There was a problem hiding this comment.
Frontend code LGTM.
I left a comment in the previous PR suggesting a change related to the ng-if block nesting.
It's a just code structure suggestion, not a logical issue, so feel free to share your thoughts on it.
ParkGyeongTae
left a comment
There was a problem hiding this comment.
I think this change will help reduce user confusion.
|
@Reamer @tbonelee @ParkGyeongTae Thank you for your review and feedback. |
|
@devyeony There are conflicts with master. Please rebase your branch on master and force-push to fix them. |
…ad of infinite loading
095ab99
eeefcbf to
095ab99
Compare
|
@ParkGyeongTae Conflicts with master were resolved via rebase and force-push. |
|
We have a CI failure. |
…disabled Previously, JobManagerService threw JobManagerForbiddenException immediately when zeppelin.jobmanager.enable = false. After code review, the behavior was changed to return Collections.emptyList() and report the exception via the callback. This commit updates the tests to reflect the new behavior and prevent CI failures.
|
@Reamer, thank you for your feedback on the parts I missed. I would appreciate it if you could take a look at this test code
✨ Test Refactoring: 💡 Future Improvements:
|
ParkGyeongTae
left a comment
There was a problem hiding this comment.
LGTM 👍
Just to note, the CI failure in license-check (pull_request) is already fixed in another PR, so no problem.
See: #5047
…ad of infinite loading > This PR is a rebased version of [#5022](#5022) > The previous PR was automatically closed because the branch was deleted, so I recreated the branch and opened this new PR. ### What is this PR for? This PR fixes the issue that occurs when `zeppelin.jobmanager.enable` is set to `false`. In this case, the server sends no response, causing the Job Manager page in both classic and new UIs to show an infinite loading indicator. This behavior confuses users and gives the impression that the page is broken. To improve user experience, this PR introduces explicit server-side handling that returns an explicit "not allowed" response when the Job Manager is disabled via configuration. Additionally, both classic and new UIs have been updated to properly handle this response and display a user-friendly message: **"Job Manager is disabled in the current configuration."** This change ensures users are informed about the disabled state instead of encountering an endless loading screen. ### What type of PR is it? Improvement ### Todos * [x] Implement server-side forbidden response when Job Manager is disabled * [x] Add `JOB_MANAGER_DISABLED` WebSocket message and corresponding handling in both Classic and New UI * [x] Add unit and integration tests covering the new behavior **Note:** * Although REST API tests have been implemented, the current frontend (both Classic and New UI) interacts with the Job Manager primarily through WebSocket communication. Therefore, the functional verification and actual handling of the "Job Manager disabled" scenario have been focused on the WebSocket path. The REST API tests are prepared to ensure future compatibility if the REST endpoints are used. * In the user-request handling method, a ForbiddenException triggers sending a clear error message to the client so the UI can inform the user that the Job Manager is disabled. However, during broadcast events where no direct client request is involved, the exception is logged at debug level and silently skipped to avoid unnecessary noise or client interruptions. ### What is the Jira issue? [[ZEPPELIN-6216]](https://issues.apache.org/jira/browse/ZEPPELIN-6216) ### How should this be tested? * Automated tests have been added to cover the new behavior when the Job Manager is disabled: * Unit tests in `JobManagerServiceTest` verify that forbidden exceptions are thrown. * REST API tests in `NotebookRestApiTest` check that HTTP 403 responses with appropriate messages are returned. * WebSocket and server event handling tests in `NotebookServerTest` ensure no unexpected exceptions occur and proper notification messages are sent. * Manual testing steps: 1. Set `zeppelin.jobmanager.enable` to `false` via `ZeppelinConfiguration`. 2. Access the Job Manager page in both classic and new UI. 3. Confirm that instead of infinite loading, a clear message stating **"Job Manager is disabled in the current configuration."** is displayed. ### Screenshots (if appropriate) * AS-IS (New UI) <img width="862" height="362" alt="AS-IS NEW UI" src="https://github.com/user-attachments/assets/e2a1288f-5952-4ea0-a31b-a267f49f171e" /> * AS-IS (Classic UI) <img width="864" height="424" alt="AS-IS CLASSIC UI" src="https://github.com/user-attachments/assets/bc111aff-e95c-4427-a266-af7f9f600407" /> * TO-BE (New UI) <img width="870" height="305" alt="TO-BE NEW UI" src="https://github.com/user-attachments/assets/0555e5dc-2ee8-4000-b1eb-c7d2259e96b1" /> * TO-BE (Classic UI) <img width="875" height="275" alt="TO-BE CLASSIC UI" src="https://github.com/user-attachments/assets/e0a87e98-fde8-467b-9df3-d9ada39deb36" /> ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #5035 from devyeony/feature/ZEPPELIN-6216. Signed-off-by: ChanHo Lee <chanholee@apache.org> (cherry picked from commit fbd94da) Signed-off-by: ChanHo Lee <chanholee@apache.org>
|
Merged into |
What is this PR for?
This PR fixes the issue that occurs when
zeppelin.jobmanager.enableis set tofalse. In this case, the server sends no response, causing the Job Manager page in both classic and new UIs to show an infinite loading indicator. This behavior confuses users and gives the impression that the page is broken.To improve user experience, this PR introduces explicit server-side handling that returns an explicit "not allowed" response when the Job Manager is disabled via configuration. Additionally, both classic and new UIs have been updated to properly handle this response and display a user-friendly message: "Job Manager is disabled in the current configuration."
This change ensures users are informed about the disabled state instead of encountering an endless loading screen.
What type of PR is it?
Improvement
Todos
JOB_MANAGER_DISABLEDWebSocket message and corresponding handling in both Classic and New UINote:
What is the Jira issue?
[ZEPPELIN-6216]
How should this be tested?
JobManagerServiceTestverify that forbidden exceptions are thrown.NotebookRestApiTestcheck that HTTP 403 responses with appropriate messages are returned.NotebookServerTestensure no unexpected exceptions occur and proper notification messages are sent.zeppelin.jobmanager.enabletofalseviaZeppelinConfiguration.Screenshots (if appropriate)
Questions: