fix: implement stronger status logic for getPipelineStatus#3416
Draft
suryapratap-01 wants to merge 2 commits intonumaproj:mainfrom
Draft
fix: implement stronger status logic for getPipelineStatus#3416suryapratap-01 wants to merge 2 commits intonumaproj:mainfrom
suryapratap-01 wants to merge 2 commits intonumaproj:mainfrom
Conversation
Refactor getPipelineStatus to switch on pipeline.Status.Phase (actual · state) instead of GetDesiredPhase() (user intent), matching the pattern established for getMonoVertexStatus. Covers all phases explicitly: Unknown, Failed, Paused, Pausing, Running (with pausing-in-progress and IsHealthy checks), Deleting, and a safe default fallback to Unknown. Also update GetClusterSummary to count Unknown and Deleting statuses as inactive rather than active. Fixes numaproj#3414 Signed-off-by: suryapratap-01 <suryapratap.personal@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3416 +/- ##
==========================================
+ Coverage 82.64% 82.70% +0.06%
==========================================
Files 307 307
Lines 76051 76064 +13
==========================================
+ Hits 62853 62911 +58
+ Misses 12645 12595 -50
- Partials 553 558 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@suryapratap-01 check why e2e test is failing https://github.com/numaproj/numaflow/actions/runs/25554619312/job/75012278250?pr=3416 |
getPipelineStatus now checks actual conditions via IsHealthy(), so pipelines in Running phase may not immediately report Healthy on CI. Add an Eventually wait for both pipelines — same pattern used for the MonoVertex wait added in numaproj#3408. Fixes numaproj#3414 Signed-off-by: suryapratap-01 <suryapratap.personal@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
getPipelineStatuswas usingGetDesiredPhase()(user intent) with only 3 cases and a default ofHealthy— weak logic that could misreport pipeline health. Thisrefactors it to switch on
pipeline.Status.Phase(actual state) with explicit handling for all phases, matching the stronger pattern introduced forgetMonoVertexStatusin #3408. Also fixesGetClusterSummaryto countUnknownandDeletingpipelines as inactive rather than active.Related issues
Fixes #3414
Testing
Unit tests added for all 8 phase cases (
Running/healthy,Running/unhealthy vertices,Running/pausing-in-progress,Paused,Pausing,Failed,Deleting,Unknown):go test -v -race -short -timeout 60s ./server/apis/v1/ -run TestGetPipelineStatusAll pass.
Special notes for reviewers
This is a direct follow-up to #3408 — the logic mirrors getMonoVertexStatus exactly. Key behavioral changes vs. the old code: