-
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
Improve debuggability of PullRequest PipelineResource #1818
Comments
/kind feature |
A PullRequest type pipeline resource is now validated: an unrecognised 'fieldName' in secrets will trigger an error. Part of work on tektoncd#1818 As stated in tektoncd#1818, this will help improve the debuggability of the PullRequst pipeline resource, as the validatiob will cause a failure in response to invalid input as early as possible. Signed-off-by: Arash Deshmeh <[email protected]>
A PullRequest type pipeline resource is now validated: an unrecognised 'fieldName' in secrets will trigger an error. Part of work on tektoncd#1818 As stated in tektoncd#1818, this will help improve the debuggability of the PullRequst pipeline resource, as the validatiob will cause a failure in response to invalid input as early as possible. Signed-off-by: Arash Deshmeh <[email protected]>
A PullRequest type pipeline resource is now validated: an unrecognised 'fieldName' in secrets will trigger an error. Part of work on #1818 As stated in #1818, this will help improve the debuggability of the PullRequst pipeline resource, as the validatiob will cause a failure in response to invalid input as early as possible. Signed-off-by: Arash Deshmeh <[email protected]>
The pullrequest pipeline resource now verifies the statuses before uploading them. As specified in tektoncd#1818, this is to improve the debuggability of pullrequest resources, by preventing a silent failure e.g. if there has been a change in the fields' names of a status object. Signed-off-by: Arash Deshmeh <[email protected]>
The pullrequest pipeline resource now verifies the statuses before uploading them. As specified in #1818, this is to improve the debuggability of pullrequest resources, by preventing a silent failure e.g. if there has been a change in the fields' names of a status object. Signed-off-by: Arash Deshmeh <[email protected]>
@bobcatfish if there are other validations that would be helpful, I can submit a PR. So far, the |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten 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. |
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. |
I think it's reasonable to close this for now, esp. since the future of this pipeline resource is uncertain. I think we'll be supporting this logic somewhere regardless of whether it's part of a pipelineresource or not but i think it's fine to close this for now. |
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. |
Expected Behavior
If I make simple mistakes in my usage of the PullRequest PipelineResource, I should get an informative error. For example errors like:
fieldName
for the secret (Can't use PullRequest PipelineResource to update status #1777)Actual Behavior
In some cases, things just succeed silently but do nothing. In other cases you get #1777 where things fail cryptically.
Steps to Reproduce the Problem
See #1777 to repro the
fieldName
issue (basically use something besidesauthToken
for the secret https://github.com/tektoncd/pipeline/blob/master/docs/resources.md#pull-request-resource).To reproduce an issue where the wrong format is used, you can use the old format (e.g. https://github.com/bobcatfish/catservice/blob/master/tekton/set-status.yaml) for a status update (pre #1550). The old format was:
The new format is:
When I try to use the wrong format, the Task silently passes and in the logs I can see:
And then I sadly gaze at my open pull request where nothing has happened (true story).
Additional Info
Since as @wlynch has pointed out that some of the trouble is the way the github api responds (e.g. if you dont specify the token properly, you end up with a 404 from github), one idea for how we can handle this is to add more validation:
secrets
, fail earlyThe text was updated successfully, but these errors were encountered: