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

nydusify: introduce chunkdict generate subcommand #1341

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

newthifans
Copy link
Contributor

Notice

Please take a look and give me some code suggestions in the commit, thanks!

Brief introduction

Add the function of storing multiple nydus images into the database for generating chunkdict
Implement the command “nydusify chunkdict generate --sources”
by invoking the command “nydus-image chunkdict save --bootstrap” .

Basic usage

nydusify chunkdict generate --sources localhost:5000/ubuntu:nydus_latest,localhost:5000/ubuntu:nydus_latest_v1

Details

  1. Write command “nydusify chunkdict generate” entries
  2. Create a “chunkdict/generator” folder to implement the function
  3. Store the image in the registry with slices and Store them in the database in turn
  4. Parse nydus image and create a directory to hold corresponding bootstrap
  5. Pull nydus image bootstrap and store corresponding directory
  6. Invoke the command “nydus-image chunkdict save --bootstrap”

This PR is related to #1305

@newthifans newthifans requested a review from a team as a code owner July 2, 2023 08:33
@newthifans newthifans requested review from liubogithub, imeoer and hsiangkao and removed request for a team July 2, 2023 08:33
@anolis-bot
Copy link
Collaborator

@newthifans , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/82102

@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #1341 (a1759b7) into master (662117a) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head a1759b7 differs from pull request most recent head 54364ac. Consider uploading reports for the commit 54364ac to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1341      +/-   ##
==========================================
- Coverage   45.71%   45.70%   -0.02%     
==========================================
  Files         123      123              
  Lines       37287    37287              
  Branches    37287    37287              
==========================================
- Hits        17047    17041       -6     
- Misses      19347    19348       +1     
- Partials      893      898       +5     

see 3 files with indirect coverage changes

@anolis-bot
Copy link
Collaborator

@newthifans , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@newthifans , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/82344

@anolis-bot
Copy link
Collaborator

@newthifans , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

contrib/nydusify/pkg/build/builder.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/build/builder.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/chunkdict/generator/generator.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/chunkdict/generator/generator.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/chunkdict/generator/generator.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/chunkdict/generator/generator.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/chunkdict/generator/generator.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/chunkdict/generator/output.go Outdated Show resolved Hide resolved
Add the 'nydus-image chunkdict save' command
with the "--sources" followed by the nydus image of registry
(e.g.,'registry.com/busybox:nydus-v1,registry.com/busybox:nydus-v2')

Signed-off-by: Zhao Yuan <[email protected]>
@anolis-bot
Copy link
Collaborator

@newthifans , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/84027

@anolis-bot
Copy link
Collaborator

@newthifans , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@imeoer imeoer merged commit 8b59e19 into dragonflyoss:master Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants