Skip to content
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

Add retry for creatingAzureManager in case of throttled requests #6550

Merged

Commits on Feb 20, 2024

  1. Merged PR 1379: added retry for creatingAzureManager in case of throt…

    …tled requests
    
    added retry for forceRefresh in case of throttled requests
    ran tests
    MallocNanoZone=0 go test -race k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure -- passed
    
    and commented out unit test -- commented out as it takes 10 minutes to complete
    
    func TestCreateAzureManagerWithRetryError(t *testing.T) {
    	ctrl := gomock.NewController(t)
    	defer ctrl.Finish()
    	mockVMClient := mockvmclient.NewMockInterface(ctrl)
    	mockVMSSClient := mockvmssclient.NewMockInterface(ctrl)
    	mockVMSSClient.EXPECT().List(gomock.Any(), "fakeId").Return([]compute.VirtualMachineScaleSet{}, retry.NewError(true, errors.New("test"))).AnyTimes()
    	mockAzClient := &azClient{
    		virtualMachinesClient:         mockVMClient,
    		virtualMachineScaleSetsClient: mockVMSSClient,
    	}
    	manager, err := createAzureManagerInternal(strings.NewReader(validAzureCfg), cloudprovider.NodeGroupDiscoveryOptions{}, config.AutoscalingOptions{}, mockAzClient)
    	assert.Nil(t, manager)
    	assert.NotNil(t, err)
    }
    m-craghead authored and gandhipr committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    6eaa0c3 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. Configuration menu
    Copy the full SHA
    0d5a71e View commit details
    Browse the repository at this point in the history