Skip to content

Commit c3bea3b

Browse files
committed
fix: try to fix compilation errors because of tidy
1 parent ed2ba7b commit c3bea3b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/exporters/k8sexporter/condition/manager.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package condition
1818

1919
import (
2020
"context"
21+
"fmt"
2122
"reflect"
2223
"sync"
2324
"time"
@@ -169,7 +170,7 @@ func (c *conditionManager) sync(ctx context.Context) {
169170
taintStr := fmt.Sprintf("%s=%s:%s", c.conditions[i].TaintConfig.Key, c.conditions[i].TaintConfig.Value,
170171
c.conditions[i].TaintConfig.Effect)
171172

172-
node, err := c.client.GetNode()
173+
node, err := c.client.GetNode(ctx)
173174
if err != nil {
174175
glog.Errorf("failed to get node: %v", err)
175176
continue
@@ -211,7 +212,7 @@ func (c *conditionManager) sync(ctx context.Context) {
211212
}
212213
}
213214

214-
if err := c.client.SetConditions(ctx, conditions); err != nil {
215+
if err := c.client.SetConditions(ctx, conditions); err != nil {
215216
// The conditions will be updated again in future sync
216217
glog.Errorf("failed to update node conditions: %v", err)
217218
c.resyncNeeded = true

pkg/exporters/k8sexporter/condition/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func TestSync(t *testing.T) {
337337
fakeClient.InjectError(tc.errorKey, fmt.Errorf("injected error"))
338338
}
339339

340-
m.sync()
340+
m.sync(context.Background())
341341
}
342342
}
343343

0 commit comments

Comments
 (0)