pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

[Carry #3238] Cancel taskrun using entrypoint binary

Open vdemeester opened this issue 3 years ago • 10 comments

Changes

This is a carry-over from #4618.

The cancellation of taskruns is now done through the entrypoint binary through a new flag called 'cancel_file'. This removes the need for deleting the pods to cancel a taskrun, allowing examination of the logs on the pods from cancelled taskruns. Part of work on issue #3238

Submitter Checklist

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

  • [ ] Has Docs included if any changes are user facing
  • [x] Has Tests included if any functionality added or changed
  • [x] Follows the commit message standard
  • [x] Meets the Tekton contributor standards (including functionality, content, code)
  • [x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • [x] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • [ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Taskrun can now be cancelled using the entrypoint, which results of Pods from these TaskRun to be no longer deleted: they are stopped instead.

vdemeester avatar Aug 31 '22 12:08 vdemeester

/kind feature

vdemeester avatar Aug 31 '22 12:08 vdemeester

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/config/feature_flags.go 79.0% 78.1% -0.9
pkg/entrypoint/entrypointer.go 84.8% 81.2% -3.6

tekton-robot avatar Aug 31 '22 12:08 tekton-robot

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 82.4% 2.4
pkg/apis/config/feature_flags.go 79.0% 78.1% -0.9
pkg/entrypoint/entrypointer.go 84.8% 86.2% 1.4
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 80.2% 80.2% 0.0

tekton-robot avatar Aug 31 '22 13:08 tekton-robot

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 82.4% 2.4
pkg/apis/config/feature_flags.go 79.0% 78.1% -0.9
pkg/entrypoint/entrypointer.go 84.8% 81.2% -3.6
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 80.7% 80.7% 0.0

tekton-robot avatar Aug 31 '22 15:08 tekton-robot

/retest

abayer avatar Aug 31 '22 20:08 abayer

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please ask for approval from lbernick after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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 avatar Sep 06 '22 13:09 tekton-robot

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 76.5% -3.5
pkg/apis/config/feature_flags.go 79.0% 78.1% -0.9
pkg/entrypoint/entrypointer.go 84.8% 86.2% 1.4
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 80.7% 80.7% 0.0

tekton-robot avatar Sep 06 '22 13:09 tekton-robot

It looks like this is copied from #4618 without changes? I left a few comments on that PR, would you mind addressing them?

lbernick avatar Sep 06 '22 14:09 lbernick

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 76.5% -3.5
pkg/apis/config/feature_flags.go 78.9% 75.4% -3.6
pkg/entrypoint/entrypointer.go 84.8% 81.2% -3.6
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 81.7% 81.6% -0.1

tekton-robot avatar Oct 05 '22 13:10 tekton-robot

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 76.5% -3.5
pkg/apis/config/feature_flags.go 78.9% 78.0% -1.0
pkg/entrypoint/entrypointer.go 84.8% 86.2% 1.4
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 81.7% 81.6% -0.1

tekton-robot avatar Oct 05 '22 14:10 tekton-robot

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 68.4% -11.6
pkg/apis/config/feature_flags.go 78.9% 78.0% -1.0
pkg/entrypoint/entrypointer.go 84.8% 86.2% 1.4
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 81.7% 81.6% -0.1

tekton-robot avatar Oct 05 '22 14:10 tekton-robot

/retest

vdemeester avatar Oct 05 '22 15:10 vdemeester

/test all

vdemeester avatar Oct 05 '22 15:10 vdemeester

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
cmd/entrypoint/main.go 13.6% 13.3% -0.2
cmd/entrypoint/waiter.go 80.0% 73.7% -6.3
pkg/apis/config/feature_flags.go 78.9% 78.0% -1.0
pkg/entrypoint/entrypointer.go 84.8% 86.2% 1.4
pkg/pod/entrypoint.go 89.5% 89.1% -0.4
pkg/reconciler/taskrun/taskrun.go 81.7% 81.6% -0.1

tekton-robot avatar Oct 05 '22 16:10 tekton-robot

/retest

vdemeester avatar Oct 05 '22 17:10 vdemeester

/retest

vdemeester avatar Oct 06 '22 13:10 vdemeester

@vdemeester: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-tekton-pipeline-unit-tests 1577969be9272ad9aa0cb9e69d3b195609e63a79 link true /test tekton-pipeline-unit-tests
pull-tekton-pipeline-integration-tests 1577969be9272ad9aa0cb9e69d3b195609e63a79 link true /test pull-tekton-pipeline-integration-tests
pull-tekton-pipeline-alpha-integration-tests 1577969be9272ad9aa0cb9e69d3b195609e63a79 link true /test pull-tekton-pipeline-alpha-integration-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

tekton-robot avatar Oct 06 '22 14:10 tekton-robot

@vdemeester: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tekton-robot avatar Oct 12 '22 19:10 tekton-robot

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Jan 10 '23 19:01 tekton-robot

@vdemeester Hi, why did this get closed?

kubasikus avatar Mar 08 '23 11:03 kubasikus

@vdemeester Hi, why did this get closed?

Didn't have time to keep up-to-date, it's getting carried in https://github.com/tektoncd/pipeline/pull/6511

vdemeester avatar May 22 '23 11:05 vdemeester