Skip to content

Commit

Permalink
Remove check for providedBy on output
Browse files Browse the repository at this point in the history
Before #320, `providedBy` would be declared on "resources" in general,
and so it was possible that this could be declared on an output. Now the
schema will only allow `providedBy` to be declared on inputs and so it
is no longer possible to get into this position.
  • Loading branch information
bobcatfish authored and knative-prow-robot committed Jan 24, 2019
1 parent 538e2b9 commit 3294a76
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,7 @@ func ValidateProvidedBy(state []*ResolvedPipelineRunTask) error {
for _, rprt := range state {
if rprt.PipelineTask.Resources != nil {
for _, dep := range rprt.PipelineTask.Resources.Inputs {
inputBinding, ok := rprt.ResolvedTaskResources.Inputs[dep.Name]
if !ok {
return fmt.Errorf("PipelineTask %s is trying to declare dependency for Resource %s which is not an input of PipelineTask %q", rprt.PipelineTask.Name, dep.Name, rprt.PipelineTask.Name)
}

inputBinding := rprt.ResolvedTaskResources.Inputs[dep.Name]
for _, pb := range dep.ProvidedBy {
if pb == rprt.PipelineTask.Name {
return fmt.Errorf("PipelineTask %s is trying to depend on a PipelineResource from itself", pb)
Expand Down

0 comments on commit 3294a76

Please sign in to comment.