Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11781. Add last task status information to Recon UI #7472

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

devabhishekpal
Copy link
Contributor

@devabhishekpal devabhishekpal commented Nov 22, 2024

What changes were proposed in this pull request?

HDDS-11781. Add last task status information to Recon UI.

In the current code, Recon doesn't have a marker to store if the last task run was completed successfully or not.
As a part of this PR we are targeting two main things:

  • Have a record of the last task status i.e successful or failed
  • Display that information in the UI

The current code already calls the /task/status API endpoint to fetch the Om sync last updated timestamp. We are adding an extra column to the RECON_TASK_STATUS table to store the last run success, and returning that as a part of the API response to use in the UI.

The last task status stores values as true, false or null where:

  • true: The last task was completed successfully - Display green check in UI
  • false: The last task failed. - Display red check in UI
  • null: The last task didn't take place (first time task run). - Display yellow check in UI

In the UI the following changes are added:

  • Add a notification style panel to allow showing task status
  • Tasks can be:
    • Last task was Successful - Shows a green tick icon
    • First run didn't happen yet - Shows yellow warning icon
    • Last task run has failed - Shows a red cross icon
  • The notification message count is based on the following conditions:
    • If a failed run is present, that takes precedence over warning and that count will be displayed as a red circle on the status
    • If only warning run is present, the count of the warning will be shown with a yellow dot
    • If all tasks successful, no count is displayed

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11781

How was this patch tested?

Manually
Screenshot 2024-11-23 at 02 06 08
Screenshot 2024-11-23 at 02 06 24
Screenshot 2024-11-24 at 19 47 52

@devmadhuu devmadhuu self-requested a review November 25, 2024 05:59
Copy link
Contributor

@devmadhuu devmadhuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @devabhishekpal for the patch. I think we need to improve the usability and information related to task status we are providing over. We need to design showing following:

  1. Need to have some good UX design from dashboard/tile perspective and not showing in alerts.
  2. Keep track of each instance of task run and can differentiate between each task run instead of just updating and overwriting the same task run instance.
  3. Tracking each run of task instances, we can show some important information about each task like how many times a task failed/succeeded in the last X units of time.
  4. Before coming to UI, some backend design and development needs to happen as part of HDDS-11680

@errose28 errose28 self-requested a review November 25, 2024 16:21
@errose28
Copy link
Contributor

Thanks for adding this @devabhishekpal. IMO we should not expose internal class names so prominently on the UI (or at all) as these have little meaning to end users. It would be more intuitive if each page/section/tile displayed some symbol if there were issues generating that information.

@ArafatKhan2198
Copy link
Contributor

Thank you, @devabhishekpal, for the proposal. I understand we are adding a new column to the RECON_TASK_STATUS_TABLE to track the status of tasks and determine whether they were successfully executed previously. This approach works well for a freshly installed cluster; however, it may lead to compatibility issues in upgraded clusters.

When upgrading Ozone and Recon, we only modify the code, not the database tables. Therefore, it’s essential to write an alter script to add this new column to the existing table. This script should execute when it detects that the newly added column in the RECON_TASK_STATUS_TABLE is missing. However, it must be implemented carefully to ensure the alter script runs only once and not on every restart.

To address this requirement, please leverage the newly introduced Recon Layout Feature, which is designed for managing changes involving database table modifications.

You can refer to the Developer Documentation for the Recon Layout Feature here: Recon Layout Feature Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants