-
Notifications
You must be signed in to change notification settings - Fork 629
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
Bump k8s dependecies to v1.25 #761
Conversation
Welcome @yaron-idan! |
Hi @yaron-idan. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yaron-idan The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Please remove files under .idea
Hey @MartinForReal, I've removed the |
@@ -107,7 +108,7 @@ func (c *nodeProblemClient) SetConditions(newConditions []v1.NodeCondition) erro | |||
if err != nil { | |||
return err | |||
} | |||
return c.client.RESTClient().Patch(types.StrategicMergePatchType).Resource("nodes").Name(c.nodeName).SubResource("status").Body(patch).Do().Error() | |||
return c.client.RESTClient().Patch(types.StrategicMergePatchType).Resource("nodes").Name(c.nodeName).SubResource("status").Body(patch).Do(context.TODO()).Error() |
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 think we'd better to introduce context package into NPD, context.TODO() should not be used with product code.
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 agree, but let's make that a separate change. I think it's fine to use TODO for now.
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've worked on a commit adding context last night, here it is for reference.
@@ -38,30 +38,30 @@ func (mc *memoryCollector) collect() { | |||
} | |||
|
|||
if mc.mBytesUsed != nil { | |||
memUsed := meminfo.MemTotal - meminfo.MemFree - meminfo.Buffers - meminfo.Cached - meminfo.Slab | |||
mc.mBytesUsed.Record(map[string]string{stateLabel: "free"}, int64(meminfo.MemFree)*1024) | |||
memUsed := *meminfo.MemTotal - *meminfo.MemFree - *meminfo.Buffers - *meminfo.Cached - *meminfo.Slab |
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.
Do you think if we need to make sure pointer is not nil.
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.
It's a good idea, I've added a check to the condition.
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 mean maybe we should check if meminfo.MemFree, meminfo.Buffers or other item is nil
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.
Gotcha, I updated the condition. Does this fit what you meant?
golang.org/x/sys v0.8.0 | ||
google.golang.org/api v0.118.0 | ||
k8s.io/api v0.27.2 | ||
k8s.io/apimachinery v0.27.2 |
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.
Please check the status of go mod graph. Although k8s.io related dependencies are set to 1.25.10 in replace rules, the actual required version is 1.27. we need to find the library which requires k8s.io 1.27 and downgrade them if any.
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 haven't found any mention of v1.27 when running go mod graph
, are you sure it's been required somewhere in the project?
@@ -24,8 +25,8 @@ import ( | |||
"sync" | |||
"time" | |||
|
|||
"k8s.io/klog" | |||
inotify "k8s.io/utils/inotify" | |||
"github.com/fsnotify/fsnotify" |
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'm wondering why this library is replaced with "github.com/fsnotify/fsnotify"
@@ -38,30 +38,30 @@ func (mc *memoryCollector) collect() { | |||
} | |||
|
|||
if mc.mBytesUsed != nil { | |||
memUsed := meminfo.MemTotal - meminfo.MemFree - meminfo.Buffers - meminfo.Cached - meminfo.Slab | |||
mc.mBytesUsed.Record(map[string]string{stateLabel: "free"}, int64(meminfo.MemFree)*1024) | |||
memUsed := *meminfo.MemTotal - *meminfo.MemFree - *meminfo.Buffers - *meminfo.Cached - *meminfo.Slab |
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 mean maybe we should check if meminfo.MemFree, meminfo.Buffers or other item is nil
/ok-to-test |
/retest |
@yaron-idan: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
#793 is merged. |
NPD dependencies were bumped to 1.28.2. Most CVEs should be addressed in the next release. |
/close |
@MartinForReal: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This PR bumps k8s dependencies to v1.25 to address CVE-2020-8558 and close issue #742