Skip to content

Conversation

@kolyshkin
Copy link
Contributor

This is a followup to #4638, fixing a few minor issues I found just now.

See individual commits for details.

@kolyshkin kolyshkin marked this pull request as draft June 19, 2025 00:59
@kolyshkin
Copy link
Contributor Author

kolyshkin commented Jun 19, 2025

Seeing a weird golangci-lint warning:

Error: libcontainer/criu_linux.go:186:61: directive `//nolint:staticcheck // SA1019: strings.Title is deprecated` is unused for linter "staticcheck" (nolintlint)
	return "extRoot" + strings.Title(configs.NsName(t)) + "NS" //nolint:staticcheck // SA1019: strings.Title is deprecated
	                                                           ^

which I am not seeing locally or in any other PRs.

@kolyshkin kolyshkin reopened this Jun 19, 2025
@kolyshkin kolyshkin closed this Jun 19, 2025
The per-file deprecation in cgroup_deprecated.go is not working,
let's replace it.

Link to Hooks.Run in Hook.Run deprecation notice.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin reopened this Jun 19, 2025
@kolyshkin
Copy link
Contributor Author

Seeing a weird golangci-lint warning:

Error: libcontainer/criu_linux.go:186:61: directive `//nolint:staticcheck // SA1019: strings.Title is deprecated` is unused for linter "staticcheck" (nolintlint)
	return "extRoot" + strings.Title(configs.NsName(t)) + "NS" //nolint:staticcheck // SA1019: strings.Title is deprecated
	                                                           ^

which I am not seeing locally or in any other PRs.

It went away once I've forcefully removed golangci-lint-action cache from GHA CI. This is very wrong.

@kolyshkin kolyshkin marked this pull request as ready for review June 19, 2025 01:31
Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

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

LGTM, just one question that is trivial to address

// Cgroups specifies specific cgroup settings for the various subsystems that the container is
// placed into to limit the resources the container has available.
Cgroups *Cgroup `json:"cgroups"`
Cgroups *cgroups.Cgroup `json:"cgroups"`
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to keep the Cgroup type on this package, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to keep the Cgroup type on this package, then?

I think we do. There are libcontainer users who might need time to switch to opencontainers/cgroups properly.

Now, Cgroup is (now) clearly marked as deprecated, hinting that they should switch, and by not removing it we're giving users time to do so.

@kolyshkin kolyshkin added the backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 label Jun 19, 2025
@kolyshkin kolyshkin merged commit 71bd84f into opencontainers:main Jun 19, 2025
59 checks passed
@kolyshkin
Copy link
Contributor Author

1.3 backport: #4788

@kolyshkin kolyshkin added backport/1.3-done A PR in main branch which has been backported to release-1.3 and removed backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 labels Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.3-done A PR in main branch which has been backported to release-1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants