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

Fix dyanmic resource deprovision #7343

Merged

Conversation

danieljurek
Copy link
Member

No description provided.

@danieljurek danieljurek added the EngSys This issue is impacting the engineering system. label Jan 10, 2020
@danieljurek
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -55,6 +55,9 @@ param (
[ValidateNotNullOrEmpty()]
[hashtable] $AdditionalParameters,
Copy link
Member

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?

Copy link
Member Author

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.

@danieljurek
Copy link
Member Author

/azp run java - appconfiguration - tests

@azure-pipelines
Copy link

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) {
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member Author

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.

@danieljurek
Copy link
Member Author

/azp run java - appconfiguration - tests

@azure-pipelines
Copy link

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) {
Copy link
Member

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.

@danieljurek
Copy link
Member Author

/azp run java - appconfiguration - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EngSys This issue is impacting the engineering system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants