-
Notifications
You must be signed in to change notification settings - Fork 351
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
Support feature subcommand #2395
Support feature subcommand #2395
Conversation
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.
May I ask you to add the unit tests?
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.
Hey, so I have added some comments. feel free to ask any questions.
As for actually populating the data into the structures, we can take a look at how runc is doing it.
@DarrellTang let me know if any issues! |
Sorry for the delay, had some life events pop up. I've made some changes but I still can't get it to compile. This is the first error:
Not sure what to do with that error? Any suggestions? |
Hey @DarrellTang as I have mentioned in the comment here, the structure you are using is for commandline arg parsing. It should not be used to store the data. You should keep that structure as-is and create a separate one to store/move around the features data. |
f9bd988
to
646c103
Compare
@YJDoc2 Not sure how I closed this PR but I made some more progress. Sorry about the confusion, it finally clicked what you meant by not using that struct and creating a new one. Some questions now:
|
Hey @DarrellTang Apologies for the delay. This looks like a step in right direction. One change I'd strongly suggest is to define constants at the top and define structures before they are used rather than after. Also there seems to be some lint warnings, so you can try running Now that you have got the structure ready, we can try to set the values dynamically instead of having them hard-coded. For example, you can use the Let me know if you have any issues 👍 |
df480bf
to
5e74538
Compare
@DarrellTang May I ask you to check the CI? |
@utam0k I see there are CI runs that require a maintainer to approve but not sure what to do with those? Is there something I should be doing for these? Sorry if these are silly questions. Still learning my way around. |
b152a67
to
44fcf79
Compare
@DarrellTang |
@DarrellTang Hello! Are you still working on this? It is fine if you got busy with something else, just let us know so we can close this / re-assign to someone else accordingly. Thanks :) |
Yes, I'm still planning on working on this. I have to redo my dev setup and got busy but would like to stay assigned unless there's urgency to get it done! Thank you! |
Hey @DarrellTang no problem. I'll keep this as it is, and feel free to ask questions or help if needed 👍 |
070a86a
to
c2d8d53
Compare
@utam0k Just figured out the sign off. sorry about the delay. @YJDoc2 I managed to get capabilities and namespaces pulling dynamically but i'm stuck on what other sections i can do that for. any suggestions for some easy, low hanging fruit? I looked at cgroups, mount_options, and hooks and couldn't figure out where to pull those from the operating system |
@DarrellTang It seems that it is still missing
|
A rebase is also needed here. |
Hey @DarrellTang , apologies for the delay in response. I think you can take a look at runc's implementation . They also seem to have hardcoded several values such as mount options, we should just validate which of them are applicable for youki. |
f03c7ee
to
fc12184
Compare
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
@DarrellTang Hi 👋 May I ask you to check the lint errors? You can check them using |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2395 +/- ##
==========================================
- Coverage 65.50% 64.78% -0.72%
==========================================
Files 133 133
Lines 16916 17105 +189
==========================================
+ Hits 11081 11082 +1
- Misses 5835 6023 +188 |
); | ||
annotations_map.insert( | ||
ANNOTATION_RUNC_COMMIT.to_string(), | ||
String::from("v1.1.9-0-gccaecfc"), |
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.
This is specific to runc.
youki is not intended to use this annotation.
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 there be a similar annotation for youki, i.e. ANNOTATION_YOUKI_COMMIT
?
let mut annotations_map = HashMap::new(); | ||
annotations_map.insert( | ||
ANNOTATION_LIBSECCOMP_VERSION.to_string(), | ||
String::from("2.5.3"), |
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.
This should be fetched from libseccomp (if youki uses libseccomp)
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.
it definitely does. what's the best way for me to grab this version number? I apologize, I'm pretty new to rust.
|
||
let features = HardFeatures { | ||
oci_version_min: Some(String::from("1.0.0")), | ||
oci_version_max: Some(String::from("1.0.2-dev")), |
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.
Why not 1.1.0 ?
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.
I hardcoded it when i started so I assume it's progressed since then. I don't have any objection to using 1.1.0 but it seems like runc pulls this from the https://github.com/opencontainers/runtime-spec/blob/main/specs-go/version.go . Should I just hardcode for 1.2.0 (which is the latest) or is there a rust runtime-spec equivalent?
Thank you for reviewing this!
@DarrellTang Do you have any trouble? I can help you ;) |
Thank you. I know it has taken a long time on this. It seems like my commits are signed now. I also just removed an extra blank line that was causing the linting to fail. I am still puzzling over what else I can pull programatically. Not sure of a direction so if you have suggestions for what I should look at next, I'd be very happy to take your guidance! 🙏 |
Signed-off-by: Darrell Tang <darrelltang@gmail.com>
Hey, so what you can do is to check what things are we hardcoding here, and runc is fetching dynamically, and try to do the same. There are some things which even runc hard-codes, so maybe we can deal with them separately. |
@DarrellTang Friendly reminder 🙏 👀 |
@musaprg Are you interested in taking over this PR? |
I'm sorry for the delay, please feel free to reassign this. My schedule has changed and I haven't had time to continue working on this. |
@utam0k Hi! I'd love to take over the PR, but I need some time to catch things up. I'll submit another PR with cherry-picking the existing commits after that. |
Dup #2837 |
No description provided.