-
Notifications
You must be signed in to change notification settings - Fork 346
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
Upgrade oci-spec-rs to 0.4.0 #266
Conversation
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
1. Fix capability type (Capability type change: Vec -> HashSet) 2. Implement functions equivalent to LinuxDeviceType::to_sflag in youki. 3. Fix crate path: use oci_spec::XXX -> use oci_spec::runtime::XXX Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #266 +/- ##
==========================================
- Coverage 69.62% 68.93% -0.69%
==========================================
Files 46 46
Lines 5660 5837 +177
==========================================
+ Hits 3941 4024 +83
- Misses 1719 1813 +94 |
@guni1192 Hi not sure if merge conflicts are becoming a lot of work with all the other PR going in. If you have a good idea on when you can get the PR ready, may be we can stop merging other PR for a day or two to get this PR merged. This is an important PR and we probably want this to go in as soon as possible. Let us know how we can help you and/or ping us on Discord. |
@yihuaf Thank you very much for your kindness.
|
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
@guni1192 What is the error? When I run the test with your changes it is passing. |
@Furisto Thanks for trying it out.
|
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
I have a feeling that this is probably an effect of this. |
@utam0k Yes, that was also my suspicion. |
@Furisto
|
@guni1192 @Furisto I got the 0.4.0 oci-spec-rs locally and applied the same fix as this PR and it passed the integration test, so this is probably the cause of the problem. |
@guni1192 I'm going to ask them to release a fixed version, 0.5.1. However, it may be difficult to address this issue without upgrading the version to 0.5.1. Sorry... |
@utam0k I understand. I'll try as much as I can. |
@guni1192 The change to the builder pattern would not have been that exciting. Very helpful! |
Not sure if this is helpful, but maybe we can bump commit up instead of version, if the changes are too big to handle in one PR? Then there may be smaller bits to bite off? Just a suggestion :) |
@utam0k I thought it was a good idea too. |
@guni1192 I prepared v0.4.0 with a bug fix. And I have tried using it and did integration test. I applied it and pass all tests. diff --git a/src/rootfs.rs b/src/rootfs.rs
index f5884d8..0b63456 100644
--- a/src/rootfs.rs
+++ b/src/rootfs.rs
@@ -224,6 +224,7 @@ fn bind_dev(rootfs: &Path, dev: &LinuxDevice) -> Result<()> {
fn to_sflag(dev_type: LinuxDeviceType) -> SFlag {
match dev_type {
+ LinuxDeviceType::A => SFlag::S_IFBLK | SFlag::S_IFCHR | SFlag::S_IFIFO,
LinuxDeviceType::B => SFlag::S_IFBLK,
LinuxDeviceType::C | LinuxDeviceType::U => SFlag::S_IFCHR,
LinuxDeviceType::P => SFlag::S_IFIFO, |
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
abed335
to
ecf3370
Compare
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
@utam0k |
Cargo.toml
Outdated
@@ -38,9 +38,10 @@ fastrand = "1.4.1" | |||
crossbeam-channel = "0.5" | |||
|
|||
[dev-dependencies] | |||
oci_spec = { git = "https://github.com/containers/oci-spec-rs", rev = "e0de21b89dc1e65f69a5f45a08bbe426787c7fa1", features = ["proptests"]} | |||
# oci-spec = { version = "0.4.0", features = ["proptests"] } |
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.
Is there any reason to keep this line?
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.
Sorry ... I forgot to delete that line.
Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
All right. I think so too. |
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
fix: #225
Common
use oci_spec::XXX
->use oci_spec::runtime::XXX
Upgrade oci-spec-rs in
cgroups
cgroups
crateController::apply()
receiveContainerOpt
instead ofLinuxResources
RemoveA
fromLinuxDeviceType
Upgrade oci-spec-rs in
youki
LinuxDeviceType::to_sflag
in youki.Upgrade oci-spec-rs tov0.5.1
src/container/tenant_builder.rs
rewrite