Skip to content

Commit eb65dae

Browse files
committed
Fix linter errors
1 parent 39e5a94 commit eb65dae

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cmd/machine-controller-manager/app/controllermanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func getAvailableResources(clientBuilder corecontroller.ClientBuilder) (map[sche
313313
var healthzContent string
314314
// If apiserver is not running we should wait for some time and fail only then. This is particularly
315315
// important when we start apiserver and controller manager at the same time.
316-
err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 10*time.Second, true, func(ctx context.Context) (bool, error) {
316+
err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 10*time.Second, true, func(_ context.Context) (bool, error) {
317317
client, err := clientBuilder.Client("controller-discovery")
318318
if err != nil {
319319
klog.Errorf("Failed to get api versions from server: %v", err)

pkg/controller/deployment_util.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ func FindOldMachineSets(deployment *v1alpha1.MachineDeployment, isList []*v1alph
938938

939939
// WaitForMachineSetUpdated polls the machine set until it is updated.
940940
func WaitForMachineSetUpdated(ctx context.Context, c v1alpha1listers.MachineSetLister, desiredGeneration int64, namespace, name string) error {
941-
return wait.PollUntilContextTimeout(ctx, 1*time.Second, 1*time.Minute, true, func(ctx context.Context) (bool, error) {
941+
return wait.PollUntilContextTimeout(ctx, 1*time.Second, 1*time.Minute, true, func(_ context.Context) (bool, error) {
942942
is, err := c.MachineSets(namespace).Get(name)
943943
if err != nil {
944944
return false, err
@@ -949,7 +949,7 @@ func WaitForMachineSetUpdated(ctx context.Context, c v1alpha1listers.MachineSetL
949949

950950
// WaitForMachinesHashPopulated polls the machine set until updated and fully labeled.
951951
func WaitForMachinesHashPopulated(ctx context.Context, c v1alpha1listers.MachineSetLister, desiredGeneration int64, namespace, name string) error {
952-
return wait.PollUntilContextTimeout(ctx, 1*time.Second, 1*time.Minute, true, func(ctx context.Context) (bool, error) {
952+
return wait.PollUntilContextTimeout(ctx, 1*time.Second, 1*time.Minute, true, func(_ context.Context) (bool, error) {
953953
is, err := c.MachineSets(namespace).Get(name)
954954
if err != nil {
955955
return false, err
@@ -1206,7 +1206,7 @@ func IsSaturated(deployment *v1alpha1.MachineDeployment, is *v1alpha1.MachineSet
12061206
// Returns error if polling timesout.
12071207
func WaitForObservedMachineDeployment(getDeploymentFunc func() (*v1alpha1.MachineDeployment, error), desiredGeneration int64, interval, timeout time.Duration) error {
12081208
// TODO: This should take clientset.Interface when all code is updated to use clientset. Keeping it this way allows the function to be used by callers who have client.Interface.
1209-
return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) {
1209+
return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(_ context.Context) (bool, error) {
12101210
deployment, err := getDeploymentFunc()
12111211
if err != nil {
12121212
return false, err
@@ -1219,7 +1219,7 @@ func WaitForObservedMachineDeployment(getDeploymentFunc func() (*v1alpha1.Machin
12191219
// Returns error if polling timesout.
12201220
// TODO: remove the duplicate
12211221
func WaitForObservedDeploymentInternal(getDeploymentFunc func() (*v1alpha1.MachineDeployment, error), desiredGeneration int64, interval, timeout time.Duration) error {
1222-
return wait.PollUntilContextTimeout(context.Background(), interval, timeout, false, func(ctx context.Context) (bool, error) {
1222+
return wait.PollUntilContextTimeout(context.Background(), interval, timeout, false, func(_ context.Context) (bool, error) {
12231223
deployment, err := getDeploymentFunc()
12241224
if err != nil {
12251225
return false, err

pkg/test/integration/common/helpers/handling_files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (c *Cluster) applyFile(filePath string, namespace string) error {
172172

173173
// checkEstablished uses the specified name to check if it is established
174174
func (c *Cluster) checkEstablished(crdName string) error {
175-
err := wait.PollUntilContextTimeout(context.Background(), 500*time.Millisecond, 60*time.Second, false, func(ctx context.Context) (bool, error) {
175+
err := wait.PollUntilContextTimeout(context.Background(), 500*time.Millisecond, 60*time.Second, false, func(_ context.Context) (bool, error) {
176176
crd, err := c.apiextensionsClient.
177177
ApiextensionsV1().
178178
CustomResourceDefinitions().

0 commit comments

Comments
 (0)