Skip to content
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

Promote Graceful termination to stable #4668

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

vinamra28
Copy link
Member

@vinamra28 vinamra28 commented Mar 12, 2022

Changes

With the addition of graceful termination in v0.25.x release,
PipelineRunCancelled was deprecated. It's been 8 months and no such
issues so far, we can promote these to beta.

In this patch, unguarding the graceful termination from alpha feature
flag and modifying the tests based on this.

closes #4611

Signed-off-by: vinamra28 jvinamra776@gmail.com

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

Promoting graceful termination of pipelinerun to beta and keeping `PipelineRunCancelled` as deprecated, it will be removed after 3 releases

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 12, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 12, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

thanks for helping out here @vinamra28, just took a quick glance - will wait for it to be ready for review to take a closer look

/assign

closes #4611

pkg/apis/pipeline/v1beta1/pipelinerun_types.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipelinerun_types.go Outdated Show resolved Hide resolved
@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch 2 times, most recently from 60c0049 to 802e01f Compare March 15, 2022 09:28
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch from 802e01f to d07d817 Compare March 15, 2022 09:43
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch from d07d817 to e7d57b6 Compare March 15, 2022 12:39
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.1
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

thanks again @vinamra28!

please remove graceful termination from the alpha features in the install docs - https://github.com/tektoncd/pipeline/blob/f2da9a877f295a6cb865d8dee7b52872089c061d/docs/install.md#alpha-features

docs/pipelineruns.md Outdated Show resolved Hide resolved
docs/pipelineruns.md Outdated Show resolved Hide resolved
test/v1alpha1/cancel_test.go Outdated Show resolved Hide resolved
@jerop
Copy link
Member

jerop commented Mar 15, 2022

@vinamra28 - we should wait for the fixes related to graceful stopping as described in #4651 (comment) to go in first

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.8% -0.0

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 19, 2022
@jerop jerop added this to the Pipelines v0.35 milestone Mar 22, 2022
@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch from a604cdf to ba5a04b Compare March 26, 2022 04:36
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 26, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.9% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 97.6% -1.2
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.9% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 97.6% -1.2
pkg/reconciler/pipelinerun/cancel.go 89.5% 88.6% -0.9
pkg/reconciler/pipelinerun/pipelinerun.go 83.9% 83.9% -0.0

@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 16, 2022
@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch 2 times, most recently from ac9eb47 to 7c35c52 Compare April 16, 2022 17:17
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 16, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0

@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch from 7c35c52 to 4666c1d Compare April 17, 2022 06:23
@vinamra28 vinamra28 marked this pull request as ready for review April 17, 2022 06:23
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 17, 2022
@vinamra28
Copy link
Member Author

@vdemeester @jerop @pritidesai @imjasonh I have updated the PR based on above feedbacks. PTAL

@vinamra28
Copy link
Member Author

/retest

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0

@@ -29,7 +29,7 @@ import (

"github.com/tektoncd/pipeline/test/parse"

"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
Copy link
Member

Choose a reason for hiding this comment

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

looks like this test is meant for v1alpha1, maybe keep this as is?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah test is meant for v1alpha1 but the status being used here were from v1beta1. Once PipelineRunCancelled is removed, we anyhow will have to use v1beta1 status. Moreover v1alpha1 gets converted to v1beta1 during runtime

PipelineRunSpecStatusStoppedRunFinally,
PipelineRunSpecStatusPending), "status")
}
return apis.ErrInvalidValue(fmt.Sprintf("%s should be %s or %s", status,
Copy link
Member

Choose a reason for hiding this comment

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

It seems like removing this will mean that the deprecated value will no longer work, and it seems like from previous PR comments that we want to avoid removing this value until the new value is promoted to beta.

Copy link
Member Author

Choose a reason for hiding this comment

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

@lbernick it's just the webhook validation which was checking for the fields that were behind feature flag.

Copy link
Member

Choose a reason for hiding this comment

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

@lbernick it's just the error message. We could still include PipelineRunSpecStatusCancelledDeprecated but as it is deprecated, I don't really think it would make sense.

Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 19, 2022
With the addition of graceful termination in v0.25.x release,
`PipelineRunCancelled` was deprecated. It's been 8 months and no such
issues so far, we can promote these to beta.

In this patch, unguarding the graceful termination from alpha feature
flag and modifying the tests based on this.

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
@vinamra28 vinamra28 force-pushed the promote-graceful-termination branch from 4666c1d to 83807c4 Compare April 21, 2022 03:42
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipelinerun_validation.go 98.9% 98.8% -0.0

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

We should add a deprecated note for removing PipelineRunSpecStatusCancelledDeprecated though, in the doc

PipelineRunSpecStatusStoppedRunFinally,
PipelineRunSpecStatusPending), "status")
}
return apis.ErrInvalidValue(fmt.Sprintf("%s should be %s or %s", status,
Copy link
Member

Choose a reason for hiding this comment

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

@lbernick it's just the error message. We could still include PipelineRunSpecStatusCancelledDeprecated but as it is deprecated, I don't really think it would make sense.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2022
@lbernick
Copy link
Member

We should add a deprecated note for removing PipelineRunSpecStatusCancelledDeprecated though, in the doc

@vdemeester are you referring to this file? it's already there

@lbernick
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2022
@tekton-robot tekton-robot merged commit 9700699 into tektoncd:main Apr 21, 2022
@vinamra28 vinamra28 deleted the promote-graceful-termination branch April 21, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TEP-0058: Graceful Termination - Promotions and Deprecation
5 participants