Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mszadkow committed Jan 3, 2025
1 parent fbc69e0 commit 906cc02
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
7 changes: 4 additions & 3 deletions Makefile-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions pkg/util/testingjobs/rayjob/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions test/integration/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
})
Expand Down
8 changes: 3 additions & 5 deletions test/integration/multikueue/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down

0 comments on commit 906cc02

Please sign in to comment.