-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add memory policy support #4726
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
base: main
Are you sure you want to change the base?
Conversation
66df434
to
cde25df
Compare
@AkihiroSuda, @giuseppe, do you think it would be good to keep this PR as Draft until opencontainers/runtime-spec#1282 is merged? Or should I make it Ready for review (despite the "replace" in go.mod) in order to get reviews and possibly get this tagged into v1.3? |
Please keep this draft until the runtime spec PR gets merged |
26ab8a1
to
3bb9611
Compare
22c31a6
to
e5dca5d
Compare
@AkihiroSuda, as the memory policy field is now in place in the runtime-spec (opencontainers/runtime-spec#1282 merged), I updated this PR to use the latest runtime-spec and removed the Draft status. Rebased and fixed lint issues. Good for review now. :) |
Careful with the milestones. According to the new release policy, features should by merged by rc1, which is due by the end of the month. |
716a693
to
1b32673
Compare
@kolyshkin, sorry to bother you folks with this, but I'd have a question on staticcheck lint in the CI. It runs twice, but with different set of checks. That causes an issue: one cannot disable staticcheck for a line in the case that the line passes one check but not the other. Disabling a check that does not cause an error is itself an error, which makes sense. In order to workaround this issue, I added commit 1b32673 in this PR, so that we can see all checks pass. But I don't know what is the best way forward. Should I remove the commit before this PR gets merged? |
Yes, please remove this commit. The CI is fully passing in #4900. |
1b32673
to
0ef29ce
Compare
Removed. |
@askervin somewhat related to this PR; can you please review https://go-review.googlesource.com/c/sys/+/706917/2? |
Could you please help fix the lint errors?
|
@lifubang, I fixed these errors with this commit: 1b32673 The root cause is that CI runs the staticcheck lint twice, first without and then with ST1003. The first run checks all the code, the latter check only changed parts. If I disable this in code (nolint), I'll get an error from the first run: you're disabling a check without a reason. If I don't disable it, I'll get the errors quoted above. Options that I see are:
Of course there may be more options that I just fail to see. What would you suggest? |
In fact, we always use |
ff85119
to
188a282
Compare
Implement support for Linux memory policy in OCI spec PR: opencontainers/runtime-spec#1282 Signed-off-by: Antti Kervinen <[email protected]>
188a282
to
a00a175
Compare
@lifubang, A side note: ALL_CAPS C header constants in the runc code base do exist, like in libcontainer/configs/{mount.go,namespaces_linux.go}. And if we'd like to enable ST1003 in the first pass, we would also need to fix ALL_CAPS internal constants in utils_linux.go:
However, fixing (or nolinting) ALL_CAPS cases would not suffice, as ST1003 wants few other naming changes, too. Like "id"s capitalized (like ttyUid -> ttyUID), but that's another story. |
Implement support for Linux memory policy in OCI spec PR: opencontainers/runtime-spec#1282