Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat.] Support uploading 'output' to registry while merging layers #349

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

BigVan
Copy link
Member

@BigVan BigVan commented Sep 3, 2024

What this PR does / why we need it:
[fix.] enable zfile compress in overlaybd-merge
[feat.] support uploading 'output' to the remote registry while merging layers

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #348

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

@BigVan
Copy link
Member Author

BigVan commented Sep 3, 2024

@WaberZhuang please take a review

@@ -91,3 +92,21 @@ photon::fs::IFileSystem *create_erofs_fs(photon::fs::IFile *imgfile, uint64_t bl
{
return erofs_create_fs(imgfile, blksz);
}
IFile *create_uploader(ZFile::CompressArgs *zfile_args, IFile *src,
const string &upload_url, const string &cred_file_path, uint64_t timeout, uint64_t upload_bs_KB){
Copy link
Contributor

Choose a reason for hiding this comment

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

use 'timeout_minute' instead of 'timeout' here, for consistency with the interface argument list

@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
app.add_option("--compress_threads", compress_threads, "compress threads")->default_val(1);
app.add_flag("--verbose", verbose, "output debug info")->default_val(false);
app.add_option("--upload", upload_url, "registry upload url");
app.add_option("--upload_bs", upload_bs, "block size for upload, in KB");
app.add_option("--upload_bs", upload_bs, "block size for upload, in KB")->default_val(65536); // 64MB
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: remove the initial value when declaring

// ssize_t upload_bs = 262144;
ssize_t upload_bs = 0;

Copy link
Member

@liulanzheng liulanzheng left a comment

Choose a reason for hiding this comment

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

LGMT~ nb

@liulanzheng liulanzheng merged commit 0911a9b into containerd:main Sep 9, 2024
2 checks passed
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.

ZFile compress not work in overlaybd-merge
3 participants