-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retry Conflicts for AnotherOperationInProgress (#3653)
The new azclient allows us to pass a callback function to decide if we want to retry a request. The default behaviour is to only retry a specific set of status codes. This extends that behaviour to also check Conflict (409) and retry if the "error.code" field is "AnotherOperationInProgress". We're avoiding retrying all conflict status codes because some won't be fixed with a retry, so we're targeting the specific case instead. Tested this both manually stepping through the code with a debugger and also created an integration test which previously failed but now passes when configured to use the new azclient instead of autorest client. To access this improved behaviour right now, set the environment variable `PULUMI_ENABLE_AZCORE_BACKEND=true`. This will become the default in the future, but is currently in testing behind a feature flag. This should address #903 which we will close once we've defaulted to using the new azcore implementation: - #3654
- Loading branch information
1 parent
ce90e01
commit 5056b3d
Showing
4 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
provider/pkg/provider/test-programs/parallel-subnet-creation/Pulumi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: parallel-subnet-creation | ||
runtime: yaml | ||
description: Test creating subnets in parallel, without dependencies which should trigger conflicts as only 1 can be updated at a time | ||
|
||
resources: | ||
resourceGroup: | ||
type: azure-native:resources:ResourceGroup | ||
virtualNetwork: | ||
type: azure-native:network:VirtualNetwork | ||
properties: | ||
addressSpace: | ||
addressPrefixes: | ||
- 10.0.0.0/16 | ||
flowTimeoutInMinutes: 10 | ||
location: eastus | ||
resourceGroupName: ${resourceGroup.name} | ||
subnet1: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.0.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet2: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.1.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet3: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.2.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet4: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.3.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet5: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.4.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet6: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.5.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet7: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.6.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} | ||
subnet8: | ||
type: azure-native:network:Subnet | ||
properties: | ||
addressPrefix: "10.0.7.0/24" | ||
resourceGroupName: ${resourceGroup.name} | ||
virtualNetworkName: ${virtualNetwork.name} |