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 Apr 28, 2019
1 parent 1b10032 commit 1b53112
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/apis/pipeline/v1alpha1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ func ResourceFromType(r *PipelineResource) (PipelineResourceInterface, error) {
func AttributesFromType(prt PipelineResourceType) ([]string, error) {
r := &PipelineResource{}
r.Spec.Type = prt
// Todo (mk): We have run into this unfortunate event where technically we cannot determine
// what attributes an object has strictly from the PipelineResourceType alone.
// This is because of the subtypes that exists for the PipelineResourceTypeStorage type.
// At the moment, both of the subtypes happen to have equivalent keys in their
// Replacements(). So technically we can just pick one of the subtypes and still return the
// proper attributes. However, we may want to reconsider the approach on how we obtain or
// store these attributes.
if prt == PipelineResourceTypeStorage {
r.Spec.Params = []Param{

Expand Down

0 comments on commit 1b53112

Please sign in to comment.