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

feat: resolve a name clash of the libcontainer features #246

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Aug 17, 2023

This commit resolves a name clash of the libcontainer feature from the containerd-shim-wasm, which undesirably forces all other features to bring in libseccomp and systemd dependencies. By renaming libcontainer to libcontainer_default, the consumer of the crate can specify cgroupsv2 to directly access libcontainer's v2 feature without bringing in libseccomp and systemd dependencies.

This will resolve this concerns @0xE282B0 raised deislabs/containerd-wasm-shims#122 (comment)

FYI @jsturtevant

Makefile Outdated
# compiling against libcontainer's default features (dependency on libseccomp)
cargo build -p containerd-shim-wasm --features libcontainer_default $(RELEASE_FLAG)
# compiling against libcontainer's cgroups v2 feature (no dependency on libseccomp)
cargo build -p containerd-shim-wasm --features cgroupsv2 $(RELEASE_FLAG)
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to build each Indvidual feature or can we use something like --all-features? I've seen that in other projects and I am not sure what the best thing to do here. Otherwise it seems like we need to do every combination that is exposed.

Copy link
Member Author

Choose a reason for hiding this comment

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

--all-features are just additively adding all the features, and that's good to build. But we also want to make sure each individual feature is buildable.

Unrelated: I am thinking about writing an integration tests to grep the output of cargo update on different features to make sure libseccomp is adding/deleting.

Copy link
Collaborator

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

LGTM!

@Mossaka Mossaka closed this Aug 17, 2023
@Mossaka Mossaka reopened this Aug 17, 2023
@jsturtevant
Copy link
Contributor

Is the space failure due to extra build caches for each configuration taking up space?

@Mossaka Mossaka merged commit 817a5da into containerd:main Aug 17, 2023
7 checks passed
@Mossaka Mossaka deleted the feature-name-clash branch August 17, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants