Skip to content

Conversation

dpadhiar
Copy link
Member

@dpadhiar dpadhiar commented Apr 30, 2025

Updating the Numaflow and Numaplane actions by:

  • adding the 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)
  • enhancing visually each action with a button and removing any dashes

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Copy link

bunnyshell bot commented Apr 30, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

dpadhiar and others added 2 commits April 30, 2025 16:13
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Copy link

codecov bot commented May 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@0484f9f). Learn more about missing BASE report.
⚠️ Report is 449 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@dpadhiar dpadhiar marked this pull request as ready for review May 1, 2025 22:19
@dpadhiar dpadhiar requested review from a team as code owners May 1, 2025 22:19
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
Copy link
Contributor

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"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good now, thanks

dpadhiar added 3 commits May 1, 2025 16:57
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
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
Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Member Author

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.

@@ -0,0 +1,18 @@
local actions = {}
actions["force-promote"] = {
Copy link
Contributor

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

Copy link
Contributor

@juliev0 juliev0 May 7, 2025

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).

Copy link
Contributor

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
Copy link
Contributor

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"

Copy link
Contributor

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.

@dpadhiar dpadhiar marked this pull request as draft May 7, 2025 18:11
@dpadhiar dpadhiar marked this pull request as ready for review May 23, 2025 18:12
@crenshaw-dev crenshaw-dev merged commit ddb1021 into argoproj:master May 29, 2025
28 checks passed
chansuke pushed a commit to chansuke/argo-cd that referenced this pull request Jun 4, 2025
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
enneitex pushed a commit to enneitex/argo-cd that referenced this pull request Aug 24, 2025
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: enneitex <etienne.divet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants