-
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
Support "debug" mode for TaskRuns #2069
Comments
/kind feature |
One of the usecase that requires debug mode: |
/assign |
Working on this with @nikhil-thomas 💯 |
We have a somewhat analogous thing with OpenShift today. At least for a subset of the function I hear getting discussed. See https://docs.openshift.com/container-platform/3.11/cli_reference/basic_cli_operations.html#debug and https://github.com/openshift/oc/tree/master/pkg/cli/debug Perhaps some useful reference. |
@gabemontero This is something I had my eyes on earlier, I use this a lot in my debugging actually. But how it translates to taskrun debugging would be interesting to see. |
cool deal @waveywaves
Yeah, especially in the context of some of the live, step debugging discussed on the work group call. But certainly for say post completation failure scenarios, being able to replicate the pod that tekton creates for task/taskrun but then /bin/bash into the pod vs. actually run it has value. Being able to inspect the file system, etc. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
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. |
/remove-lifecycle rotten |
@vdemeester: Reopened this issue. In response to this:
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. |
This is in our roadmap https://github.com/tektoncd/pipeline/blob/master/roadmap.md /lifecycle frozen |
Updating this with the design doc that @waveywaves and @nikhil-thomas brought to the API working group in Apr 2020: |
Hello @bobcatfish, thank you for updating this and for the gentle reminder Nov 2020 Design Document: Debugging in Tekton v2 was created to simplify the ideas wrt the implementation after the level of complexity the previous document carried. After a bit of brainstorming with @vdemeester in Nov 2020, I have created a POC which puts a breakpoin after a failed step in a TaskRun after which the taskrun can be debugged by the user. The POC also contains scripts which the user can use to control the steps. You can check the POC here here. Will take it up in the next pipeline meeting. |
it might be less confusing not talk of also rather like the comment from @imjasonh here #2331 (comment) it might be better to have a way to define the steps that there is a breakpoint on & what kind (always / on failure / on condition etc). So rather than a global debug boolean, having a debug struct that lets you define an optional breakpoint for all steps; or 0..N breakpoints for named steps of type Always / OnError / OnCondition would be really nice to have. I often just want to set a breakpoint on 1 step only + don't wanna have to manually continue to it etc |
any update on this one? I know it works for individual taskruns but when trying to use it in a pipelinerun i get
|
See #5184 for PipelineRuns. |
Create #7352 for tracking feedback on this issue as it is implementated but being a feature-flag. I'll close that issue for now, please refer to the issue linked just above. |
Sometimes it would it useful to be able to
exec
into a running task environment to debug it. Currently, I would accomplish this by modifying the command being run with a long sleep or similar before running.It would be useful to add a
TaskRunSpec.DebugMode
boolean into theTaskRunSpec
(similar to the existingTaskRunSpec.Status
) that when set would make the entrypoint pause rather than exit.Similarly,
TaskRunSpec.DebugOnFailure
could be introduced which would make the entrypoint pause rather than exit only when the task has failed.Eventually this would allow useful features to be added to the
tkn
CLI, such as makingtkn pipelinerun logs --follow --attach-on-failure
automatically attach to the failed tasks to let the user debug them.The text was updated successfully, but these errors were encountered: