Skip to content
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 mount artifact bucket volume once, even with multiple inputs. #1370

Merged
merged 3 commits into from
Oct 11, 2019

Conversation

jbarrick-mesosphere
Copy link
Contributor

Changes

This fixes an issue where an artifact bucket secret can be mounted multiple times if there are multiple inputs that copy
from another task.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

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

TaskRuns no longer error when using artifact buckets and multiple sources.

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Sep 30, 2019
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 30, 2019
@tekton-robot
Copy link
Collaborator

Hi @jbarrick-mesosphere. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@vdemeester
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 1, 2019
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/resources/input_resources.go 92.6% 93.0% 0.4

@dlorenc
Copy link
Contributor

dlorenc commented Oct 3, 2019

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2019
@dlorenc
Copy link
Contributor

dlorenc commented Oct 3, 2019

/approve

Thanks!

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlorenc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2019
This fixes an issue where an artifact bucket secret can be mounted multiple times if there are multiple inputs that copy
from another task.
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2019
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/resources/input_resources.go 95.7% 96.0% 0.3

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/resources/input_resources.go 95.7% 96.0% 0.3

@dlorenc
Copy link
Contributor

dlorenc commented Oct 11, 2019

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2019
@tekton-robot tekton-robot merged commit f8aca59 into tektoncd:master Oct 11, 2019
gpaul pushed a commit to gpaul/pipeline that referenced this pull request Apr 24, 2020
This fixes an issue where a Task that uses a secret for both input and
output resources leads to duplicate volumes in the generated Pod.

This happens because both `resources.AddInputResource()` and
`resources.AddOutputResources()` mount the necessary secrets to load
artifacts. However, when multiple resources use the same secret the secret
volume is added twice and leads to an invalid PodSpec.

This fix extends the work done in
tektoncd#1370
gpaul pushed a commit to gpaul/pipeline that referenced this pull request Apr 27, 2020
This fixes an issue where a Task that uses a secret for both input and
output resources leads to duplicate volumes in the generated Pod.

This happens because both `resources.AddInputResource()` and
`resources.AddOutputResources()` mount the necessary secrets to load
artifacts. However, when multiple resources use the same secret the secret
volume is added twice and leads to an invalid PodSpec.

This fix extends the work done in
tektoncd#1370

(cherry picked from commit 1bcbe43)
tekton-robot pushed a commit that referenced this pull request May 1, 2020
This fixes an issue where a Task that uses a secret for both input and
output resources leads to duplicate volumes in the generated Pod.

This happens because both `resources.AddInputResource()` and
`resources.AddOutputResources()` mount the necessary secrets to load
artifacts. However, when multiple resources use the same secret the secret
volume is added twice and leads to an invalid PodSpec.

This fix extends the work done in
#1370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants