Skip to content

Commit 52dd43d

Browse files
committed
Fix linter issues
1 parent 31b605f commit 52dd43d

File tree

1 file changed

+5
-5
lines changed
  • pkg/controllers/resources/persistentvolumeclaims

1 file changed

+5
-5
lines changed

pkg/controllers/resources/persistentvolumeclaims/syncer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package persistentvolumeclaims
22

33
import (
44
"fmt"
5-
"github.com/loft-sh/vcluster/pkg/snapshot"
6-
snapshotMeta "github.com/loft-sh/vcluster/pkg/snapshot/meta"
75
"time"
86

97
storagev1 "k8s.io/api/storage/v1"
@@ -22,6 +20,8 @@ import (
2220
syncertypes "github.com/loft-sh/vcluster/pkg/syncer/types"
2321
"github.com/loft-sh/vcluster/pkg/util/translate"
2422

23+
"github.com/loft-sh/vcluster/pkg/snapshot"
24+
snapshotMeta "github.com/loft-sh/vcluster/pkg/snapshot/meta"
2525
corev1 "k8s.io/api/core/v1"
2626
kerrors "k8s.io/apimachinery/pkg/api/errors"
2727
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -108,7 +108,7 @@ func (s *persistentVolumeClaimSyncer) SyncToHost(ctx *synccontext.SyncContext, e
108108
// check if host PVC is currently being restored
109109
restoreInProgress, err := s.isHostVolumeRestoreInProgress(ctx, pObj)
110110
if err != nil {
111-
return ctrl.Result{}, fmt.Errorf("failed to check if host volume restore is in progress: %v", err)
111+
return ctrl.Result{}, fmt.Errorf("failed to check if host volume restore is in progress: %w", err)
112112
}
113113
if restoreInProgress {
114114
return ctrl.Result{
@@ -132,7 +132,7 @@ func (s *persistentVolumeClaimSyncer) Sync(ctx *synccontext.SyncContext, event *
132132
// check if host PVC is currently being restored
133133
restoreInProgress, err := s.isHostVolumeRestoreInProgress(ctx, event.Host)
134134
if err != nil {
135-
return ctrl.Result{}, fmt.Errorf("failed to check if host volume restore is in progress: %v", err)
135+
return ctrl.Result{}, fmt.Errorf("failed to check if host volume restore is in progress: %w", err)
136136
}
137137
if restoreInProgress {
138138
return ctrl.Result{
@@ -276,7 +276,7 @@ func (s *persistentVolumeClaimSyncer) isHostVolumeRestoreInProgress(ctx *synccon
276276
for _, configMap := range configMaps.Items {
277277
restoreRequest, err := snapshot.UnmarshalRestoreRequest(&configMap)
278278
if err != nil {
279-
return false, fmt.Errorf("unmarshal restore request: %v", err)
279+
return false, fmt.Errorf("unmarshal restore request: %w", err)
280280
}
281281
restore, ok := restoreRequest.Spec.VolumeSnapshots.Status.Snapshots[pvcName]
282282
if !ok {

0 commit comments

Comments
 (0)