-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix dyanmic resource deprovision #7343
Fix dyanmic resource deprovision #7343
Conversation
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -55,6 +55,9 @@ param ( | |||
[ValidateNotNullOrEmpty()] | |||
[hashtable] $AdditionalParameters, |
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.
What is our longer term plan to keep these scripts updated across repos? Do we have an issue tracking that?
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.
This is something that @heaths brought up and we've talked about but haven't reached a conclusion. I've opened Azure/azure-sdk#934 to track this.
/azp run java - appconfiguration - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -122,7 +125,14 @@ if ($TestApplicationId -and !$TestApplicationOid) { | |||
} | |||
|
|||
# Format the resource group name based on resource group naming recommendations and limitations. | |||
$resourceGroupName = "rg-{0}-$baseName" -f ($ServiceDirectory -replace '[\\\/]', '-').Substring(0, [Math]::Min($ServiceDirectory.Length, 90 - $BaseName.Length - 4)).Trim('-') | |||
$resourceGroupName = if ($CI) { |
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.
Are we using all the digits and alphabets to generate basename. This will be important to have larger key space so we have no conflict when we enable all the OS/languages/version in pipeline.
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.
This is a concern I brought up as well, but we are limited by many different resources (Key Vault being one of them) on the length. While reducing uniqueness of hte otherwise 128-bit integer could result in more collisions, in practice this is pretty rare. If an error occured, it would be obvious (something like "resource group already exists") so it'd be easy to diagnose and just restart a run.
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.
Chatted about this with @mikeharder yesterday and we are ok today with the amount of randomness using 16 characters from a guid (formatted without the dashes). This gives us 16^16 names to work with. We could increase this considerably by expanding to the whole alphabet.
…licitly into call to new-testresources.ps1
/azp run java - appconfiguration - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -122,7 +125,14 @@ if ($TestApplicationId -and !$TestApplicationOid) { | |||
} | |||
|
|||
# Format the resource group name based on resource group naming recommendations and limitations. | |||
$resourceGroupName = "rg-{0}-$baseName" -f ($ServiceDirectory -replace '[\\\/]', '-').Substring(0, [Math]::Min($ServiceDirectory.Length, 90 - $BaseName.Length - 4)).Trim('-') | |||
$resourceGroupName = if ($CI) { |
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.
This is a concern I brought up as well, but we are limited by many different resources (Key Vault being one of them) on the length. While reducing uniqueness of hte otherwise 128-bit integer could result in more collisions, in practice this is pretty rare. If an error occured, it would be obvious (something like "resource group already exists") so it'd be easy to diagnose and just restart a run.
/azp run java - appconfiguration - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit 827ed00.
No description provided.