Skip to content

Commit

Permalink
resource types: leave comment to explain problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeykhalil committed May 30, 2019
1 parent 1b10032 commit 43eaa8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/apis/pipeline/v1alpha1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 43eaa8b

Please sign in to comment.