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

add --original-blob-ids args for merge #1408

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

zyfjeff
Copy link
Contributor

@zyfjeff zyfjeff commented Aug 28, 2023

the default merge command is to get the name of the original blob from the bootstrap name, and add a cli args for it

Relevant Issue (if applicable)

If there are Issues related to this PullRequest, please list it.

Details

the default merge command is to get the name of the original
blob from the bootstrap name, and add a cli args for it

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@zyfjeff zyfjeff requested a review from a team as a code owner August 28, 2023 08:21
@zyfjeff zyfjeff requested review from imeoer, changweige and adamqqqplay and removed request for a team August 28, 2023 08:21
@anolis-bot
Copy link
Collaborator

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

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #1408 (005dd75) into master (1abf0ae) will decrease coverage by 0.02%.
Report is 2 commits behind head on master.
The diff coverage is 15.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1408      +/-   ##
==========================================
- Coverage   46.45%   46.43%   -0.02%     
==========================================
  Files         123      123              
  Lines       38602    38644      +42     
  Branches    38602    38644      +42     
==========================================
+ Hits        17931    17944      +13     
- Misses      19702    19726      +24     
- Partials      969      974       +5     
Files Changed Coverage Δ
builder/src/merge.rs 0.00% <0.00%> (ø)
src/bin/nydus-image/main.rs 41.62% <46.15%> (+0.63%) ⬆️

... and 3 files with indirect coverage changes

@zyfjeff
Copy link
Contributor Author

zyfjeff commented Aug 28, 2023

@imeoer
The coverage rate of the target file is too low, not caused by my pr. It is unlikely that I will increase from 15% to 25% in a short time

@@ -29,6 +29,20 @@ use super::{
pub struct Merger {}

impl Merger {
fn get_string_from_list(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we reuse get_digest_from_list ? If we call it original_digests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original blob ID is obtained from the bootstrap name and does not require it to be a digest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, so maybe we can name the option original-blob-ids ? And the option help message should be original blob id list separated by comma, it may usually be a sha256 hex string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@zyfjeff zyfjeff changed the title add --original-blob-digest args for merge add --original-blob-ids args for merge Aug 29, 2023
@anolis-bot
Copy link
Collaborator

@zyfjeff , the title 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/90713

@anolis-bot
Copy link
Collaborator

@zyfjeff , 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/90714

@@ -1194,6 +1200,13 @@ impl Command {
.map(|item| item.trim().to_string())
.collect()
});
let original_blob_digest: Option<Vec<String>> = matches
.get_one::<String>("original-blob-digest")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be original-blob-ids. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

the default merge command is to get the name of the original
blob from the bootstrap name, and add a cli args for it

Signed-off-by: zyfjeff <zyfjeff@linux.alibaba.com>
@anolis-bot
Copy link
Collaborator

@zyfjeff , 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/90742

Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer imeoer merged commit d54c43f into dragonflyoss:master Aug 29, 2023
23 of 24 checks passed
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.

None yet

3 participants