-
Notifications
You must be signed in to change notification settings - Fork 119
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
fix: pause lifecyle changes and add drained status #2028
Conversation
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
We keep the phase as failed and do not try to pause |
Signed-off-by: Sidhant Kohli <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2028 +/- ##
==========================================
+ Coverage 61.85% 61.89% +0.04%
==========================================
Files 318 318
Lines 28979 28986 +7
==========================================
+ Hits 17924 17940 +16
+ Misses 10098 10096 -2
+ Partials 957 950 -7 ☔ View full report in Codecov by Sentry. |
|
|
Signed-off-by: Sidhant Kohli <[email protected]>
|
|
|
Signed-off-by: Sidhant Kohli <[email protected]>
@@ -599,7 +620,8 @@ func buildVertices(pl *dfv1.Pipeline) map[string]dfv1.Vertex { | |||
copyVertexTemplate(pl, vCopy) | |||
copyVertexLimits(pl, vCopy) | |||
replicas := int32(1) | |||
if pl.Status.Phase == dfv1.PipelinePhasePaused { | |||
// If the desired phase is pause or we are in the middle of pausing we should not start any vertex replicas | |||
if isLifecycleChange(pl) { |
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.
So, I just noticed that isLifecycleChange() == true
in the case that the oldPhase was Paused but the desiredPhase==Running. I haven't read enough of the other code yet to confirm that that's okay here ?
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.
That should be a resume
pipeline case and I kept it like that for it to be handled by the
resume-logic
So the replicas will be scaled up there
if oldPhase := pl.Status.Phase; pl.Spec.Lifecycle.GetDesiredPhase() == dfv1.PipelinePhasePaused || | ||
oldPhase == dfv1.PipelinePhasePaused || oldPhase == dfv1.PipelinePhasePausing { | ||
// Regular pipeline change | ||
// This should be happening in call cases to ensure a clean initialization regardless of the lifecycle phase |
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.
// This should be happening in call cases to ensure a clean initialization regardless of the lifecycle phase | |
// This should be happening in all cases to ensure a clean initialization regardless of the lifecycle phase |
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 assume that's what you meant?
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.
Merging this, will address it in another PR.
Signed-off-by: Sidhant Kohli <[email protected]>
fixes #2027
fixes #1991
DrainedOnPause field is added here
Paused
state after a successful drain has been completed