Skip to content

Commit

Permalink
Use %#v for more detailed infomation
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Dec 27, 2023
1 parent f74c3a7 commit eb77e59
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/index/job/readreplica/rotate/service/rotator.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (r *rotator) createSnapshot(ctx context.Context) (newSnap, oldSnap *client.
}

log.Infof("creating new snapshot(%s)...", newSnap.GetName())
log.Debugf("snapshot detail: %+v", newSnap)
log.Debugf("snapshot detail: %#v", newSnap)

Check warning on line 177 in pkg/index/job/readreplica/rotate/service/rotator.go

View check run for this annotation

Codecov / codecov/patch

pkg/index/job/readreplica/rotate/service/rotator.go#L175-L177

Added lines #L175 - L177 were not covered by tests
err = r.client.Create(ctx, newSnap)
if err != nil {
Expand Down Expand Up @@ -218,7 +218,7 @@ func (r *rotator) createPVC(ctx context.Context, newSnapShot string) (newPvc, ol
}

log.Infof("creating new pvc(%s)...", newPvc.GetName())
log.Debugf("pvc detail: %+v", newPvc)
log.Debugf("pvc detail: %#v", newPvc)

Check warning on line 222 in pkg/index/job/readreplica/rotate/service/rotator.go

View check run for this annotation

Codecov / codecov/patch

pkg/index/job/readreplica/rotate/service/rotator.go#L220-L222

Added lines #L220 - L222 were not covered by tests
if err := r.client.Create(ctx, newPvc); err != nil {
return nil, nil, fmt.Errorf("failed to create PVC(%s): %w", newPvc.GetName(), err)
Expand Down Expand Up @@ -249,7 +249,7 @@ func (r *rotator) updateDeployment(ctx context.Context, newPVC string) error {
}

log.Infof("updating deployment(%s)...", deployment.GetName())
log.Debugf("deployment detail: %+v", deployment)
log.Debugf("deployment detail: %#v", deployment)

Check warning on line 253 in pkg/index/job/readreplica/rotate/service/rotator.go

View check run for this annotation

Codecov / codecov/patch

pkg/index/job/readreplica/rotate/service/rotator.go#L251-L253

Added lines #L251 - L253 were not covered by tests
if err := r.client.Update(ctx, &deployment); err != nil {
return fmt.Errorf("failed to update deployment: %w", err)
Expand All @@ -273,7 +273,7 @@ func (r *rotator) deleteSnapshot(ctx context.Context, snapshot *snapshotv1.Volum
eg, egctx := errgroup.New(ctx)
eg.Go(func() error {
log.Infof("deleting volume snapshot(%s)...", snapshot.GetName())
log.Debugf("volume snapshot detail: %+v", snapshot)
log.Debugf("volume snapshot detail: %#v", snapshot)

Check warning on line 276 in pkg/index/job/readreplica/rotate/service/rotator.go

View check run for this annotation

Codecov / codecov/patch

pkg/index/job/readreplica/rotate/service/rotator.go#L275-L276

Added lines #L275 - L276 were not covered by tests
for {
select {
case <-egctx.Done():
Expand Down Expand Up @@ -310,7 +310,7 @@ func (r *rotator) deletePVC(ctx context.Context, pvc *v1.PersistentVolumeClaim)
eg, egctx := errgroup.New(ctx)
eg.Go(func() error {
log.Infof("deleting PVC(%s)...", pvc.GetName())
log.Debugf("PVC detail: %+v", pvc)
log.Debugf("PVC detail: %#v", pvc)

Check warning on line 313 in pkg/index/job/readreplica/rotate/service/rotator.go

View check run for this annotation

Codecov / codecov/patch

pkg/index/job/readreplica/rotate/service/rotator.go#L313

Added line #L313 was not covered by tests
for {
select {
case <-egctx.Done():
Expand Down

0 comments on commit eb77e59

Please sign in to comment.