tektoncd / results

Long term storage of execution results.
Apache License 2.0
77 stars 73 forks source link

Result Summary startTime is null #509

Open iainsproat opened 1 year ago

iainsproat commented 1 year ago

Expected Behavior

The OpenAPI specification indicates that RecordSummary starttime is a required value, and therefore would be expected to be populated with a valid DateTime corresponding to the Start time of the TaskRun or PipelineRun.

Actual Behavior

The result summary start time is null.

Run the SQL statement SELECT recordsummary_start_time FROM results; against the postgres database. All returned data is null.

Steps to Reproduce the Problem

  1. Create a TaskRun or PipelineRun
  2. Query the API (e.g. REST) /v1alpha2/parents/{parent}/results/{result_uid}
  3. Inspect the returned summary.startTime, the value is empty in conflict with the OpenAPI specification for the same.

Additional Info

iainsproat commented 1 year ago

Similarly, I've noticed that summary.endTime (postgres colum recordsummary_end_time) is not always present, and the OpenAPI specification requires it to be present.

I'm not sure whether the intent is to always require data for these fields/columns, and whether this is an OpenAPI documentation issue or a bug in the code.

alan-ghelardi commented 1 year ago

I noticed the same behavior a while back. I haven't yet dug into the problem, but I have the impression that the watcher isn't updating the record summary properly and this issue happens when the watcher creates the Result before the Tekton Pipeline's controller manages to mark the PipelineRun as started. I created a pr to resolve another issue, but perhaps that approach helps with this one as well.

tekton-robot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

iainsproat commented 12 months ago

/remove-lifecycle stale This is still a valid and relevant issue without resolution.