Skip to content

Conversation

@chlins
Copy link
Member

@chlins chlins commented Dec 3, 2024

This pull request introduces several changes to enhance the functionality of the pull and push operations, as well as refactoring some parts of the codebase. The most significant changes include adding support for specifying an output path for exporting model artifacts, renaming and refactoring the tar.go file, and updating the progress bar style.

Enhancements to pull and push operations:

  • cmd/pull.go: Added a new flag --output to specify the output path for exporting the model artifact and updated the runPull function to handle this new configuration. [1] [2]
  • pkg/backend/options.go: Introduced a new option WithOutputPath to set the output path for the pull operation. [1] [2]
  • pkg/backend/pull.go: Implemented the logic to export the target model artifact to the specified output directory if the outputPath option is set. [1] [2]
  • pkg/backend/push.go: Refined the pushIfNotExist function to fetch the manifest from the source storage and push it to the destination, ensuring the content is correctly handled. [1] [2]

Refactoring and codebase improvements:

  • pkg/archiver/archiver.go: Renamed from pkg/backend/build/tar.go and refactored the TarFileToStream function to Tar. Added a new Untar function to handle untarring streams to a destination path. [1] [2]
  • pkg/backend/build/build.go: Updated the import paths and changed the call from TarFileToStream to archiver.Tar. [1] [2]

Progress bar style update:

@chlins chlins force-pushed the feat/export-image branch from a7b829b to bd2de8b Compare December 3, 2024 08:16
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add option --extract-dir, and add sub-commaned modctl extract.

Signed-off-by: chlins <chlins.zhang@gmail.com>
@chlins chlins force-pushed the feat/export-image branch from bd2de8b to 3a4f778 Compare December 4, 2024 10:38
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi merged commit 2026bea into main Dec 4, 2024
5 checks passed
@gaius-qi gaius-qi deleted the feat/export-image branch December 4, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants