-
Notifications
You must be signed in to change notification settings - Fork 207
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
Conversation
@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 Report
@@ 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
|
@imeoer |
@@ -29,6 +29,20 @@ use super::{ | |||
pub struct Merger {} | |||
|
|||
impl Merger { | |||
fn get_string_from_list( |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@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 |
@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 |
src/bin/nydus-image/main.rs
Outdated
@@ -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") |
There was a problem hiding this comment.
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
. :)
There was a problem hiding this comment.
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 <[email protected]>
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Types of changes
What types of changes does your PullRequest introduce? Put an
x
in all the boxes that apply:Checklist
Go over all the following points, and put an
x
in all the boxes that apply.