From e59162db4067bf2b0997c49d665eaafd50fc4aa6 Mon Sep 17 00:00:00 2001 From: Craig Condit Date: Tue, 25 Jun 2024 13:29:57 -0500 Subject: [PATCH] [YUNIKORN-2698] Update to latest core and fix compilation issues (#862) Fix compilation issue in recovery e2e tests Closes: #862 Signed-off-by: Craig Condit --- go.mod | 8 ++++---- go.sum | 11 ++++++----- pkg/cache/task_test.go | 2 +- pkg/client/clients_test.go | 8 ++++---- test/e2e/basic_scheduling/basic_scheduling_test.go | 1 - .../recovery_and_restart/recovery_and_restart_test.go | 1 - 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 7fba9efc6..28f28253c 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ module github.com/apache/yunikorn-k8shim go 1.21 require ( - github.com/apache/yunikorn-core v0.0.0-20240427112336-e3d94294b4ef + github.com/apache/yunikorn-core v0.0.0-20240625135621-67a7167f945b github.com/apache/yunikorn-scheduler-interface v0.0.0-20240425182941-07f5695119a1 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 @@ -123,15 +123,15 @@ require ( go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.20.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect diff --git a/go.sum b/go.sum index a2e8fe1a9..454b62df3 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= -github.com/apache/yunikorn-core v0.0.0-20240427112336-e3d94294b4ef h1:m/wkG8mJqJ/eAihWR/g5IVfkHl79ve5geXXKM0U/slE= -github.com/apache/yunikorn-core v0.0.0-20240427112336-e3d94294b4ef/go.mod h1:BaNNx6FksvVu/8tfo7qNQvVhAsD284ybdJnLoFIexgA= +github.com/apache/yunikorn-core v0.0.0-20240625135621-67a7167f945b h1:uaMerB8Uin550/sgS3qNiynw5ZbQFMzjjWjysFZ0VV4= +github.com/apache/yunikorn-core v0.0.0-20240625135621-67a7167f945b/go.mod h1:pSi7AFBRiGCGQ7RwQffpD4m6dvA5lc1HuCrg7LpJJqs= github.com/apache/yunikorn-scheduler-interface v0.0.0-20240425182941-07f5695119a1 h1:v4J9L3MlW8BQfYnbq6FV2l3uyay3SqMS2Ffpo+SFat4= github.com/apache/yunikorn-scheduler-interface v0.0.0-20240425182941-07f5695119a1/go.mod h1:WuHJpVk34t8N5+1ErYGj/5Qq33/cRzL4YtuoAsbMtWc= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -270,16 +270,17 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc= +golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/pkg/cache/task_test.go b/pkg/cache/task_test.go index 8b0692e0e..a74983b35 100644 --- a/pkg/cache/task_test.go +++ b/pkg/cache/task_test.go @@ -200,7 +200,7 @@ func TestReleaseTaskAllocation(t *testing.T) { assert.NilError(t, err, "failed to handle AllocateTask event") assert.Equal(t, task.GetTaskState(), TaskStates().Allocated) // bind a task is a async process, wait for it to happen - err = common.WaitFor(100*time.Millisecond, 3*time.Second, func() bool { + err = common.WaitForCondition(100*time.Millisecond, 3*time.Second, func() bool { return task.getNodeName() == "node-1" }) assert.NilError(t, err, "failed to wait for allocation allocationKey being set for task") diff --git a/pkg/client/clients_test.go b/pkg/client/clients_test.go index 4d7715dc3..368dfac6a 100644 --- a/pkg/client/clients_test.go +++ b/pkg/client/clients_test.go @@ -58,16 +58,16 @@ func TestRun(t *testing.T) { }() clients.Run(stop) - err := common.WaitForCondition(func() bool { + err := common.WaitForCondition(10*time.Millisecond, time.Second, func() bool { return test.RunningInformers.Load() == noOfInformers - }, 10*time.Millisecond, time.Second) + }) assert.NilError(t, err, "number of running informers: expected %d got %d", noOfInformers, test.RunningInformers.Load()) close(stop) stopped = true - err = common.WaitForCondition(func() bool { + err = common.WaitForCondition(10*time.Millisecond, time.Second, func() bool { return test.RunningInformers.Load() == 0 - }, 10*time.Millisecond, time.Second) + }) assert.NilError(t, err, "no. of informers still running: %d", test.RunningInformers.Load()) } diff --git a/test/e2e/basic_scheduling/basic_scheduling_test.go b/test/e2e/basic_scheduling/basic_scheduling_test.go index 9ca63d7ff..a95e091ab 100644 --- a/test/e2e/basic_scheduling/basic_scheduling_test.go +++ b/test/e2e/basic_scheduling/basic_scheduling_test.go @@ -110,7 +110,6 @@ var _ = ginkgo.Describe("", func() { gomega.Ω(allocation).NotTo(gomega.BeNil()) gomega.Ω(allocation.AllocationKey).NotTo(gomega.BeNil()) gomega.Ω(allocation.NodeID).NotTo(gomega.BeNil()) - gomega.Ω(allocation.Partition).NotTo(gomega.BeNil()) gomega.Ω(allocation.ApplicationID).To(gomega.Equal(sleepRespPod.ObjectMeta.Labels["applicationId"])) core := sleepRespPod.Spec.Containers[0].Resources.Requests.Cpu().MilliValue() mem := sleepRespPod.Spec.Containers[0].Resources.Requests.Memory().Value() diff --git a/test/e2e/recovery_and_restart/recovery_and_restart_test.go b/test/e2e/recovery_and_restart/recovery_and_restart_test.go index 5e89952f9..d78326f99 100644 --- a/test/e2e/recovery_and_restart/recovery_and_restart_test.go +++ b/test/e2e/recovery_and_restart/recovery_and_restart_test.go @@ -141,7 +141,6 @@ var _ = ginkgo.Describe("", func() { gomega.Ω(allocations).NotTo(gomega.BeNil()) gomega.Ω(allocations.AllocationKey).NotTo(gomega.BeNil()) gomega.Ω(allocations.NodeID).NotTo(gomega.BeNil()) - gomega.Ω(allocations.Partition).NotTo(gomega.BeNil()) gomega.Ω(allocations.ApplicationID).To(gomega.Equal(sleepRespPod.ObjectMeta.Labels["applicationId"])) core := sleepRespPod.Spec.Containers[0].Resources.Requests.Cpu().MilliValue() mem := sleepRespPod.Spec.Containers[0].Resources.Requests.Memory().Value()