-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add debug with breakpoint onFailure to TaskRun Spec #3857
Conversation
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/kind feature |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/assign |
The following is the coverage report on the affected files.
|
143690e
to
0390f18
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/test tekton-pipeline-unit-tests |
The following is the coverage report on the affected files.
|
/test tekton-pipeline-unit-tests |
/test pull-tekton-pipeline-alpha-integration-tests |
/test pull-tekton-pipeline-build-tests |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-alpha-integration-tests |
1 similar comment
/test pull-tekton-pipeline-alpha-integration-tests |
Based on TEP-0042, this commit adds the ability for the user to debug TaskRuns with the spec.debug delaration where the user can provide breakpoints in spec.debug.breakpoint. With this commit the only breakpoint supported right now is the "onFailure" breakpoint which pauses the TaskRun during a step failure so the user can get shell access to the failed step container and debug. The following additions have been done. - Add -breakpoint_on_failure to entrypointer which disables exit of container upon failure - Add debug helper scripts to /tekton/debug/scripts which contains continuing the TaskRun and marking the step as a success or a failure by writing <n>.breakpointexit file to /tekton/tools - Add /tekton/debug/info/<n> mount which is used by helper scripts to understand which step they are running in where <n> denotes the step number eg: First step = 0, Second step = 1 and so on. - Exit code is propogated from .breakpointexit to end of TaskRun - Disable step skipError if breakpoint enabled - Add webhook validation for debug - Add Debug as a alpha feature Signed-off-by: Vincent Demeester <vdemeest@redhat.com> Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
The following is the coverage report on the affected files.
|
/test pull-tekton-pipeline-alpha-integration-tests |
/test pull-tekton-pipeline-alpha-integration-tests |
/test pull-tekton-pipeline-build-tests |
[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 |
- [Debug Scripts](#debug-scripts) | ||
|
||
|
||
## Overview |
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.
Not a blocker but it might be worth mentioning here that debug is behind a feature flag.
|
||
## Debugging TaskRuns | ||
|
||
The following provides explanation on how Debugging TaskRuns is possible through Tekton. To understand how to use |
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 seems like it's developer-focused to me. Wonder if it should live under docs/developers/debug.md
?
@@ -447,6 +449,43 @@ spec: | |||
status: "TaskRunCancelled" | |||
``` | |||
|
|||
|
|||
### Debugging a `TaskRun` |
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.
Again probably worth mentioning that this is an alpha feature, with a link to the "Alpha Features" section of docs/install.md
.
Adding lgtm since the remaining changes I've suggested are small doc fixes. Suggest also adding an entry about debug to the "Alpha Features" section of install.md.. /lgtm |
@sbwsg I will create a separate PR for the doc changes. Thank you for taking time to review this. |
Changes
Add debug with breakpoint onFailure to TaskRun Spec
/tekton/debug/scripts
and/tekton/debug/info/<step-no>
to TaskRun Pod.In addition, categorize the changes you're making using the "/kind" Prow command, example:
/kind feature
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes