Skip to content

Commit 5b5cd65

Browse files
Revert "Do not reconcile images and builds being deleted"
This reverts commit 1d6a5b2. Co-authored-by: Danail Branekov <danailster@gmail.com>
1 parent 1d6a5b2 commit 5b5cd65

File tree

4 files changed

+0
-46
lines changed

4 files changed

+0
-46
lines changed

pkg/reconciler/build/build.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ func (c *Reconciler) Reconcile(ctx context.Context, key string) error {
136136
return err
137137
}
138138

139-
if build.DeletionTimestamp != nil {
140-
return nil
141-
}
142-
143139
build = build.DeepCopy()
144140
build.SetDefaults(ctx)
145141

pkg/reconciler/build/build_test.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -258,23 +258,6 @@ func testBuildReconciler(t *testing.T, when spec.G, it spec.S) {
258258
})
259259
})
260260

261-
it("does not reconcile a build being deleted", func() {
262-
bld.Status.ObservedGeneration = 1
263-
264-
bld.Generation = 2
265-
deletionTimetamp := metav1.NewTime(time.Now())
266-
bld.DeletionTimestamp = &deletionTimetamp
267-
268-
rt.Test(rtesting.TableRow{
269-
Key: key,
270-
Objects: []runtime.Object{
271-
bld,
272-
},
273-
WantErr: false,
274-
WantStatusUpdates: []clientgotesting.UpdateActionImpl{},
275-
})
276-
})
277-
278261
it("does not update status if there is no update", func() {
279262
buildPod, err := podGenerator.Generate(ctx, bld)
280263
require.NoError(t, err)

pkg/reconciler/image/image.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ func (c *Reconciler) Reconcile(ctx context.Context, key string) error {
121121
return err
122122
}
123123

124-
if image.DeletionTimestamp != nil {
125-
return nil
126-
}
127-
128124
image = image.DeepCopy()
129125
image.SetDefaults(ctx)
130126

pkg/reconciler/image/image_test.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -252,27 +252,6 @@ imageWithBuilder := &buildapi.Image{
252252
})
253253
})
254254

255-
it("does not reconcile images being deleted", func() {
256-
const observedGeneration int64 = 1
257-
imageWithBuilder.Status.ObservedGeneration = observedGeneration
258-
259-
imageWithBuilder.Generation = 2
260-
deletionTimetamp := metav1.NewTime(time.Now())
261-
imageWithBuilder.DeletionTimestamp = &deletionTimetamp
262-
263-
rt.Test(rtesting.TableRow{
264-
Key: key,
265-
Objects: []runtime.Object{
266-
imageWithBuilder,
267-
builder,
268-
clusterBuilder,
269-
unresolvedSourceResolver(imageWithBuilder),
270-
},
271-
WantErr: false,
272-
WantStatusUpdates: []clientgotesting.UpdateActionImpl{},
273-
})
274-
})
275-
276255
it("does not update status if there is no status update", func() {
277256
rt.Test(rtesting.TableRow{
278257
Key: key,

0 commit comments

Comments
 (0)