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

[YUNIKORN-2835] Refactor switch statement in UpdateApplication #901

Closed
wants to merge 1 commit into from

Conversation

blueBlue0102
Copy link
Contributor

What is this PR for?

The application state handling code in the UpdateApplication method of AsyncRMCallback struct (in scheduler_callback.go) could be improved.

The current implementation uses a switch statement with a default case that actually handles two specific states, which may not align with the typical expectations for a default case.

What type of PR is it?

  • - Refactoring

What is the Jira issue?

YUNIKORN-2835

How should this be tested?

This has already passed the CI tests(unit test) on my forked repo: Link

Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.89%. Comparing base (5bb3890) to head (ab5a184).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #901      +/-   ##
==========================================
+ Coverage   67.87%   67.89%   +0.02%     
==========================================
  Files          70       70              
  Lines        7489     7488       -1     
==========================================
+ Hits         5083     5084       +1     
+ Misses       2194     2192       -2     
  Partials      212      212              

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

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

@wilfred-s wilfred-s closed this in 2ce8431 Aug 27, 2024
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.

3 participants