-
Notifications
You must be signed in to change notification settings - Fork 111
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: add timeout for pausing pipeline. Fixes #992 #1138
Conversation
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
@dpadhiar - I tested the change, the annotation causes one extra reconciliation. Can you look into it? |
With a log, I am seeing that using If we use
|
Signed-off-by: Dillen Padhiar <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
…to pause-grace
} | ||
err = r.client.Patch(ctx, pl, client.RawPatch(types.MergePatchType, body)) | ||
if err != nil && !apierrors.IsNotFound(err) { | ||
return false, err |
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.
In this case, we should let it re-queue, right?
Signed-off-by: Dillen Padhiar <[email protected]>
…to pause-grace
Signed-off-by: Dillen Padhiar <[email protected]>
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.
All the rest looks good to me, except the one commented.
err := r.client.Patch(ctx, pl, client.RawPatch(types.JSONPatchType, []byte(dfv1.RemovePauseTimestampPatch))) | ||
if err != nil && !apierrors.IsNotFound(err) { | ||
return true, err | ||
} |
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.
Just a tiny issue here:
if err != nill && IsNotFound, return false, nil
Somehow the pipeline can not be found, and we skip it.
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.
if err != nil {
if apierrors.IsNotFound(err) {
return false, nil // skip pl if we can't find it
} else {
return true, err // otherwise requeue resume
}
}
Signed-off-by: Dillen Padhiar <[email protected]>
…to pause-grace
Signed-off-by: Dillen Padhiar <[email protected]>
…to pause-grace
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.
.
@whynowy Not sure why this jetstream e2e test continues to fail, otherwise should be done. |
Signed-off-by: Dillen Padhiar <[email protected]>
…to pause-grace
Signed-off-by: Dillen Padhiar <[email protected]>
Explain what this PR does.
Fixes #992
Allows user to add timeout (grace period) for pausing a pipeline. Default is 30 seconds and can be configured in
spec.Lifecycle.PauseGracePeriodSeconds
.