From 43eaa8b3ded7f2ff5f1e93e7dbfa92fb41273f46 Mon Sep 17 00:00:00 2001 From: mikeykhalil Date: Sat, 27 Apr 2019 22:45:29 -0700 Subject: [PATCH] resource types: leave comment to explain problem --- pkg/apis/pipeline/v1alpha1/resource_types.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/apis/pipeline/v1alpha1/resource_types.go b/pkg/apis/pipeline/v1alpha1/resource_types.go index 26b5ffa6d5e..fc57de68d4d 100644 --- a/pkg/apis/pipeline/v1alpha1/resource_types.go +++ b/pkg/apis/pipeline/v1alpha1/resource_types.go @@ -170,9 +170,13 @@ func ResourceFromType(r *PipelineResource) (PipelineResourceInterface, error) { func AttributesFromType(prt PipelineResourceType) ([]string, error) { r := &PipelineResource{} r.Spec.Type = prt + // Todo : The TaskResource struct lacks data to correctly infer the type of + // a PipelineResourceTypeStorage. While all the currently implemented types + // have the same attributes, this doesn't appear to be an explicit design + // choice. Future types could not fit this constraint. So we cannot safely + // make any assumptions about the attributes. if prt == PipelineResourceTypeStorage { r.Spec.Params = []Param{ - { Name: "type", Value: string(PipelineResourceTypeGCS),