Skip to content

Commit b895178

Browse files
Update pkg/controller/stormservice/stormservice_controller.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: TimWang <[email protected]>
1 parent d341782 commit b895178

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pkg/controller/stormservice/stormservice_controller.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,12 @@ func (r *StormServiceReconciler) getAndSortRevisions(ctx context.Context, stormS
178178
return revisions, nil
179179
}
180180

181-
func (r *StormServiceReconciler) syncRevisions(ctx context.Context, stormService *orchestrationv1alpha1.StormService, revisions []*apps.ControllerRevision) (*apps.ControllerRevision, *apps.ControllerRevision, int64, error) {
182-
currentRevision, updateRevision, collisionCount, err := r.syncRevision(ctx, stormService, revisions)
183-
if err != nil {
184-
return nil, nil, 0, err
185-
}
186-
return currentRevision, updateRevision, int64(collisionCount), err
181+
func (r *StormServiceReconciler) syncRevisions(ctx context.Context, stormService *orchestrationv1alpha1.StormService, revisions []*apps.ControllerRevision) (*apps.ControllerRevision, *apps.ControllerRevision, int32, error) {
182+
return r.syncRevision(ctx, stormService, revisions)
187183
}
188184

189-
func (r *StormServiceReconciler) performSync(ctx context.Context, stormService *orchestrationv1alpha1.StormService, currentRevision, updateRevision *apps.ControllerRevision, collisionCount int64) (time.Duration, error) {
190-
return r.sync(ctx, stormService, currentRevision, updateRevision, int32(collisionCount))
185+
func (r *StormServiceReconciler) performSync(ctx context.Context, stormService *orchestrationv1alpha1.StormService, currentRevision, updateRevision *apps.ControllerRevision, collisionCount int32) (time.Duration, error) {
186+
return r.sync(ctx, stormService, currentRevision, updateRevision, collisionCount)
191187
}
192188

193189
func (r *StormServiceReconciler) cleanupHistory(ctx context.Context, stormService *orchestrationv1alpha1.StormService, revisions []*apps.ControllerRevision, currentRevision, updateRevision *apps.ControllerRevision) error {

0 commit comments

Comments
 (0)