yunikorn-web icon indicating copy to clipboard operation
yunikorn-web copied to clipboard

[YUNIKORN-3076] WebUI fails to load apps that are in 'New' state and …

Open mitdesai opened this issue 6 months ago • 2 comments

…does not have stateLog

What is this PR for?

This pull request addresses an issue in the web UI where the absence of a stateLog object for applications in the 'New' state causes the page to fail loading the list of applications. By setting a default value for the stateLog object and ensuring it is an Array object, we ensure that the application list can be loaded and displayed correctly, even when some applications are in the 'New' state without a stateLog.

Issue: When an application is reported to be in a 'New' state by the scheduler, it does not have a stateLog object. On the web UI side, there are currently no checks to handle the absence of the stateLog object. As a result, when the application list contains an application in the 'New' state and the stateLog is missing, the code attempts to access this.stateLog, leading to a failure and preventing the page from loading any applications.

This behavior has been observed on clusters with heavy load.

What type of PR is it?

  • [X] - Bug Fix
  • [ ] - Improvement
  • [ ] - Feature
  • [ ] - Documentation
  • [ ] - Hot Fix
  • [ ] - Refactoring

Todos

  • [ ] - Task

What is the Jira issue?

  • https://issues.apache.org/jira/browse/YUNIKORN-3076

How should this be tested?

Screenshots (if appropriate)

Questions:

  • [ ] - The licenses files need update.
  • [ ] - There is breaking changes for older versions.
  • [ ] - It needs documentation.

mitdesai avatar May 12 '25 21:05 mitdesai

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 35.71%. Comparing base (5e9bbac) to head (6e9555f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #233   +/-   ##
=======================================
  Coverage   35.71%   35.71%           
=======================================
  Files           2        2           
  Lines          56       56           
=======================================
  Hits           20       20           
  Misses         33       33           
  Partials        3        3           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar May 15 '25 00:05 codecov-commenter

Thanks for the review @craigcondit

mitdesai avatar May 15 '25 04:05 mitdesai