Skip to content

Commit

Permalink
fix(vi): nil recorder (#612)
Browse files Browse the repository at this point in the history
* fix(vi): nil recorder

Signed-off-by: Daniil Antoshin <[email protected]>
  • Loading branch information
danilrwx authored Dec 26, 2024
1 parent a60cbf3 commit 0c9af05
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,7 @@ func (ds HTTPDataSource) Sync(ctx context.Context, vd *virtv2.VirtualDisk) (reco

return reconcile.Result{Requeue: true}, nil
case !podutil.IsPodComplete(pod):
ds.recorder.Eventf(
vd,
corev1.EventTypeNormal,
v1alpha2.ReasonDataSourceSyncStarted,
"Provisioning to DVCR is in progress", "podPhase", pod.Status.Phase,
)
log.Info("Provisioning to DVCR is in progress", "podPhase", pod.Status.Phase)

err = ds.statService.CheckPod(pod)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,7 @@ func (ds RegistryDataSource) Sync(ctx context.Context, vd *virtv2.VirtualDisk) (

return reconcile.Result{Requeue: true}, nil
case !podutil.IsPodComplete(pod):
ds.recorder.Eventf(
vd,
corev1.EventTypeNormal,
v1alpha2.ReasonDataSourceSyncStarted,
"Provisioning to DVCR is in progress", "podPhase", pod.Status.Phase,
)
log.Info("Provisioning to DVCR is in progress", "podPhase", pod.Status.Phase)

err = ds.statService.CheckPod(pod)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func NewObjectRefDataSource(
client: client,
diskService: diskService,
storageClassService: storageClassService,
recorder: recorder,
viObjectRefOnPvc: NewObjectRefDataVirtualImageOnPVC(recorder, statService, importerService, dvcrSettings, client, diskService, storageClassService),
vdSyncer: NewObjectRefVirtualDisk(recorder, importerService, client, diskService, dvcrSettings, statService, storageClassService),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func NewObjectRefVirtualDisk(
return &ObjectRefVirtualDisk{
importerService: importerService,
client: client,
recorder: recorder,
diskService: diskService,
statService: statService,
dvcrSettings: dvcrSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func NewRegistryDataSource(
client: client,
diskService: diskService,
storageClassService: storageClassService,
recorder: recorder,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func NewUploadDataSource(
storageClassService *service.VirtualImageStorageClassService,
) *UploadDataSource {
return &UploadDataSource{
recorder: recorder,
statService: statService,
uploaderService: uploaderService,
dvcrSettings: dvcrSettings,
Expand Down

0 comments on commit 0c9af05

Please sign in to comment.