Skip to content

Commit

Permalink
get rid of references to totalSize after progress bar has been created
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Sep 5, 2024
1 parent 77d4012 commit 704ff0e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/internal/packager/images/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ func Push(ctx context.Context, cfg PushConfig) error {
refTruncated := helpers.Truncate(refInfo.Reference, 55, true)
progress.Updatef(fmt.Sprintf("Pushing %s", refTruncated))

size, err := calcImgSize(img)
if err != nil {
return err
}

// If this is not a no checksum image push it for use with the Zarf agent
if !cfg.NoChecksum {
offlineNameCRC, err := transform.ImageTransformHost(registryURL, refInfo.Reference)
Expand All @@ -102,8 +97,6 @@ func Push(ctx context.Context, cfg PushConfig) error {
if err = pushImage(img, offlineNameCRC); err != nil {
return err
}

totalSize -= size
}

// To allow for other non-zarf workloads to easily see the images upload a non-checksum version
Expand All @@ -120,7 +113,6 @@ func Push(ctx context.Context, cfg PushConfig) error {
}

pushed = append(pushed, refInfo)
totalSize -= size
}
return nil
}, retry.Context(ctx), retry.Attempts(uint(cfg.Retries)), retry.Delay(500*time.Millisecond))
Expand Down

0 comments on commit 704ff0e

Please sign in to comment.