-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Conversation
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22835 +/- ##
=========================================
Coverage ? 60.08%
=========================================
Files ? 343
Lines ? 57888
Branches ? 0
=========================================
Hits ? 34784
Misses ? 20334
Partials ? 2770 ☔ View full report in Codecov by Sentry. |
if (obj.metadata.ownerReferences ~= nil and obj.metadata.ownerReferences[1] ~= nil and obj.metadata.ownerReferences[0].kind == "ISBServiceRollout") then | ||
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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
looks good now, thanks
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
…go-cd into improve-numa-actions
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
|
||
-- force-promote | ||
local forcePromote = false | ||
if (obj.metadata.ownerReferences ~= nil and obj.metadata.ownerReferences[1] ~= nil and obj.metadata.ownerReferences[0].kind == "ISBServiceRollout") and (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 comment
The reason will be displayed to describe this comment to others. Learn more.
should this say ownerReferences[0]
instead of ownerReferences[1]
?
You may even be able to just simplify this to only include "numaplane.numaproj.io/upgrade-state" label
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.
Lua arrays start at 1: https://www.lua.org/pil/11.1.html
That is right, we could remove the ownerReference check since we should only have the upgrade-state label if the resource is owned by a rollout. Can't think of any case this wouldn't be true so I can make that change if that's good with you.
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.
Went ahead and removed it.
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
…go-cd into improve-numa-actions
@@ -0,0 +1,18 @@ | |||
local actions = {} | |||
actions["force-promote"] = { |
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
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.
|
||
-- 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 comment
The 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?
i.e. obj.status.health ~= nil and obj.status.health.status == "Degraded"
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.
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.
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
…go-cd into improve-numa-actions
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com> Signed-off-by: enneitex <etienne.divet@gmail.com>
Updating the Numaflow and Numaplane actions by:
force-promote
action which is different from our enable and disable force promote actions (which will eventually be removed and replaced by this single action - will still support them for now)Checklist: