Skip to content

Commit 7982a74

Browse files
authored
fix(discovery): add missing lua syntax and return to discovery (fixes #24257) - 3.1 (#24268)
Signed-off-by: jan-mrm <67435696+jan-mrm@users.noreply.github.com>
1 parent b3ad040 commit 7982a74

5 files changed

Lines changed: 62 additions & 5 deletions

File tree

resource_customizations/numaflow.numaproj.io/InterStepBufferService/actions/discovery.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ end
1515
if forcePromote then
1616
actions["force-promote"]["disabled"] = false
1717
else
18-
actions["force-promote"]["disabled"] = true
18+
actions["force-promote"]["disabled"] = true
19+
end
20+
21+
return actions

resource_customizations/numaflow.numaproj.io/MonoVertex/actions/action_test.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,28 @@ actionTests:
77
expectedOutputPath: testdata/monovertex.yaml
88
- action: force-promote
99
inputPath: testdata/monovertex.yaml
10-
expectedOutputPath: testdata/monovertex-force-promote.yaml
10+
expectedOutputPath: testdata/monovertex-force-promote.yaml
11+
12+
discoveryTests:
13+
- inputPath: testdata/monovertex.yaml
14+
result:
15+
- name: pause
16+
disabled: false
17+
iconClass: 'fa-solid fa-fw fa-pause'
18+
- name: unpause
19+
disabled: true
20+
iconClass: 'fa-solid fa-fw fa-play'
21+
- name: force-promote
22+
disabled: false
23+
iconClass: 'fa-solid fa-fw fa-forward'
24+
- inputPath: testdata/monovertex-paused.yaml
25+
result:
26+
- name: pause
27+
disabled: true
28+
iconClass: 'fa-solid fa-fw fa-pause'
29+
- name: unpause
30+
disabled: false
31+
iconClass: 'fa-solid fa-fw fa-play'
32+
- name: force-promote
33+
disabled: false
34+
iconClass: 'fa-solid fa-fw fa-forward'

resource_customizations/numaflow.numaproj.io/MonoVertex/actions/discovery.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ end
3434
if forcePromote then
3535
actions["force-promote"]["disabled"] = false
3636
else
37-
actions["force-promote"]["disabled"] = true
37+
actions["force-promote"]["disabled"] = true
38+
end
39+
40+
return actions

resource_customizations/numaflow.numaproj.io/Pipeline/actions/action_test.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,28 @@ actionTests:
77
expectedOutputPath: testdata/pipeline.yaml
88
- action: force-promote
99
inputPath: testdata/pipeline.yaml
10-
expectedOutputPath: testdata/pipeline-force-promote.yaml
10+
expectedOutputPath: testdata/pipeline-force-promote.yaml
11+
12+
discoveryTests:
13+
- inputPath: testdata/pipeline.yaml
14+
result:
15+
- name: pause
16+
disabled: false
17+
iconClass: 'fa-solid fa-fw fa-pause'
18+
- name: unpause
19+
disabled: true
20+
iconClass: 'fa-solid fa-fw fa-play'
21+
- name: force-promote
22+
disabled: false
23+
iconClass: 'fa-solid fa-fw fa-forward'
24+
- inputPath: testdata/pipeline-paused.yaml
25+
result:
26+
- name: pause
27+
disabled: true
28+
iconClass: 'fa-solid fa-fw fa-pause'
29+
- name: unpause
30+
disabled: false
31+
iconClass: 'fa-solid fa-fw fa-play'
32+
- name: force-promote
33+
disabled: false
34+
iconClass: 'fa-solid fa-fw fa-forward'

resource_customizations/numaflow.numaproj.io/Pipeline/actions/discovery.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ end
3434
if forcePromote then
3535
actions["force-promote"]["disabled"] = false
3636
else
37-
actions["force-promote"]["disabled"] = true
37+
actions["force-promote"]["disabled"] = true
38+
end
39+
40+
return actions

0 commit comments

Comments
 (0)