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-2575] Clarify error returned by IsPodFitNode #824

Closed
wants to merge 1 commit into from

Conversation

wilfred-s
Copy link
Contributor

What is this PR for?

IsPodFitNode should clearly set the error if the pod or node is missing from the cache when run. The result, if it is an error, contains the predicate plugin name that failed to improve identification in the events.

What type of PR is it?

  • - Improvement

What is the Jira issue?

How should this be tested?

NA, no behaviour change just cleanup of return values

IsPodFitNode should clearly set the error if the pod or node is missing
from the cache when run. The result, if it is an error, contains the
predicate plugin name that failed to improve identification in the
events.
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 (pending e2e test runs).

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 66.05%. Comparing base (741c0d8) to head (61ebffd).

Files Patch % Lines
pkg/cache/context.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #824      +/-   ##
==========================================
- Coverage   66.13%   66.05%   -0.08%     
==========================================
  Files          69       69              
  Lines        7517     7523       +6     
==========================================
- Hits         4971     4969       -2     
- Misses       2334     2342       +8     
  Partials      212      212              

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

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@wilfred-s nice patch! a couple of comments left. PTAL

pkg/cache/context.go Show resolved Hide resolved
pkg/cache/context.go Show resolved Hide resolved
pkg/cache/context.go Show resolved Hide resolved
@wilfred-s
Copy link
Contributor Author

this is unrelated to this PR, but the returned type of GetPod is inconsistent to GetNode. Maybe we should align them

Logged YUNIKORN-2578 for that as I noticed the same. Also logged YUNIKORN-2577 to clean up the IsPodFitNodeViaPreemption function

Copy link
Contributor

@chia7712 chia7712 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 2998163 Apr 24, 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
4 participants