-
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
Only make a PVC for a PipelineRun if we need to. 🗑️ #1545
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
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.
Amazing!!! 😎
@dlorenc the one thing I can't verify is if after #1068 we made sure to add an example and/or integration test that covered that case (a pipeline with one task that had an output) b/c i feel like before we merge this we should be sure that we don't cause that bug to come back (reasoning through it i'm pretty sure we won't but just in case!)
/approve
var newSteps []v1alpha1.Step | ||
for _, dPath := range boundResource.Paths { | ||
newSteps = append(newSteps, as.GetCopyToStorageFromSteps(resource.GetName(), sourcePath, dPath)...) | ||
needsPvc = true |
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.
nice, i think this is the key that makes it work which we were missing in our previous attempts @dlorenc ?
b/c in the first attempt we didnt change this at all, and then in #1069 my massive hack was too hacky - i was looking to see if the PVC existed when actually we could just check if this path was bound 🤦♀️
One detail is that we had sort of intended that path
be something that could be generically provided by users - but im pretty sure that actually didn't work (and hope we'll remove it forever one day soon 🙏 ) and this block should only be hit in the PipelineRun case anyway, in which case there's no way for the user to provide the value sooooo
long story short 🎉 🎉 🎉
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
We only need to make a PVC if a Pipeline contains tasks that declare Output resources of the allowed types. This PR changges our detection to only create a PVC under those conditions. This was originally attempted in tektoncd#1007 and then subsequently rolled back in tektoncd#1071. I *think* this one gets the logic correct :) Co-authored-by: Christie Wilson <bobcatfish@gmail.com> Fixes: tektoncd#937
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
The following is the coverage report on pkg/.
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish, dibyom 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 |
Changes
We only need to make a PVC if a Pipeline contains tasks that declare Output
resources of the allowed types. This PR changes our detection to only create
a PVC under those conditions.
This was originally attempted in #1007 and
then subsequently rolled back in #1071. I
think this one gets the logic correct :)
Co-authored-by: Christie Wilson bobcatfish@gmail.com
Fixes: #937
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