-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: improve numa actions #22835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve numa actions #22835
Changes from 12 commits
97aec2d
4868051
b33c5cc
d63357a
c1ed42d
6ac3e67
1ce8fc1
9f90805
d867e4b
8757329
b084c44
eb60219
3cd1962
75b5b4c
24967b2
3d50dbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| actionTests: | ||
| - action: force-promote | ||
| inputPath: testdata/isbservice.yaml | ||
| expectedOutputPath: testdata/isbservice-force-promote.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| local actions = {} | ||
| actions["force-promote"] = { | ||
| ["disabled"] = true, | ||
| ["iconClass"] = "fa-solid fa-fw fa-forward" | ||
| } | ||
|
|
||
| -- force-promote | ||
| local forcePromote = false | ||
| if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "in-progress") then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be good to do some status/health checks on the resource before these? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, we don't require the resource to be in a Degraded state in order to force promote it. It could have just started being assessed for example. |
||
| forcePromote = true | ||
| end | ||
| if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/force-promote"] == "true") then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for this and the others, can we only show it if the "upgrade-state" label is set to "in-progress"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can do! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks good now, thanks |
||
| forcePromote = false | ||
| end | ||
| if forcePromote then | ||
| actions["force-promote"]["disabled"] = false | ||
| else | ||
| actions["force-promote"]["disabled"] = true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| if obj.metadata.labels == nil then | ||
| obj.metadata.labels = {} | ||
| end | ||
| obj.metadata.labels["numaplane.numaproj.io/force-promote"] = "true" | ||
| return obj |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| apiVersion: numaflow.numaproj.io/v1alpha1 | ||
| kind: InterStepBufferService | ||
| metadata: | ||
| creationTimestamp: '2025-04-28T22:39:27Z' | ||
| finalizers: | ||
| - numaflow.numaproj.io/isbsvc-controller | ||
| generation: 1 | ||
| labels: | ||
| numaplane.numaproj.io/force-promote: "true" | ||
| numaplane.numaproj.io/parent-rollout-name: my-isbsvc | ||
| numaplane.numaproj.io/upgrade-state: "in-progress" | ||
| name: my-isbsvc-0 | ||
| namespace: demo | ||
| ownerReferences: | ||
| - apiVersion: numaplane.numaproj.io/v1alpha1 | ||
| blockOwnerDeletion: true | ||
| controller: true | ||
| kind: ISBServiceRollout | ||
| name: my-isbsvc | ||
| uid: b38035d8-546a-4f24-b1fa-7bb5b0a3a565 | ||
| resourceVersion: '1687384' | ||
| uid: 889839c6-2982-4b70-b2a5-84afb4272ab6 | ||
| spec: | ||
| jetstream: | ||
| persistence: | ||
| volumeSize: 1Gi | ||
| replicas: 1 | ||
| version: 2.10.3 | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: '2025-04-28T22:39:57Z' | ||
| message: | | ||
| partitioned roll out complete: 1 new pods have been updated... | ||
| reason: Healthy | ||
| status: 'True' | ||
| type: ChildrenResourcesHealthy | ||
| - lastTransitionTime: '2025-04-28T22:39:57Z' | ||
| message: Successful | ||
| reason: Successful | ||
| status: 'True' | ||
| type: Configured | ||
| - lastTransitionTime: '2025-04-28T22:39:57Z' | ||
| message: Successful | ||
| reason: Successful | ||
| status: 'True' | ||
| type: Deployed | ||
| config: | ||
| jetstream: | ||
| auth: | ||
| basic: | ||
| password: | ||
| key: client-auth-password | ||
| name: isbsvc-my-isbsvc-0-js-client-auth | ||
| user: | ||
| key: client-auth-user | ||
| name: isbsvc-my-isbsvc-0-js-client-auth | ||
| streamConfig: | | ||
| consumer: | ||
| ackwait: 60s | ||
| maxackpending: 25000 | ||
| otbucket: | ||
| history: 1 | ||
| maxbytes: 0 | ||
| maxvaluesize: 0 | ||
| replicas: 1 | ||
| storage: 0 | ||
| ttl: 3h | ||
| procbucket: | ||
| history: 1 | ||
| maxbytes: 0 | ||
| maxvaluesize: 0 | ||
| replicas: 1 | ||
| storage: 0 | ||
| ttl: 72h | ||
| stream: | ||
| duplicates: 60s | ||
| maxage: 72h | ||
| maxbytes: -1 | ||
| maxmsgs: 100000 | ||
| replicas: 1 | ||
| retention: 0 | ||
| storage: 0 | ||
| url: nats://isbsvc-my-isbsvc-0-js-svc.demo.svc:4222 | ||
| observedGeneration: 1 | ||
| phase: Running | ||
| type: jetstream |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| apiVersion: numaflow.numaproj.io/v1alpha1 | ||
| kind: InterStepBufferService | ||
| metadata: | ||
| creationTimestamp: '2025-04-28T22:39:27Z' | ||
| finalizers: | ||
| - numaflow.numaproj.io/isbsvc-controller | ||
| generation: 1 | ||
| labels: | ||
| numaplane.numaproj.io/parent-rollout-name: my-isbsvc | ||
| numaplane.numaproj.io/upgrade-state: "in-progress" | ||
| name: my-isbsvc-0 | ||
| namespace: demo | ||
| ownerReferences: | ||
| - apiVersion: numaplane.numaproj.io/v1alpha1 | ||
| blockOwnerDeletion: true | ||
| controller: true | ||
| kind: ISBServiceRollout | ||
| name: my-isbsvc | ||
| uid: b38035d8-546a-4f24-b1fa-7bb5b0a3a565 | ||
| resourceVersion: '1687384' | ||
| uid: 889839c6-2982-4b70-b2a5-84afb4272ab6 | ||
| spec: | ||
| jetstream: | ||
| persistence: | ||
| volumeSize: 1Gi | ||
| replicas: 1 | ||
| version: 2.10.3 | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: '2025-04-28T22:39:57Z' | ||
| message: | | ||
| partitioned roll out complete: 1 new pods have been updated... | ||
| reason: Healthy | ||
| status: 'True' | ||
| type: ChildrenResourcesHealthy | ||
| - lastTransitionTime: '2025-04-28T22:39:57Z' | ||
| message: Successful | ||
| reason: Successful | ||
| status: 'True' | ||
| type: Configured | ||
| - lastTransitionTime: '2025-04-28T22:39:57Z' | ||
| message: Successful | ||
| reason: Successful | ||
| status: 'True' | ||
| type: Deployed | ||
| config: | ||
| jetstream: | ||
| auth: | ||
| basic: | ||
| password: | ||
| key: client-auth-password | ||
| name: isbsvc-my-isbsvc-0-js-client-auth | ||
| user: | ||
| key: client-auth-user | ||
| name: isbsvc-my-isbsvc-0-js-client-auth | ||
| streamConfig: | | ||
| consumer: | ||
| ackwait: 60s | ||
| maxackpending: 25000 | ||
| otbucket: | ||
| history: 1 | ||
| maxbytes: 0 | ||
| maxvaluesize: 0 | ||
| replicas: 1 | ||
| storage: 0 | ||
| ttl: 3h | ||
| procbucket: | ||
| history: 1 | ||
| maxbytes: 0 | ||
| maxvaluesize: 0 | ||
| replicas: 1 | ||
| storage: 0 | ||
| ttl: 72h | ||
| stream: | ||
| duplicates: 60s | ||
| maxage: 72h | ||
| maxbytes: -1 | ||
| maxmsgs: 100000 | ||
| replicas: 1 | ||
| retention: 0 | ||
| storage: 0 | ||
| url: nats://isbsvc-my-isbsvc-0-js-svc.demo.svc:4222 | ||
| observedGeneration: 1 | ||
| phase: Running | ||
| type: jetstream |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| if obj.metadata.labels == nil then | ||
| obj.metadata.labels = {} | ||
| end | ||
| obj.metadata.labels["numaplane.numaproj.io/force-promote"] = "true" | ||
| return obj |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| apiVersion: numaflow.numaproj.io/v1alpha1 | ||
| kind: MonoVertex | ||
| metadata: | ||
| creationTimestamp: "2024-10-09T21:18:37Z" | ||
| generation: 1 | ||
| name: simple-mono-vertex | ||
| namespace: numaflow-system | ||
| resourceVersion: "1382" | ||
| uid: b7b9e4f8-cd4b-4771-9e4b-2880cc50467a | ||
| labels: | ||
| numaplane.numaproj.io/force-promote: "true" | ||
| numaplane.numaproj.io/upgrade-state: "in-progress" | ||
| spec: | ||
| lifecycle: | ||
| desiredPhase: Running | ||
| replicas: 1 | ||
| sink: | ||
| udsink: | ||
| container: | ||
| image: quay.io/numaio/numaflow-java/simple-sink:stable | ||
| source: | ||
| transformer: | ||
| container: | ||
| image: quay.io/numaio/numaflow-rs/source-transformer-now:stable | ||
| udsource: | ||
| container: | ||
| image: quay.io/numaio/numaflow-java/source-simple-source:stable | ||
| updateStrategy: | ||
| rollingUpdate: | ||
| maxUnavailable: 25% | ||
| type: RollingUpdate | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: "2024-10-09T21:18:41Z" | ||
| message: Successful | ||
| reason: Successful | ||
| status: "True" | ||
| type: DaemonHealthy | ||
| - lastTransitionTime: "2024-10-09T21:18:37Z" | ||
| message: Successful | ||
| reason: Successful | ||
| status: "True" | ||
| type: Deployed | ||
| - lastTransitionTime: "2024-10-09T21:18:37Z" | ||
| message: All pods are healthy | ||
| reason: Running | ||
| status: "True" | ||
| type: PodsHealthy | ||
| currentHash: 8ed34d9058faa60997ee13083ccb3d80691df37b45a34eaa347af99f237e8df6 | ||
| desiredReplicas: 1 | ||
| lastScaledAt: "2024-10-09T21:18:37Z" | ||
| lastUpdated: "2024-10-09T21:18:41Z" | ||
| observedGeneration: 1 | ||
| phase: Running | ||
| replicas: 1 | ||
| selector: app.kubernetes.io/component=mono-vertex,numaflow.numaproj.io/mono-vertex-name=simple-mono-vertex | ||
| updateHash: 8ed34d9058faa60997ee13083ccb3d80691df37b45a34eaa347af99f237e8df6 | ||
| updatedReplicas: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not clear on the difference between this "force-promote" action and "enable-force-promote" ? Maybe add some comment somewhere to explain this and why we will replace that action with this one
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main motivation is so it's more of a one time action than a state which can be enabled and disabled.
When we "enable force promote" on the ISBServiceRollout/PipelineRollout/MonoVertexRollout, then the user needs to remember to "disable force promote" after. If instead it's a one time action on the individual child object, it can happen once with no other action that needs to be taken (because the next time there's a new upgrade, it would be a new child).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the plan will be to remove the "Enable Force Promote" and "Disable Force Promote" in a later PR.