From 906cc022e462aece13bca11f08dc5bdaeeab2177 Mon Sep 17 00:00:00 2001 From: Michal Szadkowski Date: Fri, 3 Jan 2025 22:23:04 +0100 Subject: [PATCH] wip --- Makefile-test.mk | 7 ++++--- pkg/util/testingjobs/rayjob/wrappers.go | 6 ++++++ test/integration/framework/framework.go | 1 + test/integration/multikueue/suite_test.go | 8 +++----- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile-test.mk b/Makefile-test.mk index b35cc159a4..7fc9550f87 100644 --- a/Makefile-test.mk +++ b/Makefile-test.mk @@ -37,12 +37,12 @@ ENVTEST_K8S_VERSION ?= 1.31 # Number of processes to use during integration tests to run specs within a # suite in parallel. Suites still run sequentially. User may set this value to 1 # to run without parallelism. -INTEGRATION_NPROCS ?= 4 +INTEGRATION_NPROCS ?= 2 # Folder where the integration tests are located. INTEGRATION_TARGET ?= ./test/integration/... # Verbosity level for apiserver logging. # The logging is disabled if 0. -INTEGRATION_API_LOG_LEVEL ?= 0 +INTEGRATION_API_LOG_LEVEL ?= 1 # Integration filters INTEGRATION_RUN_ALL?=true ifneq ($(INTEGRATION_RUN_ALL),true) @@ -80,11 +80,12 @@ test: gotestsum ## Run tests. .PHONY: test-integration test-integration: gomod-download envtest ginkgo dep-crds kueuectl ginkgo-top ## Run tests. + ls "$(PROJECT_DIR)/dep-crds/ray-operator-crds" KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" \ KUEUE_BIN=$(PROJECT_DIR)/bin \ ENVTEST_K8S_VERSION=$(ENVTEST_K8S_VERSION) \ API_LOG_LEVEL=$(INTEGRATION_API_LOG_LEVEL) \ - $(GINKGO) $(INTEGRATION_FILTERS) $(GINKGO_ARGS) -procs=$(INTEGRATION_NPROCS) --race --junit-report=junit.xml --json-report=integration.json --output-dir=$(ARTIFACTS) -v $(INTEGRATION_TARGET) + $(GINKGO) $(INTEGRATION_FILTERS) $(GINKGO_ARGS) -procs=$(INTEGRATION_NPROCS) --output-interceptor-mode=none --race --junit-report=junit.xml --json-report=integration.json --output-dir=$(ARTIFACTS) -v $(INTEGRATION_TARGET) $(PROJECT_DIR)/bin/ginkgo-top -i $(ARTIFACTS)/integration.json > $(ARTIFACTS)/integration-top.yaml CREATE_KIND_CLUSTER ?= true diff --git a/pkg/util/testingjobs/rayjob/wrappers.go b/pkg/util/testingjobs/rayjob/wrappers.go index 162aafeaa3..47f5adad03 100644 --- a/pkg/util/testingjobs/rayjob/wrappers.go +++ b/pkg/util/testingjobs/rayjob/wrappers.go @@ -254,6 +254,12 @@ func (j *JobWrapper) RayVersion(rv string) *JobWrapper { return j } +func (j *JobWrapper) RayStartParams(sp map[string]string) *JobWrapper { + j.Spec.RayClusterSpec.HeadGroupSpec.RayStartParams = sp + j.Spec.RayClusterSpec.WorkerGroupSpecs[0].RayStartParams = sp + return j +} + func (j *JobWrapper) Env(rayType rayv1.RayNodeType, name, value string) *JobWrapper { if rayType == rayv1.HeadNode { if j.Spec.RayClusterSpec.HeadGroupSpec.Template.Spec.Containers[0].Env == nil { diff --git a/test/integration/framework/framework.go b/test/integration/framework/framework.go index 7ad49b5a6e..5db1d397b1 100644 --- a/test/integration/framework/framework.go +++ b/test/integration/framework/framework.go @@ -96,6 +96,7 @@ func (f *Framework) Init() *rest.Config { var err error cfg, err = f.testEnv.Start() + fmt.Println("KACZKA", err) gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred()) gomega.ExpectWithOffset(1, cfg).NotTo(gomega.BeNil()) }) diff --git a/test/integration/multikueue/suite_test.go b/test/integration/multikueue/suite_test.go index 37cea1acba..b732cff556 100644 --- a/test/integration/multikueue/suite_test.go +++ b/test/integration/multikueue/suite_test.go @@ -209,16 +209,14 @@ func managerSetup(ctx context.Context, mgr manager.Manager) { err = workloadmpijob.SetupMPIJobWebhook(mgr, jobframework.WithCache(cCache), jobframework.WithQueues(queues)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = workloadrayjob.SetupIndexes(ctx, mgr.GetFieldIndexer()) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - rayJobReconciler := workloadrayjob.NewReconciler( mgr.GetClient(), mgr.GetEventRecorderFor(constants.JobControllerName)) + err = workloadrayjob.SetupIndexes(ctx, mgr.GetFieldIndexer()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = rayJobReconciler.SetupWithManager(mgr) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - err = workloadrayjob.SetupRayJobWebhook(mgr, jobframework.WithCache(cCache), jobframework.WithQueues(queues)) + err = workloadrayjob.SetupRayJobWebhook(mgr) gomega.Expect(err).NotTo(gomega.HaveOccurred()) }