Skip to content

Conversation

mitdesai
Copy link
Contributor

…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?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

How should this be tested?

Screenshots (if appropriate)

Questions:

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

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Contributor

@craigcondit craigcondit left a comment

Choose a reason for hiding this comment

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

+1 LGTM (and backport to branch-1.7)

@craigcondit craigcondit requested a review from wilfred-s May 15, 2025 00:11
@mitdesai
Copy link
Contributor Author

Thanks for the review @craigcondit

Copy link
Contributor

@wilfred-s wilfred-s left a comment

Choose a reason for hiding this comment

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

LGTM, missing newline in the test file I will add on commit.

@wilfred-s wilfred-s closed this in 541135b May 27, 2025
wilfred-s pushed a commit that referenced this pull request May 27, 2025
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.

Closes: #233

Signed-off-by: Wilfred Spiegelenburg <[email protected]>
(cherry picked from commit 541135b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants