results icon indicating copy to clipboard operation
results copied to clipboard

Client copying results annotations from previous runs lead to wrong results data

Open khrm opened this issue 1 year ago • 2 comments

Expected Behavior

Pipelinerun control shouldn't allow results annotation to be ignored. It should ignore all annotations apart from the one for summaries.

Actual Behavior

Creating a pipelinerun with previous annotations leads to the result not being created. But records are updated with new taskruns.

Steps to Reproduce the Problem

  1. Create a pipelinerun and wait for it to be finished irrespective of failure or success.
  2. Check the annotations in the pipelinerun above. Copy those same annotations to the new pipelinerun and create it.
  3. Above scenario will be observed.

How to fix this:

  • Like we do for chains in tektoncd/pipeline controllers. Filtering the annotations that we don't require. or
  • Creating a webhook in results which resolves this for us. Is it efficient? Will we require any other use-case of webhook in the future?

We shouldn't modify pipelinerun in our watcher reconcilers at all to avoid race conditions.

khrm avatar Aug 08 '23 17:08 khrm

  1. Solution is here: https://github.com/tektoncd/pipeline/pull/6858

khrm avatar Aug 08 '23 17:08 khrm

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.

tekton-robot avatar Nov 06 '23 18:11 tekton-robot