@@ -21,7 +21,6 @@ import (
21
21
"github.com/zarf-dev/zarf/src/api/v1alpha1"
22
22
"github.com/zarf-dev/zarf/src/pkg/interactive"
23
23
"github.com/zarf-dev/zarf/src/pkg/logger"
24
- "github.com/zarf-dev/zarf/src/pkg/message"
25
24
"github.com/zarf-dev/zarf/src/pkg/packager/deprecated"
26
25
"github.com/zarf-dev/zarf/src/pkg/utils"
27
26
)
@@ -230,26 +229,19 @@ func (pp *PackagePaths) GenerateChecksums() (string, error) {
230
229
// ArchivePackage creates an archive for a Zarf package.
231
230
func (pp * PackagePaths ) ArchivePackage (ctx context.Context , destinationTarball string , maxPackageSizeMB int ) error {
232
231
l := logger .From (ctx )
233
- // TODO(mkcp): Remove message on logger release
234
- spinner := message .NewProgressSpinner ("Writing %s to %s" , pp .Base , destinationTarball )
235
- defer spinner .Stop ()
236
232
l .Info ("archiving zarf package" , "base" , pp .Base , "destination" , destinationTarball )
237
233
238
234
// Make the archive
239
235
archiveSrc := []string {pp .Base + string (os .PathSeparator )}
240
236
if err := archiver .Archive (archiveSrc , destinationTarball ); err != nil {
241
237
return fmt .Errorf ("unable to create package: %w" , err )
242
238
}
243
- // TODO(mkcp): Remove message on logger release
244
- spinner .Updatef ("Wrote %s to %s" , pp .Base , destinationTarball )
245
239
l .Debug ("ArchivePackage wrote" , "base" , pp .Base , "destination" , destinationTarball )
246
240
247
241
fi , err := os .Stat (destinationTarball )
248
242
if err != nil {
249
243
return fmt .Errorf ("unable to read the package archive: %w" , err )
250
244
}
251
- // TODO(mkcp): Remove message on logger release
252
- spinner .Successf ("Package saved to %q" , destinationTarball )
253
245
l .Debug ("package saved" , "destination" , destinationTarball )
254
246
255
247
// Convert Megabytes to bytes.
@@ -260,7 +252,6 @@ func (pp *PackagePaths) ArchivePackage(ctx context.Context, destinationTarball s
260
252
if fi .Size ()/ int64 (chunkSize ) > 999 {
261
253
return fmt .Errorf ("unable to split the package archive into multiple files: must be less than 1,000 files" )
262
254
}
263
- message .Notef ("Package is larger than %dMB, splitting into multiple files" , maxPackageSizeMB )
264
255
l .Info ("package is larger than max, splitting into multiple files" , "maxPackageSize" , maxPackageSizeMB )
265
256
err := splitFile (ctx , destinationTarball , chunkSize )
266
257
if err != nil {
@@ -342,7 +333,8 @@ func (pp *PackagePaths) Files() map[string]string {
342
333
stripBase := func (path string ) string {
343
334
rel , err := filepath .Rel (pp .Base , path )
344
335
if err != nil {
345
- message .Debug ("unable to strip base from path" , "error" , err )
336
+ // HACK(mkcp): Source this logger from ctx chain instead or this logging behavior gets weird in testing.
337
+ logger .Default ().Debug ("unable to strip base from path" , "error" , err )
346
338
}
347
339
// Convert from the OS path separator to the standard '/' for Windows support
348
340
return filepath .ToSlash (rel )
0 commit comments