Skip to content

Commit 8ef546b

Browse files
Merge pull request #139 from NearNodeFlash/api-dws-v1alpha7
Api dws v1alpha7
2 parents f895386 + f5617b5 commit 8ef546b

8 files changed

Lines changed: 97 additions & 98 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/NearNodeFlash/nnf-integration-test
33
go 1.23.9
44

55
require (
6-
github.com/DataWorkflowServices/dws v0.0.1-0.20250826235427-3ba3755ecbb4
6+
github.com/DataWorkflowServices/dws v0.0.1-0.20251021205822-9b2fb19eb9fb
77
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250827135601-4d150db05d08
88
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250902204910-828ccfe450c3 // indirect
9-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250910191707-694eda76a3d0
9+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20251022132926-182d70c0379c
1010
github.com/onsi/ginkgo/v2 v2.22.2
1111
github.com/onsi/gomega v1.36.2
1212
go.openly.dev/pointy v1.3.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
github.com/DataWorkflowServices/dws v0.0.1-0.20250826235427-3ba3755ecbb4 h1:c5bKT/hZUHzgx4HxiFMGoxEFDXPv/qlFmLwDTbJAA00=
2-
github.com/DataWorkflowServices/dws v0.0.1-0.20250826235427-3ba3755ecbb4/go.mod h1:NbNOIG2ybY2XHVSJn0KF7edPlX3I1ji7je6MGzuPeaA=
1+
github.com/DataWorkflowServices/dws v0.0.1-0.20251021205822-9b2fb19eb9fb h1:F3845qSkfS36D2S4LKfCur8K/6O78cEw/FBNtT4UEyg=
2+
github.com/DataWorkflowServices/dws v0.0.1-0.20251021205822-9b2fb19eb9fb/go.mod h1:NbNOIG2ybY2XHVSJn0KF7edPlX3I1ji7je6MGzuPeaA=
33
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250827135601-4d150db05d08 h1:1IYv2gDH/+hxBo6TZenIRs30PSpzO49USDkj/aBo/g4=
44
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20250827135601-4d150db05d08/go.mod h1:1lpNL1ZYtVwDU6Fuju5u/xiza6Z2Ua8KWZeaGBKpn5o=
55
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250902204910-828ccfe450c3 h1:CAJW97TU2fzzECwbwgmYkYe0kzvkZccXg6f8Ukom8Ws=
66
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20250902204910-828ccfe450c3/go.mod h1:slDsqUJtN2uZ5Z7z4J6wWrtKksQAaH4JqRzUonDXNKo=
7-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250910191707-694eda76a3d0 h1:IPvOz9ZYP4XTmofIlSiuw3L0d6UxFbrFZ51fLNEkf5g=
8-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20250910191707-694eda76a3d0/go.mod h1:wT5lUEvqLjpPGGbuyWmJYhThvTDkJM4Rqe22DrT7zdw=
7+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20251022132926-182d70c0379c h1:mpSWuKoH6xvoggDkAQpBnKxjZOcHhfZqnFNE+C3eIE4=
8+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20251022132926-182d70c0379c/go.mod h1:FT3MSnZ8Dj6RUA5jmT20wQPXipYBUrChgNcQv25J3lU=
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=

int_test.go

Lines changed: 14 additions & 15 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-
dwsv1alpha6 "github.com/DataWorkflowServices/dws/api/v1alpha6"
31+
dwsv1alpha7 "github.com/DataWorkflowServices/dws/api/v1alpha7"
3232
)
3333

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

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

@@ -57,7 +57,7 @@ var tests = []*T{
5757
// MakeTest("Pending", "#DW ...").Pending()
5858
//
5959
// Mark a test case so it will stop after the workflow achieves the desired state of PreRun
60-
// MakeTest("Stop After", "#DW ...").StopAfter(dwsv1alpha6.StatePreRun),
60+
// MakeTest("Stop After", "#DW ...").StopAfter(dwsv1alpha7.StatePreRun),
6161
//
6262
// Duplicate a test case 20 times.
6363
// DuplicateTest(
@@ -84,7 +84,6 @@ var tests = []*T{
8484
"#DW jobdw type=xfs name=xfs-storage-profile capacity=14TB profile=my-xfs-storage-profile").
8585
WithStorageProfileLvCreate("--zero n --activate y --type raid5 --nosync --extents $PERCENT_VG --stripes $DEVICE_NUM-1 --stripesize=64KiB --name $LV_NAME $VG_NAME"),
8686

87-
8887
// Persistent
8988
MakeTest("Persistent Lustre",
9089
"#DW create_persistent type=lustre name=persistent-lustre capacity=50GB").
@@ -147,17 +146,17 @@ var tests = []*T{
147146
"#DW container name=prerun-timeout-mpi profile=example-mpi-prerun-timeout").
148147
WithPermissions(1050, 1051).WithLabels("mpi", "timeout").
149148
WithContainerProfile("example-mpi", &ContainerProfileOptions{PrerunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
150-
ExpectError(dwsv1alpha6.StatePreRun),
149+
ExpectError(dwsv1alpha7.StatePreRun),
151150
MakeTest("PostRun timeout on MPI containers",
152151
"#DW container name=postrun-timeout-mpi profile=example-mpi-postrun-timeout").
153152
WithPermissions(1050, 1051).WithLabels("mpi", "timeout").
154153
WithContainerProfile("example-mpi-webserver", &ContainerProfileOptions{PostrunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
155-
ExpectError(dwsv1alpha6.StatePostRun),
154+
ExpectError(dwsv1alpha7.StatePostRun),
156155
MakeTest("Non-zero exit on MPI containers",
157156
"#DW container name=mpi-container-fail profile=example-mpi-fail-noretry").
158157
WithPermissions(1050, 1051).WithLabels("mpi", "fail").
159158
WithContainerProfile("example-mpi-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
160-
ExpectError(dwsv1alpha6.StatePostRun),
159+
ExpectError(dwsv1alpha7.StatePostRun),
161160

162161
// Containers - Non-MPI
163162
MakeTest("GFS2 with Containers",
@@ -179,27 +178,27 @@ var tests = []*T{
179178
"#DW container name=prerun-timeout profile=example-prerun-timeout").
180179
WithPermissions(1050, 1051).WithLabels("non-mpi", "timeout").
181180
WithContainerProfile("example-forever", &ContainerProfileOptions{PrerunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
182-
ExpectError(dwsv1alpha6.StatePreRun),
181+
ExpectError(dwsv1alpha7.StatePreRun),
183182
MakeTest("PostRun timeout on non-MPI containers",
184183
"#DW container name=postrun-timeout profile=example-postrun-timeout").
185184
WithPermissions(1050, 1051).WithLabels("non-mpi", "timeout").
186185
WithContainerProfile("example-forever", &ContainerProfileOptions{PostrunTimeoutSeconds: pointy.Int(1), NoStorage: true}).
187-
ExpectError(dwsv1alpha6.StatePostRun),
186+
ExpectError(dwsv1alpha7.StatePostRun),
188187
MakeTest("Non-zero exit on non-MPI containers",
189188
"#DW container name=container-fail profile=example-fail-noretry").
190189
WithPermissions(1050, 1051).WithLabels("non-mpi", "fail").
191190
WithContainerProfile("example-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
192-
ExpectError(dwsv1alpha6.StatePostRun),
191+
ExpectError(dwsv1alpha7.StatePostRun),
193192

194193
// Containers - Unsupported Filesystems. These should fail as xfs/raw filesystems are not supported for containers.
195194
MakeTest("XFS with Containers",
196195
"#DW jobdw type=xfs name=xfs-with-containers capacity=100GB",
197196
"#DW container name=xfs-with-containers profile=example-success DW_JOB_foo_local_storage=xfs-with-containers").
198-
ExpectError(dwsv1alpha6.StateProposal).WithLabels("unsupported-fs"),
197+
ExpectError(dwsv1alpha7.StateProposal).WithLabels("unsupported-fs"),
199198
MakeTest("Raw with Containers",
200199
"#DW jobdw type=raw name=raw-with-containers capacity=100GB",
201200
"#DW container name=raw-with-containers profile=example-success DW_JOB_foo_local_storage=raw-with-containers").
202-
ExpectError(dwsv1alpha6.StateProposal).WithLabels("unsupported-fs"),
201+
ExpectError(dwsv1alpha7.StateProposal).WithLabels("unsupported-fs"),
203202

204203
// Containers - Multiple Storages
205204
MakeTest("GFS2 and Lustre with Containers",
@@ -254,7 +253,7 @@ var _ = Describe("NNF Integration Test", func() {
254253
// TODO: Ginkgo's `--fail-fast` option still seems to execute DeferCleanup() calls
255254
// See if this is by design or if we might need to move this to an AfterEach()
256255
if !context.SpecReport().Failed() {
257-
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha6.StateTeardown)
256+
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha7.StateTeardown)
258257

259258
Expect(k8sClient.Delete(ctx, workflow)).To(Succeed())
260259
}

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-
dwsv1alpha6 "github.com/DataWorkflowServices/dws/api/v1alpha6"
32+
dwsv1alpha7 "github.com/DataWorkflowServices/dws/api/v1alpha7"
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 *dwsv1alpha6.Workflow
71+
workflow *dwsv1alpha7.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 *dwsv1alpha6.Computes
87+
computes *dwsv1alpha7.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 = &dwsv1alpha6.Workflow{
121+
t.workflow = &dwsv1alpha7.Workflow{
122122
ObjectMeta: metav1.ObjectMeta{
123123
Name: t.WorkflowName(),
124124
Namespace: corev1.NamespaceDefault,
125125
},
126-
Spec: dwsv1alpha6.WorkflowSpec{
127-
DesiredState: dwsv1alpha6.StateProposal,
126+
Spec: dwsv1alpha7.WorkflowSpec{
127+
DesiredState: dwsv1alpha7.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() *dwsv1alpha6.Workflow {
148+
func (t *T) Workflow() *dwsv1alpha7.Workflow {
149149
return t.workflow
150150
}
151151

internal/options.go

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

38-
dwsv1alpha6 "github.com/DataWorkflowServices/dws/api/v1alpha6"
38+
dwsv1alpha7 "github.com/DataWorkflowServices/dws/api/v1alpha7"
3939
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
40-
nnfv1alpha8 "github.com/NearNodeFlash/nnf-sos/api/v1alpha8"
40+
nnfv1alpha9 "github.com/NearNodeFlash/nnf-sos/api/v1alpha9"
4141

4242
"github.com/DataWorkflowServices/dws/utils/dwdparse"
4343
)
@@ -57,7 +57,7 @@ type TOptions struct {
5757
hardwareRequired bool
5858
lowTimeout time.Duration
5959
highTimeout time.Duration
60-
highTimeoutStates []dwsv1alpha6.WorkflowState
60+
highTimeoutStates []dwsv1alpha7.WorkflowState
6161
useExternalComputes bool
6262
}
6363

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

6969
type TStopAfter struct {
70-
state dwsv1alpha6.WorkflowState
70+
state dwsv1alpha7.WorkflowState
7171
}
7272

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

7979
type TExpectError struct {
80-
state dwsv1alpha6.WorkflowState
80+
state dwsv1alpha7.WorkflowState
8181
}
8282

8383
// Expect an error at the designed state; Proceed to teardown
84-
func (t *T) ExpectError(state dwsv1alpha6.WorkflowState) *T {
84+
func (t *T) ExpectError(state dwsv1alpha7.WorkflowState) *T {
8585
t.options.expectError = &TExpectError{state: state}
8686
t.options.stopAfter = &TStopAfter{state: state}
8787
return t.WithLabels("error")
@@ -320,7 +320,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
320320
By(fmt.Sprintf("Creating storage profile '%s'", o.storageProfile.name))
321321

322322
// Clone the default profile.
323-
defaultProf := &nnfv1alpha8.NnfStorageProfile{
323+
defaultProf := &nnfv1alpha9.NnfStorageProfile{
324324
ObjectMeta: metav1.ObjectMeta{
325325
Name: "default",
326326
Namespace: "nnf-system",
@@ -329,7 +329,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
329329

330330
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(defaultProf), defaultProf)).To(Succeed())
331331

332-
profile := &nnfv1alpha8.NnfStorageProfile{
332+
profile := &nnfv1alpha9.NnfStorageProfile{
333333
ObjectMeta: metav1.ObjectMeta{
334334
Name: o.storageProfile.name,
335335
Namespace: "nnf-system",
@@ -357,7 +357,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
357357

358358
if o.containerProfile != nil {
359359
// Clone the provided base profile
360-
baseProfile := &nnfv1alpha8.NnfContainerProfile{
360+
baseProfile := &nnfv1alpha9.NnfContainerProfile{
361361
ObjectMeta: metav1.ObjectMeta{
362362
Name: o.containerProfile.base,
363363
Namespace: "nnf-system",
@@ -366,7 +366,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
366366

367367
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(baseProfile), baseProfile)).To(Succeed())
368368

369-
profile := &nnfv1alpha8.NnfContainerProfile{
369+
profile := &nnfv1alpha9.NnfContainerProfile{
370370
ObjectMeta: metav1.ObjectMeta{
371371
Name: o.containerProfile.name,
372372
Namespace: "nnf-system",
@@ -420,7 +420,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
420420

421421
// Extract the File System Name and MGSNids from the persistent lustre instance. This
422422
// assumes an NNF Storage resource is created in the same name as the persistent instance
423-
storage := &nnfv1alpha8.NnfStorage{
423+
storage := &nnfv1alpha9.NnfStorage{
424424
ObjectMeta: metav1.ObjectMeta{
425425
Name: name,
426426
Namespace: corev1.NamespaceDefault,
@@ -557,7 +557,7 @@ func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error {
557557
if t.options.storageProfile != nil {
558558
By(fmt.Sprintf("Deleting storage profile '%s'", o.storageProfile.name))
559559

560-
profile := &nnfv1alpha8.NnfStorageProfile{
560+
profile := &nnfv1alpha9.NnfStorageProfile{
561561
ObjectMeta: metav1.ObjectMeta{
562562
Name: o.storageProfile.name,
563563
Namespace: "nnf-system",
@@ -571,7 +571,7 @@ func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error {
571571
if t.options.containerProfile != nil {
572572
By(fmt.Sprintf("Deleting container profile '%s'", o.containerProfile.name))
573573

574-
profile := &nnfv1alpha8.NnfContainerProfile{
574+
profile := &nnfv1alpha9.NnfContainerProfile{
575575
ObjectMeta: metav1.ObjectMeta{
576576
Name: o.containerProfile.name,
577577
Namespace: "nnf-system",

0 commit comments

Comments
 (0)