Skip to content

Commit 5405e78

Browse files
Merge pull request #109 from NearNodeFlash/api-dws-v1alpha4
Api dws v1alpha4
2 parents 3a90e49 + d464121 commit 5405e78

8 files changed

Lines changed: 89 additions & 95 deletions

File tree

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ go 1.22.0
55
toolchain go1.22.5
66

77
require (
8-
github.com/DataWorkflowServices/dws v0.0.1-0.20250312162549-a682dcdf49b1
8+
github.com/DataWorkflowServices/dws v0.0.1-0.20250417160348-262076fecc45
99
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250219194350-45aad5cbbe17
10-
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250312170301-6f4fd32b0173 // indirect
11-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250326193852-54696ee478a9
10+
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250416170223-aeb7554e777b // indirect
11+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250417190054-045b8b495e19
1212
github.com/onsi/ginkgo/v2 v2.22.2
1313
github.com/onsi/gomega v1.36.2
1414
go.openly.dev/pointy v1.3.0
@@ -43,8 +43,6 @@ require (
4343
github.com/imdario/mergo v0.3.16 // indirect
4444
github.com/josharian/intern v1.0.0 // indirect
4545
github.com/json-iterator/go v1.1.12 // indirect
46-
github.com/kubeflow/common v0.4.6 // indirect
47-
github.com/kubeflow/mpi-operator v0.3.1-0.20230228224311-5946ef415759 // indirect
4846
github.com/mailru/easyjson v0.7.7 // indirect
4947
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
5048
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect

go.sum

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
github.com/DataWorkflowServices/dws v0.0.1-0.20250312162549-a682dcdf49b1 h1:HrW1btnw3MKoT8yjyx/eyLvuESuF6MWcPG7CUnuvzIQ=
2-
github.com/DataWorkflowServices/dws v0.0.1-0.20250312162549-a682dcdf49b1/go.mod h1:i9v4K2d64a9uyd9ZazOJ85RWzVQjIgHWXkLo895KDAE=
1+
github.com/DataWorkflowServices/dws v0.0.1-0.20250417160348-262076fecc45 h1:VwLXgEJESKSxlez4rvL7aZoF+pVDp+Gj5GO3YtaYZp8=
2+
github.com/DataWorkflowServices/dws v0.0.1-0.20250417160348-262076fecc45/go.mod h1:i9v4K2d64a9uyd9ZazOJ85RWzVQjIgHWXkLo895KDAE=
33
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250219194350-45aad5cbbe17 h1:xYLLW3fMEKauujqkmspeWoyWhEEu+capOKUPePo4IuU=
44
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250219194350-45aad5cbbe17/go.mod h1:H9GBWOmFp9BGGBWDVZk0pvPWzL6jUKkieVsIIoPlzMs=
5-
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250312170301-6f4fd32b0173 h1:UzkNMXM2d63MztEkjLwfBxKHFz+mXS6GzGU/expEzfk=
6-
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250312170301-6f4fd32b0173/go.mod h1:lx13ustzE/+39fLECky+CFKkAV8GYlX9eaI6IGmHQkY=
7-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250326193852-54696ee478a9 h1:eh/oIl7i+5MWm46lKFoi+v/4XtNTujUttsDxNIvojhM=
8-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250326193852-54696ee478a9/go.mod h1:l+Ob6Odb8fUI4Lck1orRzIgvdDJ+YXGU96+iio9hkhI=
5+
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250416170223-aeb7554e777b h1:J1h0RWYCgs90lpvtfo4nzoZqMtSmOqiQpLhN+QFGH+Y=
6+
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250416170223-aeb7554e777b/go.mod h1:lx13ustzE/+39fLECky+CFKkAV8GYlX9eaI6IGmHQkY=
7+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250417190054-045b8b495e19 h1:XrH3VpsjAyLQtFq89LbQsUb47GR7OxtHyH298ObMYyI=
8+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250417190054-045b8b495e19/go.mod h1:l3Rt9mPGNqIh2S0qUOFgMCc9HEGJX6Ed5G55CB08qbg=
99
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
1010
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
1111
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
@@ -77,10 +77,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
7777
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
7878
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
7979
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
80-
github.com/kubeflow/common v0.4.6 h1:yzJf/HEdS6ginD0GlVkgbOFie0Sp66VdGjXidAGZIlk=
81-
github.com/kubeflow/common v0.4.6/go.mod h1:43MAof/uhpJA2C0urynqatE3oKFQc7m2HLmJty7waqY=
82-
github.com/kubeflow/mpi-operator v0.3.1-0.20230228224311-5946ef415759 h1:HrgG/sZ2OIbgFciVgKMzU+f4mLBa5Po5evbk9jYNoQY=
83-
github.com/kubeflow/mpi-operator v0.3.1-0.20230228224311-5946ef415759/go.mod h1:TRq/EvvzlWkzvz6XJs1BNXpUokLNyvHE384E0GSeS5o=
8480
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
8581
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
8682
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=

int_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
. "github.com/onsi/gomega"
2929
"go.openly.dev/pointy"
3030

31-
dwsv1alpha3 "github.com/DataWorkflowServices/dws/api/v1alpha3"
31+
dwsv1alpha4 "github.com/DataWorkflowServices/dws/api/v1alpha4"
3232
)
3333

3434
var (
@@ -41,9 +41,9 @@ var (
4141
highTimeout = "5m"
4242

4343
// Which states use the high timeout
44-
highTimeoutStates = []dwsv1alpha3.WorkflowState{
45-
dwsv1alpha3.StateSetup,
46-
dwsv1alpha3.StateTeardown,
44+
highTimeoutStates = []dwsv1alpha4.WorkflowState{
45+
dwsv1alpha4.StateSetup,
46+
dwsv1alpha4.StateTeardown,
4747
}
4848
)
4949

@@ -143,17 +143,17 @@ var tests = []*T{
143143
"#DW container name=prerun-timeout-mpi profile=example-mpi-prerun-timeout").
144144
WithPermissions(1050, 1051).WithLabels("mpi", "timeout").
145145
WithContainerProfile("example-mpi", &ContainerProfileOptions{PrerunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
146-
ExpectError(dwsv1alpha3.StatePreRun),
146+
ExpectError(dwsv1alpha4.StatePreRun),
147147
MakeTest("PostRun timeout on MPI containers",
148148
"#DW container name=postrun-timeout-mpi profile=example-mpi-postrun-timeout").
149149
WithPermissions(1050, 1051).WithLabels("mpi", "timeout").
150150
WithContainerProfile("example-mpi-webserver", &ContainerProfileOptions{PostrunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
151-
ExpectError(dwsv1alpha3.StatePostRun),
151+
ExpectError(dwsv1alpha4.StatePostRun),
152152
MakeTest("Non-zero exit on MPI containers",
153153
"#DW container name=mpi-container-fail profile=example-mpi-fail-noretry").
154154
WithPermissions(1050, 1051).WithLabels("mpi", "fail").
155155
WithContainerProfile("example-mpi-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
156-
ExpectError(dwsv1alpha3.StatePostRun),
156+
ExpectError(dwsv1alpha4.StatePostRun),
157157

158158
// Containers - Non-MPI
159159
MakeTest("GFS2 with Containers",
@@ -175,27 +175,27 @@ var tests = []*T{
175175
"#DW container name=prerun-timeout profile=example-prerun-timeout").
176176
WithPermissions(1050, 1051).WithLabels("non-mpi", "timeout").
177177
WithContainerProfile("example-forever", &ContainerProfileOptions{PrerunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
178-
ExpectError(dwsv1alpha3.StatePreRun),
178+
ExpectError(dwsv1alpha4.StatePreRun),
179179
MakeTest("PostRun timeout on non-MPI containers",
180180
"#DW container name=postrun-timeout profile=example-postrun-timeout").
181181
WithPermissions(1050, 1051).WithLabels("non-mpi", "timeout").
182182
WithContainerProfile("example-forever", &ContainerProfileOptions{PostrunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
183-
ExpectError(dwsv1alpha3.StatePostRun),
183+
ExpectError(dwsv1alpha4.StatePostRun),
184184
MakeTest("Non-zero exit on non-MPI containers",
185185
"#DW container name=container-fail profile=example-fail-noretry").
186186
WithPermissions(1050, 1051).WithLabels("non-mpi", "fail").
187187
WithContainerProfile("example-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
188-
ExpectError(dwsv1alpha3.StatePostRun),
188+
ExpectError(dwsv1alpha4.StatePostRun),
189189

190190
// Containers - Unsupported Filesystems. These should fail as xfs/raw filesystems are not supported for containers.
191191
MakeTest("XFS with Containers",
192192
"#DW jobdw type=xfs name=xfs-with-containers capacity=100GB",
193193
"#DW container name=xfs-with-containers profile=example-success DW_JOB_foo_local_storage=xfs-with-containers").
194-
ExpectError(dwsv1alpha3.StateProposal).WithLabels("unsupported-fs"),
194+
ExpectError(dwsv1alpha4.StateProposal).WithLabels("unsupported-fs"),
195195
MakeTest("Raw with Containers",
196196
"#DW jobdw type=raw name=raw-with-containers capacity=100GB",
197197
"#DW container name=raw-with-containers profile=example-success DW_JOB_foo_local_storage=raw-with-containers").
198-
ExpectError(dwsv1alpha3.StateProposal).WithLabels("unsupported-fs"),
198+
ExpectError(dwsv1alpha4.StateProposal).WithLabels("unsupported-fs"),
199199

200200
// Containers - Multiple Storages
201201
MakeTest("GFS2 and Lustre with Containers",
@@ -250,7 +250,7 @@ var _ = Describe("NNF Integration Test", func() {
250250
// TODO: Ginkgo's `--fail-fast` option still seems to execute DeferCleanup() calls
251251
// See if this is by design or if we might need to move this to an AfterEach()
252252
if !context.SpecReport().Failed() {
253-
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha3.StateTeardown)
253+
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha4.StateTeardown)
254254

255255
Expect(k8sClient.Delete(ctx, workflow)).To(Succeed())
256256
}

internal/internal.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
"k8s.io/apimachinery/pkg/util/intstr"
3131

32-
dwsv1alpha3 "github.com/DataWorkflowServices/dws/api/v1alpha3"
32+
dwsv1alpha4 "github.com/DataWorkflowServices/dws/api/v1alpha4"
3333
"github.com/DataWorkflowServices/dws/utils/dwdparse"
3434
)
3535

@@ -68,7 +68,7 @@ type T struct {
6868
decorators []interface{}
6969

7070
// Workflow defines the DWS Workflow resource that is the target of the test.
71-
workflow *dwsv1alpha3.Workflow
71+
workflow *dwsv1alpha4.Workflow
7272

7373
// User Id to use for the workflow
7474
userId int
@@ -84,7 +84,7 @@ type T struct {
8484
helperPods []*corev1.Pod
8585

8686
// Compute nodes that were assigned to the test. This is determined at test runtime.
87-
computes *dwsv1alpha3.Computes
87+
computes *dwsv1alpha4.Computes
8888
}
8989

9090
func MakeTest(name string, directives ...string) *T {
@@ -118,13 +118,13 @@ func MakeTest(name string, directives ...string) *T {
118118
t.directives = []string{}
119119
}
120120

121-
t.workflow = &dwsv1alpha3.Workflow{
121+
t.workflow = &dwsv1alpha4.Workflow{
122122
ObjectMeta: metav1.ObjectMeta{
123123
Name: t.WorkflowName(),
124124
Namespace: corev1.NamespaceDefault,
125125
},
126-
Spec: dwsv1alpha3.WorkflowSpec{
127-
DesiredState: dwsv1alpha3.StateProposal,
126+
Spec: dwsv1alpha4.WorkflowSpec{
127+
DesiredState: dwsv1alpha4.StateProposal,
128128
DWDirectives: t.WorkflowDirectives(),
129129
JobID: intstr.FromInt(GinkgoParallelProcess()),
130130
WLMID: strconv.Itoa(GinkgoParallelProcess()),
@@ -145,7 +145,7 @@ func (t *T) WorkflowDirectives() []string {
145145
return t.directives
146146
}
147147

148-
func (t *T) Workflow() *dwsv1alpha3.Workflow {
148+
func (t *T) Workflow() *dwsv1alpha4.Workflow {
149149
return t.workflow
150150
}
151151

internal/options.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
corev1 "k8s.io/api/core/v1"
3636
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3737

38-
dwsv1alpha3 "github.com/DataWorkflowServices/dws/api/v1alpha3"
38+
dwsv1alpha4 "github.com/DataWorkflowServices/dws/api/v1alpha4"
3939
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
4040
nnfv1alpha7 "github.com/NearNodeFlash/nnf-sos/api/v1alpha7"
4141

@@ -57,7 +57,7 @@ type TOptions struct {
5757
hardwareRequired bool
5858
lowTimeout time.Duration
5959
highTimeout time.Duration
60-
highTimeoutStates []dwsv1alpha3.WorkflowState
60+
highTimeoutStates []dwsv1alpha4.WorkflowState
6161
useExternalComputes bool
6262
}
6363

@@ -67,21 +67,21 @@ func (o *TOptions) hasComplexOptions() bool {
6767
}
6868

6969
type TStopAfter struct {
70-
state dwsv1alpha3.WorkflowState
70+
state dwsv1alpha4.WorkflowState
7171
}
7272

7373
// Stop after lets you stop a test after a given state is reached
74-
func (t *T) StopAfter(state dwsv1alpha3.WorkflowState) *T {
74+
func (t *T) StopAfter(state dwsv1alpha4.WorkflowState) *T {
7575
t.options.stopAfter = &TStopAfter{state: state}
7676
return t
7777
}
7878

7979
type TExpectError struct {
80-
state dwsv1alpha3.WorkflowState
80+
state dwsv1alpha4.WorkflowState
8181
}
8282

8383
// Expect an error at the designed state; Proceed to teardown
84-
func (t *T) ExpectError(state dwsv1alpha3.WorkflowState) *T {
84+
func (t *T) ExpectError(state dwsv1alpha4.WorkflowState) *T {
8585
t.options.expectError = &TExpectError{state: state}
8686
t.options.stopAfter = &TStopAfter{state: state}
8787
return t.WithLabels("error")

0 commit comments

Comments
 (0)