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-1126] Add e2e test for best effort pod #904

Closed

Conversation

rrajesh-cloudera
Copy link
Contributor

@rrajesh-cloudera rrajesh-cloudera commented Sep 3, 2024

This PR is for adding end-to-end tests to verify the scheduling of pods with different Quality of Service (QOS) classes in the YuniKorn Kubernetes scheduler. The tests are specifically checking the scheduling of pods with "BestEffort" and "NonBestEffort" (likely "Burstable" or "Guaranteed") QOS classes.
The tests ensure that the pods are correctly scheduled and running and that their QOS classes are as expected. The PR also includes changes to the SleepPodConfig struct and the InitSleepPod function to support setting the QOS class of the pods.

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/browse/YUNIKORN-1126

How should this be tested?

Screenshots (if appropriate)

Questions:

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

@ryankert01
Copy link
Contributor

Your change doesn't look like 2714 in your jira link, please update that.

@rrajesh-cloudera
Copy link
Contributor Author

Your change doesn't look like 2714 in your jira link, please update that.
Updated the Jira in The Description, Copy Paste error. Thanks for Pointing it out!

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.20%. Comparing base (f8e9c11) to head (9513903).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #904      +/-   ##
==========================================
+ Coverage   68.04%   68.20%   +0.15%     
==========================================
  Files          70       70              
  Lines        7558     7558              
==========================================
+ Hits         5143     5155      +12     
+ Misses       2205     2197       -8     
+ Partials      210      206       -4     

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


ginkgo.By("Verify that the pod's QOS class is BestEffort")
gomega.Ω(bestEffortPod.Status.QOSClass).To(gomega.Equal(v1.PodQOSBestEffort))

Copy link
Contributor

Choose a reason for hiding this comment

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

assert name and more importantly resource. Resource should be {memory:1}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For BestEffortPod we are not setting any resources.

  • Guaranteed: A pod where each container has the same requests and limits for CPU and memory.
  • Burstable: A pod where one or more containers have resource requests set, but no corresponding limits or they differ.
  • BestEffort: A pod where neither resource requests nor limits are set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added requested assertion to the test


ginkgo.By("Verify that the pod's QOS class is not BestEffort")
gomega.Ω(burstablePod.Status.QOSClass).NotTo(gomega.Equal(v1.PodQOSBestEffort))

Copy link
Contributor

Choose a reason for hiding this comment

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

assert name and resource. resource should be same as the one passed through config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @manirajv06 , Updated the code with the latest code. Added assertion for resource allocation and name for both cases.

@pbacsko pbacsko self-requested a review September 5, 2024 12:56
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.

@craigcondit craigcondit changed the title [YUNIKORN-1126] Added E2E Tests for Best Effort Pod [YUNIKORN-1126] Add e2e test for best effort pod Sep 5, 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.

4 participants