pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

CustomRun.Status.CustomRunStatusFields.Results field do not support all ResultTypes Making Interop Across Pipeline Not 100% Compatible

Open aaron-prindle opened this issue 1 year ago • 2 comments

In the latest version of CustomRun (v1beta1), the CustomRun.Status.CustomRunStatusFields.Results field do not support all ResultTypes that v1 TaskRun does.

This is the CustomRunResult struct (code here:

// CustomRunResult used to describe the results of a task
type CustomRunResult struct {
    // Name the given name
    Name string `json:"name"`
    // Value the given value of the result
    Value string `json:"value"`
}

This is the v1 TaskRun Result struct (code here):

// TaskRunResult used to describe the results of a task
type TaskRunResult struct {
	// Name the given name
	Name string `json:"name"`

	// Type is the user-specified type of the result. The possible type
	// is currently "string" and will support "array" in following work.
	// +optional
	Type ResultsType `json:"type,omitempty"`

	// Value the given value of the result
	Value ResultValue `json:"value"`
}

Currently I believe this is a bug as it makes it not possible to do fully interop with v1 TaskRuns w/ a Custom Task (CustomRun) as there is not a way to properly map all ResultTypes.

The fix here would be update the CustomRunResult to support String, Array, and Object Result types making the supported Results similar/identical to the Results available to V1 Task/TaskRuns

aaron-prindle avatar Mar 13 '24 18:03 aaron-prindle

/cc @Yongxuanzhang @chitrangpatel I think this is something that was just not implemented right? Shouldn't be hard to add?

dibyom avatar Mar 13 '24 18:03 dibyom

I agree, this feels unintentional. We should be able to add it easily I think.

chitrangpatel avatar Mar 13 '24 19:03 chitrangpatel