← Back to Pull requests

[ZEPPELIN-6216] Show clear message when job manager is disabled instead of infinite loading #5035

Closed
unknown closed this pull request without merging on Aug 28, 2025 12:11 UTC
View on GitHub
unknown unknown commented on Aug 20, 2025 15:19 UTC
Author

This PR is a rebased version of #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
  • Diff: 484 lines (+363 / -121) across 6 files Reviewer: Reamer Review duration: 11332m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 484 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.370
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5035"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%