-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaskRuns may be orphaned by a PipelineRun #2558
Comments
/kind bug |
my advice would be to not use the trackers for this but use a informer for The The issue you are going to run into is that the generate name on the I think you should setup the watch on |
Today we do both, not sure why:
So we do run the reconciler whenever a TaskRun is updated.
When we generate the name for a TaskRun we store it in the PipelineRun status. |
Expected Behavior
The
PipelineRun
controller should always be aware ofTaskRuns
owned by aPipelineRun
even when thePipelineRun
status is stale (because of API issues).Before using the
PipelineRun
status as a source of truth, we should check it against the list otTaskRuns
owned by thePipelineRun
.Actual Behavior
When
TaskRuns
are created during the reconcile cycle of aPipelineRun
, they are added to thePipelineRun
status which is then sync'ed back to etcd. The sync may fail whatever error condition - if that happens, theTaskRuns
are partially "orphaned": thePipelineRun
will be queued for reconcile when they change and they will be deleted when thePipelineRun
is deleted, however thePipelineRun
controller will not be aware that they exist at all, and it will create new duplicateTaskRuns
.This happens because
ResolvePipelineRun
relies on thePipelineRun
status alone, via thegetTaskRunName
function.Steps to Reproduce the Problem
Additional Info
v0.12.0
The text was updated successfully, but these errors were encountered: