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

upDATE #1

Merged
merged 58 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e0b6f60
Update Key Vault changelogs for October release (#14226)
chlowell Oct 2, 2020
ce3c59e
Increment version for storage releases (#14224)
azure-sdk Oct 2, 2020
bfaaad3
[KeyVault] Handle Role Definition UUID Name Internally (#14218)
mccoyp Oct 2, 2020
cf1672b
app config owner (#12986)
xiangyan99 Oct 3, 2020
6e5caf2
[ServiceBus]remove topic parameter object settability (#14116)
KieranBrantnerMagee Oct 3, 2020
26f7137
[ServiceBus] make amqp_message properties read-only (#14095)
KieranBrantnerMagee Oct 3, 2020
6fee44a
Add code reviewers (#14229)
turalf Oct 3, 2020
66cd75c
Resolve Failing Documentation Build for azure-mgmt-core (#14239)
scbedd Oct 5, 2020
026580e
[text analytics] fix query param in cli call to get endpoint (#14243)
iscai-msft Oct 5, 2020
ac9406e
Azure Communication Service - Phone Number Administration (#14237)
HeliWang Oct 5, 2020
2549ec0
Increment version for appconfiguration releases (#14245)
azure-sdk Oct 5, 2020
e8cb470
move the environment prep above the tooling that needs it (#14246)
scbedd Oct 5, 2020
2b29cb3
small changes to documentation, updated link in samples README, updat…
seankane-msft Oct 5, 2020
82188ac
small fixes while going through release checklist (#14250)
kristapratico Oct 5, 2020
0c2e175
update api version enum (#14254)
kristapratico Oct 5, 2020
4cabc99
[form recognizer] Remove unnecessary code (#14257)
iscai-msft Oct 5, 2020
657a918
upadted min dep on blob (#14252)
tasherif-msft Oct 5, 2020
a049376
[ServiceBus] b7 release doc fixes (#14247)
KieranBrantnerMagee Oct 5, 2020
d004c4c
[EventGrid] Prepare for beta3 release (#14262)
Oct 5, 2020
6bde1db
redo the dep update (#14264)
tasherif-msft Oct 5, 2020
0e5934f
Increment version for servicebus releases (#14265)
azure-sdk Oct 5, 2020
488b72c
Revise get_token docs (#14263)
chlowell Oct 5, 2020
1ba7a75
SetDevVersion Is Triggering Oddly (#14261)
scbedd Oct 5, 2020
022f655
Computer Vision 0.7.0 release (#14269)
Oct 6, 2020
6703b01
[text analytics] changelog add release date, fix wording (#14286)
iscai-msft Oct 6, 2020
a921388
Changelog for azure-identity 1.5.0b2 (#14288)
chlowell Oct 6, 2020
3e2f6f7
Update Changelog for communication packages (#14268)
turalf Oct 6, 2020
c1e5348
Increment version for search releases (#14290)
azure-sdk Oct 6, 2020
9cc9e96
update release date (#14291)
xiangyan99 Oct 6, 2020
cde89ce
add back code (#14289)
kristapratico Oct 6, 2020
d4bff7b
[form recognizer] add sample business cards to test forms (#14303)
iscai-msft Oct 6, 2020
25e0ffd
[formrecognizer] add locale to receipt samples (#14292)
kristapratico Oct 6, 2020
fa0db3a
Increment version for textanalytics releases (#14295)
azure-sdk Oct 6, 2020
b111f08
Increment package version after release of azure_data_tables (#14309)
azure-sdk Oct 6, 2020
f06ccf0
[ServiceBus] ServiceBus Operation Timeout Support (#13854)
yunhaoling Oct 7, 2020
babe3de
[Storage][FileShare]Regenerate code for file tier (#14302)
xiafu-msft Oct 7, 2020
0415c8a
Sync eng/common directory with azure-sdk-tools for PR 1052 (#14232)
azure-sdk Oct 7, 2020
a56ef3e
Pin Deps in "TestOldest" Regression (#14316)
scbedd Oct 7, 2020
bf778b1
Increment version for metricsadvisor releases (#14343)
azure-sdk Oct 7, 2020
3308b38
Merge azure-identity 1.4.1 hotfix into master (#14349)
chlowell Oct 7, 2020
d623abd
Increment version for keyvault releases (#14312)
azure-sdk Oct 7, 2020
aecfb64
Add tests.yml file to template sdk directory. (#14324)
mitchdenny Oct 7, 2020
45a7f58
Communication SMS package - nspkg dependency update (#14346)
turalf Oct 8, 2020
66cbc08
Sync eng/common directory with azure-sdk-tools for PR 1066 (#14333)
azure-sdk Oct 8, 2020
397ba46
Increment package version after release of azure_identity (#14351)
azure-sdk Oct 8, 2020
b712e8a
add metrics advisor to package mapping for docs (#14350)
kristapratico Oct 8, 2020
0d70c4b
Sync eng/common directory with azure-sdk-tools for PR 1077 (#14329)
azure-sdk Oct 8, 2020
de390a6
[form recognizer] add receipt locale tests (#14327)
iscai-msft Oct 8, 2020
2fed772
[formrecognizer] composed model (#14029)
kristapratico Oct 8, 2020
bec97a3
[Cosmos] 4.2.0 (#14358)
southpolesteve Oct 9, 2020
15ac220
Adding one more item to the limitations list (#13953)
Rodrigossz Oct 9, 2020
c199cdd
Increment package version after release of azure_cosmos (#14392)
azure-sdk Oct 9, 2020
3922de0
update to actual sample links in repo (#14375)
kristapratico Oct 9, 2020
b1018f0
[formrecognizer] rename display_name -> model_name (#14376)
kristapratico Oct 9, 2020
a2d5a3a
Convert CRLF to LF (#13903)
bluca Oct 9, 2020
9d7c6ac
Support env vars with hyphens when printing output (#14378)
azure-sdk Oct 9, 2020
dad3cbe
ServiceBusAdministrationClient now uses _parse_conn_str from base_han…
bradleydamato Oct 9, 2020
ff54d72
Track2 keyvault (#14103)
msyyc Oct 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
# PRLabel: %Storage
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @tasherif-msft @kasobol-msft

# PRLabel: %App Configuration
/sdk/appconfiguration/ @xiangyan99

/sdk/applicationinsights/azure-applicationinsights/ @divya-jay @geneh @alongafni
/sdk/loganalytics/azure-loganalytics/ @divya-jay @geneh @alongafni

Expand All @@ -33,7 +36,7 @@
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish

# PRLabel: %Communication
/sdk/communication/ @RezaJooyandeh @turalf
/sdk/communication/ @RezaJooyandeh @turalf @ankitarorabit @Azure/azure-sdk-communication-code-reviewers

# PRLabel: %KeyVault
/sdk/keyvault/ @schaabs @chlowell @iscai-msft
Expand Down
5 changes: 5 additions & 0 deletions doc/sphinx/package_service_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,11 @@
"service_name": "Form Recognizer",
"manually_generated": true
},
"azure-ai-metricsadvisor": {
"category": "Client",
"service_name": "Metrics Advisor",
"manually_generated": true
},
"azure-storage-blob": {
"category": "Client",
"service_name": "Storage",
Expand Down
63 changes: 54 additions & 9 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
[CmdletBinding(DefaultParameterSetName = 'Default', SupportsShouldProcess = $true, ConfirmImpact = 'Medium')]
param (
# Limit $BaseName to enough characters to be under limit plus prefixes, and https://docs.microsoft.com/azure/architecture/best-practices/resource-naming.
[Parameter(Mandatory = $true, Position = 0)]
[Parameter()]
[ValidatePattern('^[-a-zA-Z0-9\.\(\)_]{0,80}(?<=[a-zA-Z0-9\(\)])$')]
[string] $BaseName,

[ValidatePattern('^[-\w\._\(\)]+$')]
[string] $ResourceGroupName,

[Parameter(Mandatory = $true)]
[Parameter(Mandatory = $true, Position = 0)]
[string] $ServiceDirectory,

[Parameter(Mandatory = $true)]
[Parameter()]
[ValidatePattern('^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$')]
[string] $TestApplicationId,

Expand Down Expand Up @@ -119,6 +119,8 @@ $root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | R
$templateFileName = 'test-resources.json'
$templateFiles = @()
$environmentVariables = @{}
# Azure SDK Developer Playground
$defaultSubscription = "faa080af-c1d8-40ad-9cce-e1a450ca5b57"

Write-Verbose "Checking for '$templateFileName' files under '$root'"
Get-ChildItem -Path $root -Filter $templateFileName -Recurse | ForEach-Object {
Expand All @@ -133,6 +135,26 @@ if (!$templateFiles) {
exit
}

$UserName = if ($env:USER) { $env:USER } else { "${env:USERNAME}" }

# If no base name is specified use current user name
if (!$BaseName) {
$BaseName = "$UserName$ServiceDirectory"

Log "BaseName was not set. Using default base name: '$BaseName'"
}

# Try detecting repos that support OutFile and defaulting to it
if (!$CI -and !$PSBoundParameters.ContainsKey('OutFile') -and $IsWindows)
{
# TODO: find a better way to detect the language
if (Test-Path "$repositoryRoot/eng/service.proj")
{
$OutFile = $true
Log "Detected .NET repository. Defaulting OutFile to true. Test environment settings would be stored into the file so you don't need to set environment variables manually."
}
}

# If no location is specified use safe default locations for the given
# environment. If no matching environment is found $Location remains an empty
# string.
Expand All @@ -147,7 +169,7 @@ if (!$Location) {
Write-Verbose "Location was not set. Using default location for environment: '$Location'"
}

# Log in if requested; otherwise, the user is expected to already be authenticated via Connect-AzAccount.
# Log in if requested; otherwise, try to login into playground subscription.
if ($ProvisionerApplicationId) {
$null = Disable-AzContextAutosave -Scope Process

Expand Down Expand Up @@ -176,6 +198,25 @@ if ($ProvisionerApplicationId) {
}
}
}
elseif (!$CI)
{
# check if user is logged in and login into
$context = Get-AzContext;
if (!$context)
{
Log "You are not logged in, connecting to 'Azure SDK Developer Playground'"
Connect-AzAccount -Subscription $defaultSubscription
}

# If no test application id is specified create a new service principal
if (!$TestApplicationId) {
Log "TestApplicationId was not specified, creating a new service principal."
$servicePrincipal = New-AzADServicePrincipal -Role Owner

$TestApplicationId = $servicePrincipal.ApplicationId
$TestApplicationSecret = (ConvertFrom-SecureString $servicePrincipal.Secret -AsPlainText);
}
}

# Get test application OID from ID if not already provided.
if ($TestApplicationId -and !$TestApplicationOid) {
Expand Down Expand Up @@ -215,7 +256,7 @@ $ResourceGroupName = if ($ResourceGroupName) {

# Tag the resource group to be deleted after a certain number of hours if specified.
$tags = @{
Creator = if ($env:USER) { $env:USER } else { "${env:USERNAME}" }
Creator = $UserName
ServiceDirectory = $ServiceDirectory
}

Expand Down Expand Up @@ -284,7 +325,7 @@ $shell, $shellExportFormat = if (($parentProcessName = (Get-Process -Id $PID).Pa
} elseif (@('bash', 'csh', 'tcsh', 'zsh') -contains $parentProcessName) {
'shell', 'export {0}={1}'
} else {
'PowerShell', '$env:{0} = ''{1}'''
'PowerShell', '${{env:{0}}} = ''{1}'''
}

# Deploy the templates
Expand Down Expand Up @@ -403,7 +444,11 @@ foreach ($templateFile in $templateFiles) {

$exitActions.Invoke()

return $environmentVariables
# Suppress output locally
if ($CI)
{
return $environmentVariables
}

<#
.SYNOPSIS
Expand Down Expand Up @@ -466,7 +511,7 @@ test resources (e.g. Role Assignments on resources). It is passed as to the ARM
template as 'testApplicationOid'

For more information on the relationship between AAD Applications and Service
Principals see: https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals
Principals see: https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals

.PARAMETER TenantId
The tenant ID of a service principal when a provisioner is specified. The same
Expand Down Expand Up @@ -568,4 +613,4 @@ log redaction).

.LINK
Remove-TestResources.ps1
#>
#>
16 changes: 8 additions & 8 deletions eng/common/TestResources/New-TestResources.ps1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Deploys live test resources defined for a service directory to Azure.

### Default (Default)
```
New-TestResources.ps1 [-BaseName] <String> [-ResourceGroupName <String>] -ServiceDirectory <String>
-TestApplicationId <String> [-TestApplicationSecret <String>] [-TestApplicationOid <String>]
New-TestResources.ps1 [-BaseName <String>] [-ResourceGroupName <String>] [-ServiceDirectory] <String>
[-TestApplicationId <String>] [-TestApplicationSecret <String>] [-TestApplicationOid <String>]
[-DeleteAfterHours <Int32>] [-Location <String>] [-Environment <String>] [-AdditionalParameters <Hashtable>]
[-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### Provisioner
```
New-TestResources.ps1 [-BaseName] <String> [-ResourceGroupName <String>] -ServiceDirectory <String>
-TestApplicationId <String> [-TestApplicationSecret <String>] [-TestApplicationOid <String>]
New-TestResources.ps1 [-BaseName <String>] [-ResourceGroupName <String>] [-ServiceDirectory] <String>
[-TestApplicationId <String>] [-TestApplicationSecret <String>] [-TestApplicationOid <String>]
-TenantId <String> [-SubscriptionId <String>] -ProvisionerApplicationId <String>
-ProvisionerApplicationSecret <String> [-DeleteAfterHours <Int32>] [-Location <String>]
[-Environment <String>] [-AdditionalParameters <Hashtable>] [-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm]
Expand Down Expand Up @@ -106,8 +106,8 @@ Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down Expand Up @@ -140,7 +140,7 @@ Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -159,7 +159,7 @@ Type: String
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Expand Down
42 changes: 18 additions & 24 deletions eng/common/TestResources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,10 @@ is a member of multiple subscriptions.

```powershell
Connect-AzAccount -Subscription 'YOUR SUBSCRIPTION ID'
$sp = New-AzADServicePrincipal -Role Owner
eng\common\TestResources\New-TestResources.ps1 `
-BaseName 'myusername' `
-ServiceDirectory 'search' `
-TestApplicationId $sp.ApplicationId `
-TestApplicationSecret (ConvertFrom-SecureString $sp.Secret -AsPlainText)
eng\common\TestResources\New-TestResources.ps1 -ServiceDirectory 'search'
```

If you are running this for a .NET project on Windows, the recommended method is to
add the `-OutFile` switch to the above command. This will save test environment settings
The `OutFile` switch would be set if you are running this for a .NET project on Windows. This will save test environment settings
into a test-resources.json.env file next to test-resources.json. The file is protected via DPAPI.
The environment file would be scoped to the current repository directory and avoids the need to
set environment variables or restart your IDE to recognize them.
Expand All @@ -45,14 +39,14 @@ Along with some log messages, this will output environment variables based on
your current shell like in the following example:

```powershell
$env:AZURE_TENANT_ID = '<<secret>>'
$env:AZURE_CLIENT_ID = '<<secret>>'
$env:AZURE_CLIENT_SECRET = '<<secret>>'
$env:AZURE_SUBSCRIPTION_ID = 'YOUR SUBSCRIPTION ID'
$env:AZURE_RESOURCE_GROUP = 'rg-myusername'
$env:AZURE_LOCATION = 'westus2'
$env:AZURE_SEARCH_STORAGE_NAME = 'myusernamestg'
$env:AZURE_SEARCH_STORAGE_KEY = '<<secret>>'
${env:AZURE_TENANT_ID} = '<<secret>>'
${env:AZURE_CLIENT_ID} = '<<secret>>'
${env:AZURE_CLIENT_SECRET} = '<<secret>>'
${env:AZURE_SUBSCRIPTION_ID} = 'YOUR SUBSCRIPTION ID'
${env:AZURE_RESOURCE_GROUP} = 'rg-myusername'
${env:AZURE_LOCATION} = 'westus2'
${env:AZURE_SEARCH_STORAGE_NAME} = 'myusernamestg'
${env:AZURE_SEARCH_STORAGE_KEY} = '<<secret>>'
```

For security reasons we do not set these environment variables automatically
Expand All @@ -68,14 +62,14 @@ applications started outside the terminal, you could copy and paste the
following commands:

```powershell
setx AZURE_TENANT_ID $env:AZURE_TENANT_ID
setx AZURE_CLIENT_ID $env:AZURE_CLIENT_ID
setx AZURE_CLIENT_SECRET $env:AZURE_CLIENT_SECRET
setx AZURE_SUBSCRIPTION_ID $env:AZURE_SUBSCRIPTION_ID
setx AZURE_RESOURCE_GROUP $env:AZURE_RESOURCE_GROUP
setx AZURE_LOCATION $env:AZURE_LOCATION
setx AZURE_SEARCH_STORAGE_NAME $env:AZURE_SEARCH_STORAGE_NAME
setx AZURE_SEARCH_STORAGE_KEY $env:AZURE_SEARCH_STORAGE_KEY
setx AZURE_TENANT_ID ${env:AZURE_TENANT_ID}
setx AZURE_CLIENT_ID ${env:AZURE_CLIENT_ID}
setx AZURE_CLIENT_SECRET ${env:AZURE_CLIENT_SECRET}
setx AZURE_SUBSCRIPTION_ID ${env:AZURE_SUBSCRIPTION_ID}
setx AZURE_RESOURCE_GROUP ${env:AZURE_RESOURCE_GROUP}
setx AZURE_LOCATION ${env:AZURE_LOCATION}
setx AZURE_SEARCH_STORAGE_NAME ${env:AZURE_SEARCH_STORAGE_NAME}
setx AZURE_SEARCH_STORAGE_KEY ${env:AZURE_SEARCH_STORAGE_KEY}
```

After running or recording live tests, if you do not plan on further testing
Expand Down
14 changes: 10 additions & 4 deletions eng/common/pipelines/templates/steps/create-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ parameters:
GHTeamReviewersVariable: ''
# Multiple labels seperated by comma, e.g. "bug, APIView"
PRLabels: ''
SkipCheckingForChanges: false

steps:

Expand All @@ -35,15 +36,19 @@ steps:
echo "##vso[task.setvariable variable=HasChanges]$false"
echo "No changes so skipping code push"
}
displayName: Check for changes
condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false))
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- pwsh: |
# Remove the repo owner from the front of the repo name if it exists there
$repoName = "${{ parameters.RepoName }}" -replace "^${{ parameters.RepoOwner }}/", ""
echo "##vso[task.setvariable variable=RepoNameWithoutOwner]$repoName"
echo "RepoName = $repName"

displayName: Check for changes
echo "RepoName = $repoName"
displayName: Remove Repo Owner from Repo Name
condition: succeeded()
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- task: PowerShell@2
displayName: Push changes
Expand All @@ -57,6 +62,7 @@ steps:
-CommitMsg "${{ parameters.CommitMsg }}"
-GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.PROwner }}/$(RepoNameWithoutOwner).git"
-PushArgs "${{ parameters.PushArgs }}"
-SkipCommit $${{parameters.SkipCheckingForChanges}}

- task: PowerShell@2
displayName: Create pull request
Expand Down
53 changes: 53 additions & 0 deletions eng/common/scripts/Add-Issue-Comment.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[Parameter(Mandatory = $true)]
[string]$RepoOwner,

[Parameter(Mandatory = $true)]
[string]$RepoName,

[Parameter(Mandatory = $true)]
[string]$IssueNumber,

[Parameter(Mandatory = $false)]
[string]$CommentPrefix,

[Parameter(Mandatory = $true)]
[string]$Comment,

[Parameter(Mandatory = $false)]
[string]$CommentPostFix,

[Parameter(Mandatory = $true)]
[string]$AuthToken
)

. "${PSScriptRoot}\logging.ps1"

$headers = @{
Authorization = "bearer $AuthToken"
}

$apiUrl = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$IssueNumber/comments"

$commentPrefixValue = [System.Environment]::GetEnvironmentVariable($CommentPrefix)
$commentValue = [System.Environment]::GetEnvironmentVariable($Comment)
$commentPostFixValue = [System.Environment]::GetEnvironmentVariable($CommentPostFix)

if (!$commentPrefixValue) { $commentPrefixValue = $CommentPrefix }
if (!$commentValue) { $commentValue = $Comment }
if (!$commentPostFixValue) { $commentPostFixValue = $CommentPostFix }

$PRComment = "$commentPrefixValue $commentValue $commentPostFixValue"

$data = @{
body = $PRComment
}

try {
$resp = Invoke-RestMethod -Method POST -Headers $headers -Uri $apiUrl -Body ($data | ConvertTo-Json)
}
catch {
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_"
exit 1
}
Loading