-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libcontainer/intelrdt: modify the incorrect file mode #2625
libcontainer/intelrdt: modify the incorrect file mode #2625
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.
LGTM
did the linter catch this? (if not, we may have to update the configuration, as I think it should be able to catch this)
Yes, it's a linter error, I've been meaning to fix this but didn't have time yet |
@@ -54,7 +54,7 @@ func mockResctrlL3_MON(NUMANodes []string, mocks map[string]uint64) (string, err | |||
} | |||
|
|||
for fileName, value := range mocks { | |||
err := ioutil.WriteFile(filepath.Join(numaPath, fileName), []byte(strconv.FormatUint(value, 10)), 777) | |||
err := ioutil.WriteFile(filepath.Join(numaPath, fileName), []byte(strconv.FormatUint(value, 10)), 0777) |
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.
Just for the sake of sanity, I'd prefer 0644
here. Or, using the latest and greatest golang, 0o644
.
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 wanted to respect the original commit in this pull request.
But if maintainers don't mind it, I'll change from 0777
to 0o644
in this pull request.
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.
@kolyshkin I changed the file mode. Thanks!
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.
a nit
Yes. |
Signed-off-by: Kenta Tada <[email protected]>
1f5089f
to
644c107
Compare
Looks like the linter on PR's is perhaps only checking the changed lines; I saw Akihiro's comment on #2618 (comment), and the linter picked up the problem in https://github.com/opencontainers/runc/runs/1190924966 Looks like that output is a good list of things to work on;
Some notes there;
|
Yes. For example,
I think those functions are actually used for windows environment. Doesn't the current CI script recognize windows environment? |
Not sure, it may be only checking for the platform it runs on. IIRC, there's also an option to specify which build tags to use when linting. (so multiple combinations of build-tags could be needed to lint everything). These should also be ignored likely (but could potentially be candidates for inclusion in golang.org/x/sys);
|
Let me open a new ticket for tracking linting issues |
Thanks! |
Opened #2627 as a quick first draft 👍 |
For consistency, would be good if we did a look for all |
This commit adjusts the file mode to use the latest golang style Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style In addition to that, I changed those modes from 0700 to 0600 as same as opencontainers#2636 Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style In addition to that, I changed those modes from 0700 to 0600 as same as opencontainers#2636 Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style In addition to that, I changed those modes from 0700 to 0600 as same as opencontainers#2636 Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This commit adjusts the file mode to use the latest golang style In addition to that, I changed those modes from 0700 to 0600 as same as opencontainers#2636 Related to opencontainers#2625 Signed-off-by: Kenta Tada <[email protected]>
This file mode is unintentional apparently.
Signed-off-by: Kenta Tada [email protected]