You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/03/28 22:04:42 UTC

[GitHub] [yunikorn-k8shim] craigcondit opened a new pull request #399: [YUNIKORN-1159] Ensure node occupied resources are updated on added pods

craigcondit opened a new pull request #399:
URL: https://github.com/apache/yunikorn-k8shim/pull/399


   ### What is this PR for?
   Fixes an issue where non-yunikorn scheduled pods do not cause a node's occupied resources to update properly.
   
   ### What type of PR is it?
   * [x] - Bug Fix
   * [ ] - Improvement
   * [ ] - Feature
   * [ ] - Documentation
   * [ ] - Hot Fix
   * [ ] - Refactoring
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/YUNIKORN-1159
   
   ### How should this be tested?
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yunikorn-k8shim] pbacsko commented on a change in pull request #399: [YUNIKORN-1159] Ensure node occupied resources are updated on added pods

Posted by GitBox <gi...@apache.org>.
pbacsko commented on a change in pull request #399:
URL: https://github.com/apache/yunikorn-k8shim/pull/399#discussion_r837534343



##########
File path: pkg/cache/node_coordinator_test.go
##########
@@ -35,6 +35,48 @@ const (
 	HostEmpty = ""
 )
 
+func TestAddPod(t *testing.T) {
+	mockedSchedulerAPI := newMockSchedulerAPI()
+	nodes := newSchedulerNodes(mockedSchedulerAPI, NewTestSchedulerCache())
+	host1 := utils.NodeForTest(Host1, "10G", "10")
+	host2 := utils.NodeForTest(Host2, "10G", "10")
+	nodes.addNode(host1)
+	nodes.addNode(host2)
+	coordinator := newNodeResourceCoordinator(nodes)
+
+	// pod is not assigned to any node
+	// this won't trigger an update
+	pod := utils.PodForTest("pod1", "1G", "500m")
+	pod.Status.Phase = v1.PodPending
+	pod.Status.Phase = v1.PodPending

Review comment:
       Duplicated line




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yunikorn-k8shim] craigcondit commented on a change in pull request #399: [YUNIKORN-1159] Ensure node occupied resources are updated on added pods

Posted by GitBox <gi...@apache.org>.
craigcondit commented on a change in pull request #399:
URL: https://github.com/apache/yunikorn-k8shim/pull/399#discussion_r837538232



##########
File path: pkg/cache/node_coordinator_test.go
##########
@@ -35,6 +35,48 @@ const (
 	HostEmpty = ""
 )
 
+func TestAddPod(t *testing.T) {
+	mockedSchedulerAPI := newMockSchedulerAPI()
+	nodes := newSchedulerNodes(mockedSchedulerAPI, NewTestSchedulerCache())
+	host1 := utils.NodeForTest(Host1, "10G", "10")
+	host2 := utils.NodeForTest(Host2, "10G", "10")
+	nodes.addNode(host1)
+	nodes.addNode(host2)
+	coordinator := newNodeResourceCoordinator(nodes)
+
+	// pod is not assigned to any node
+	// this won't trigger an update
+	pod := utils.PodForTest("pod1", "1G", "500m")
+	pod.Status.Phase = v1.PodPending
+	pod.Status.Phase = v1.PodPending

Review comment:
       Fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yunikorn-k8shim] codecov[bot] commented on pull request #399: [YUNIKORN-1159] Ensure node occupied resources are updated on added pods

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #399:
URL: https://github.com/apache/yunikorn-k8shim/pull/399#issuecomment-1081960877


   # [Codecov](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#399](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (600208b) into [master](https://codecov.io/gh/apache/yunikorn-k8shim/commit/b17407f2980512d9812039cec7548998998765b3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b17407f) will **increase** coverage by `0.03%`.
   > The diff coverage is `76.19%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #399      +/-   ##
   ==========================================
   + Coverage   65.15%   65.18%   +0.03%     
   ==========================================
     Files          40       40              
     Lines        6291     6311      +20     
   ==========================================
   + Hits         4099     4114      +15     
   - Misses       2032     2036       +4     
   - Partials      160      161       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/appmgmt/appmgmt.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwcG1nbXQvYXBwbWdtdC5nbw==) | `28.94% <ø> (ø)` | |
   | [pkg/appmgmt/appmgmt\_recovery.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwcG1nbXQvYXBwbWdtdF9yZWNvdmVyeS5nbw==) | `67.92% <ø> (ø)` | |
   | [pkg/appmgmt/general/general.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwcG1nbXQvZ2VuZXJhbC9nZW5lcmFsLmdv) | `71.92% <ø> (ø)` | |
   | [pkg/cache/amprotocol\_mock.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2FtcHJvdG9jb2xfbW9jay5nbw==) | `0.00% <ø> (ø)` | |
   | [pkg/cache/application.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2FwcGxpY2F0aW9uLmdv) | `71.74% <ø> (ø)` | |
   | [pkg/cache/application\_events.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2FwcGxpY2F0aW9uX2V2ZW50cy5nbw==) | `98.44% <ø> (ø)` | |
   | [pkg/cache/context\_recovery.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2NvbnRleHRfcmVjb3ZlcnkuZ28=) | `41.73% <ø> (ø)` | |
   | [pkg/cache/external/scheduler\_cache.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2V4dGVybmFsL3NjaGVkdWxlcl9jYWNoZS5nbw==) | `43.26% <ø> (ø)` | |
   | [pkg/cache/node.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGUuZ28=) | `90.06% <ø> (ø)` | |
   | [pkg/cache/node\_events.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGVfZXZlbnRzLmdv) | `100.00% <ø> (ø)` | |
   | ... and [26 more](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [76ddb31...600208b](https://codecov.io/gh/apache/yunikorn-k8shim/pull/399?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yunikorn-k8shim] craigcondit closed pull request #399: [YUNIKORN-1159] Ensure node occupied resources are updated on added pods

Posted by GitBox <gi...@apache.org>.
craigcondit closed pull request #399:
URL: https://github.com/apache/yunikorn-k8shim/pull/399


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org