Skip to content

Commit

Permalink
WIP tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
mszadkow committed Jan 2, 2025
1 parent 5843519 commit 5c05b98
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Makefile-deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ ray-operator-crd: ## Copy the whole manifests content from the ray-operator to t
rm -rf "$(EXTERNAL_CRDS_DIR)/ray-operator"; \
fi
mkdir -p "${EXTERNAL_CRDS_DIR}/ray-operator"; \
cp -rf $(RAY_ROOT)/config/crd $(EXTERNAL_CRDS_DIR)/ray-operator/
cp -rf $(RAY_ROOT)/config/default $(EXTERNAL_CRDS_DIR)/ray-operator/
cp -rf $(RAY_ROOT)/config/rbac $(EXTERNAL_CRDS_DIR)/ray-operator/
cp -rf $(RAY_ROOT)/config/manager $(EXTERNAL_CRDS_DIR)/ray-operator/
cp -rf $(RAY_ROOT)/config/crd $(EXTERNAL_CRDS_DIR)/ray-operator
cp -rf $(RAY_ROOT)/config/default $(EXTERNAL_CRDS_DIR)/ray-operator
cp -rf $(RAY_ROOT)/config/rbac $(EXTERNAL_CRDS_DIR)/ray-operator
cp -rf $(RAY_ROOT)/config/manager $(EXTERNAL_CRDS_DIR)/ray-operator

JOBSET_ROOT = $(shell $(GO_CMD) list -m -mod=readonly -f "{{.Dir}}" sigs.k8s.io/jobset)
.PHONY: jobset-operator-crd
Expand Down
2 changes: 1 addition & 1 deletion Makefile-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test-integration: gomod-download envtest ginkgo dep-crds kueuectl ginkgo-top ##
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
3 changes: 2 additions & 1 deletion pkg/controller/jobframework/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ var (
kftraining.SchemeGroupVersion.WithKind(kftraining.PyTorchJobKind).String(),
kftraining.SchemeGroupVersion.WithKind(kftraining.XGBoostJobKind).String(),
kfmpi.SchemeGroupVersion.WithKind(kfmpi.Kind).String(),
rayv1.SchemeGroupVersion.WithKind("RayJob").String())
rayv1.SchemeGroupVersion.WithKind("RayJob").String(),
rayv1.SchemeGroupVersion.WithKind("RayCluster").String())
)

// ValidateJobOnCreate encapsulates all GenericJob validations that must be performed on a Create operation
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

0 comments on commit 5c05b98

Please sign in to comment.