-
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
pullRequest resource invalid upload path? #1704
Comments
@castlemilk
|
/kind question |
but the pullRequest resource is supposed to automatically manage the upload if used as an output resource, why should I have to copy it to /workspace/output/? seem like extra work. |
We had a PR up for a while to pre-fill the output directory of a pull request resource but it was ultimately closed without merging: #1357 I think in general "output" resources are a bit confusing and the contract we've got now that requires their state to be placed in the I'm definitely hoping to alleviate some of the pain around read vs write with the work I'm doing now. |
Some background: when the same resource was used as an input and an output, we used to make it so that instead of using /workspace/output, we'd use /workspace - this was strange b/c it meant (iirc) that the path the resources were at would change depending on what resources were bound at runtime, so we removed that functionality in #1122 In #1357 it was proposed to do what I think you're suggesting - to prefill the output dir with the contents of the corresponding input. At the time we thought the manifest based approach (#1357 (comment)) was at least enough to avoid accidentally wiping out PR data; however the issue you mentioned still exists and in fact if you look at recent examples by @dlorenc (e.g.https://medium.com/@dlorenc/building-a-chatops-bot-with-tekton-6d51c4f958f9) the first thing he does in every task that modifies a PR is copy all the data from the input to the output : - name: copy-pr
image: ubuntu
command: ["/bin/sh"]
args:
- -c
- cp -r /workspace/pr/ /workspace/output/ Which come to think of it could be really weird if those were two different PullRequests - I think this is part of the reason why the latest PipelineResource redesign (#1673) suggests a read write (rw) mode for PipelineResources to cover this case. However this design is still in flux - long story short I think we have a couple options:
Since this redesign is taking us a while, im totally fine with (1) personally - esp. since I find myself having to deal with the same issue :D (+ @sbwsg ) |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
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. |
@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
the pullRequest resource upload step should automating use the correct directory for uploading to a PR.
The input mounts to
/workspace/<resource>/
, would expect this folder to be used for the upload step?Actual Behavior
upload step is looking in
/workspace/output/<resource>/
which cannot be found because nothing has copied content there or this is an invalid directory to be using?Steps to Reproduce the Problem
Pipeline
which has a task that contains a pullRequestPipelineResource
in both input and output resources as follows:Additional Info
tekton v0.9.1
The text was updated successfully, but these errors were encountered: