Skip to content

Deprecate uid_mappings/gid_mappings on top-level Spec#328

Open
nayuta723 wants to merge 1 commit intoyouki-dev:mainfrom
nayuta723:remove-top-level-uid-gid-mapping
Open

Deprecate uid_mappings/gid_mappings on top-level Spec#328
nayuta723 wants to merge 1 commit intoyouki-dev:mainfrom
nayuta723:remove-top-level-uid-gid-mapping

Conversation

@nayuta723
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind deprecation

What this PR does / why we need it:

Mark uid_mappings and gid_mappings on the top-level Spec
struct as deprecated since v0.10.0. These fields have never
existed in the OCI runtime spec's top-level Spec struct. Users
are guided to the correct locations:

  • Linux::uid_mappings / Linux::gid_mappings for user namespace mappings
  • Mount::uid_mappings / Mount::gid_mappings for per-mount ID-mapped mounts

Which issue(s) this PR fixes:

Fixes #325

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Deprecated `uid_mappings` and `gid_mappings` fields on the
top-level `Spec` struct. These fields were never part of the OCI
runtime spec. Use `Linux::uid_mappings`/`Linux::gid_mappings` or
`Mount::uid_mappings`/`Mount::gid_mappings` instead.

These fields have never existed in the OCI runtime spec's
top-level Spec struct. Mark them as deprecated since 0.10.0
so users are guided to the correct locations:
- Linux::uid_mappings / Linux::gid_mappings (user namespace mappings)
- Mount::uid_mappings / Mount::gid_mappings (per-mount ID-mapped mounts)

Add #[allow(deprecated)] to Default impl to suppress internal compiler warnings.

Closes youki-dev#325

Signed-off-by: nayuta723 <nayuta723@gmail.com>
@nayuta723 nayuta723 force-pushed the remove-top-level-uid-gid-mapping branch from 2599b1c to 20eeff1 Compare March 16, 2026 14:55
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.

Remove spurious uid_mappings/gid_mappings from top-level Spec struct

1 participant