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-2153]Optimize Placement of predicateCheckResult for Better Maintainability #1011

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaichiachen
Copy link

@kaichiachen kaichiachen commented Jan 25, 2025

What is this PR for?

Create predicate.go to encapsulate the declaration and implementation of predicateCheckResult, improves code organization by centralizing predicate-related logic, enhancing maintainability and readability.

What type of PR is it?

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

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/projects/YUNIKORN/issues/YUNIKORN-2153

How should this be tested?

  1. Unit test
#> go test -cover ./pkg/scheduler/objects/...                
ok      github.com/apache/yunikorn-core/pkg/scheduler/objects   (cached)        coverage: 88.9% of statements
ok      github.com/apache/yunikorn-core/pkg/scheduler/objects/events    (cached)        coverage: 100.0% of statements
ok      github.com/apache/yunikorn-core/pkg/scheduler/objects/template  (cached)        coverage: 100.0% of statements
  1. Manual Preemtion test
    2.1 Create cluster with kind and install yunikorn
    2.2 Create pods with low priority but request a lot of resources
    2.3 Create a pod with higher priority
    2.4 Some of pods created at 2.2 are eviction and pod in 2.3 can be scheduled to k8s cluster

Screenshots (if appropriate)

Questions:

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

@kaichiachen kaichiachen marked this pull request as draft January 25, 2025 11:50
@kaichiachen kaichiachen changed the title Optimize Placement of predicateCheckResult for Better Maintainability [YUNIKORN-2153]Optimize Placement of predicateCheckResult for Better Maintainability Jan 28, 2025
@kaichiachen kaichiachen marked this pull request as ready for review January 28, 2025 08:32
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.

1 participant