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 configuration to PipelineRun #4145
Conversation
Based on TEP-0042, this commit will allow users to enable the `debug.breakpoints` property on any `TaskRun` resources generated by a `PipelineRun` the reconciler will pass any `debug.breakpoints` properties from the PipelineRun's taskRunSpecs over to the generated resolved `TaskRun` instances so that per Task debugging can be enabled Signed-off-by: James Strachan <james.strachan@gmail.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Hi @jstrachan. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
The following is the coverage report on the affected files.
|
/kind feature |
We need to mark this field as an alpha field just how we did it for on |
Trying to understand how this would work? debug every resource in a sequence or the order its created in? would this pause the execution of the entire pipeline? how would you resume? do you really need debugging every resource a pipeline creates? or just a step level debug is sufficient, for example, pausing a particular step irrespective of whether its part of a |
@pritidesai this PR let’s you enable debugging on a PipelineRun for a named Task, so that when the controller creates the TaskRun, the If a TaskRun pauses on a breakpoint there is no effect on any other Task in the same pipeline. Resume works the same as with a TaskRun - running scripts inside the pod. Basically debug/breakpoints only affect a TaskRun. The reason for this PR is that the tekton controller creates the TaskRun resources if you use a PipelineRun |
@vdemeester you mean in the validate code: https://github.com/tektoncd/pipeline/pull/3857/files#diff-1153e019c943846e52e599290b137d535b134d52a5d922e32ed42c5cdefe6f8aR81 or is there another way to mark the |
Signed-off-by: James Strachan <james.strachan@gmail.com>
@vdemeester I just added |
The following is the coverage report on the affected files.
|
Signed-off-by: James Strachan <james.strachan@gmail.com>
The following is the coverage report on the affected files.
|
until this PR merges and gets released: tektoncd/pipeline#4145
until this PR merges and gets released: tektoncd/pipeline#4145
I would first like to thank you for the PR on debug ! This is great ! (In my opinion) It would be preferrable to have
I do like the idea of giving a choice to the user for making some of the taskRuns debuggable initially by mentioning it in the taskRunSpecs. The above example I mentioned is something we can introduce later as well. |
@waveywaves how about we allow a global debug setting applied to all Tasks and a per task debug option & a way to merge the 2 structs? So that folks can use one or the other? |
@jstrachan @bobcatfish @vdemeester I am not sure, but do we need a discussion around this(maybe in the next working group call) and update to the existing TEP to hash out the details before proceeding ? This level of change where taskRun debug is being enabled through pipelineRuns should be alright initially to let users enable taskRun debug through pipelineRuns. wdyt ? |
so that its easy to debug all TaskRun instances in a PipelineRun easily via a simple top level struct Signed-off-by: James Strachan <james.strachan@gmail.com>
@waveywaves OK I've added a PipelineRun.Spec.Debug flag in addition to TaskRun specific structs; so you can debug all Tasks with a top level setting or add specific settings on a TaskRun instead |
The following is the coverage report on the affected files.
|
@waveywaves the initial implementation of merge combines the breakpoint names from the |
@jstrachan: The following tests failed, say
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. |
1 similar comment
@jstrachan: The following tests failed, say
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. |
Indeed, I think we need to update the TEP or do a follow-up TEP on PipelineRun support. |
@jstrachan: 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. |
A new TEP or an update to TEP-0042: TaskRun Breakpoint on Failure of Step is needed before making this change So, closing this PR for now (@jstrachan feel free to open when the TEP is implementable) |
@jerop as you might know, James is no longer working the project. Could anyone on the Teton team try to reimplemented this on top the TEP which now marked as implémentés ? This a great future to have. |
@waveywaves opened a TEP for this - tektoncd/community#572 we are meeting tomorrow to discuss some details and will update the TEP soon after - in the meantime please share your feedback on the proposal in tektoncd/community#572
|
@jerop thanks :) |
@jstrachan @jerop @waveywaves I think it can be reopened and then make some updates:
🌹 🌹 🌹 |
Based on TEP-0042, this commit will allow users to enable the
debug.breakpoints
property on anyTaskRun
resources generated by aPipelineRun
the reconciler will pass any
debug.breakpoints
properties from the PipelineRun's taskRunSpecs over to the generated resolvedTaskRun
instances so that per Task debugging can be enabledSigned-off-by: James Strachan james.strachan@gmail.com
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes