Skip to content

Commit

Permalink
Storing PipelineRun and TaskRun deletion metadata
Browse files Browse the repository at this point in the history
Earlier, data coming during deletion like timestamp weren't stored.
This PR fixes that.
  • Loading branch information
khrm committed Oct 21, 2024
1 parent ed99c47 commit 8374fae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/watcher/reconciler/pipelinerun/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ func isMarkedAsReadyForDeletion(taskRun *pipelinev1.TaskRun) bool {
// that we see flowing through the system. If we don't add a finalizer, it could
// get cleaned up before we see the final state and store it.
func (r *Reconciler) FinalizeKind(ctx context.Context, pr *pipelinev1.PipelineRun) knativereconciler.Event {
// Reconcile the pipelinerun to ensure that it is stored in the database
r.ReconcileKind(ctx, pr)

// If logsClient isn't nil, it means we have logging storage enabled
// and we can't use finalizers to coordinate deletion.
if r.logsClient != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/watcher/reconciler/taskrun/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, tr *pipelinev1.TaskRun)
// that we see flowing through the system. If we don't add a finalizer, it could
// get cleaned up before we see the final state and store it.
func (r *Reconciler) FinalizeKind(ctx context.Context, tr *pipelinev1.TaskRun) knativereconciler.Event {
// Reconcile the taskrun to ensure that it is stored in the database
r.ReconcileKind(ctx, tr)

// If logsClient isn't nil, it means we have logging storage enabled
// and we can't use finalizers to coordinate deletion.
if r.logsClient != nil {
Expand Down

0 comments on commit 8374fae

Please sign in to comment.