Skip to content

Commit 0127d74

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into feature/text_analytics_v3.0
* 'master' of https://github.com/Azure/azure-sdk-for-python: [text analytics] Update ta tests (#11461) Release azure mgmt hybridkubernetes (#11483) add ci to azure-mgmt-eventhub (#11459) [Service Bus] Enable pylint and mypy (#11316) update CODEOWNERS with smoke test owners (#11404) Sync eng/common directory with azure-sdk-tools repository (#11469)
2 parents f137d5f + 0160912 commit 0127d74

File tree

394 files changed

+5289
-2139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+5289
-2139
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
/sdk/textanalytics/ @kristapratico @iscai-msft
4141
/sdk/formrecognizer/ @kristapratico @iscai-msft
4242

43+
# Smoke Tests
44+
/common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve
45+
4346
# Management Plane
4447
/**/*mgmt*/ @zikalino
4548

eng/common/TestResources/New-TestResources.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ if ($ProvisionerApplicationId) {
156156
}
157157

158158
$provisionerAccount = Retry {
159-
Connect-AzAccount -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
159+
Connect-AzAccount -Force:$Force -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
160160
}
161161

162162
$exitActions += {

eng/common/TestResources/Remove-TestResources.ps1

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ param (
4747
[string] $Environment = 'AzureCloud',
4848

4949
[Parameter()]
50-
[switch] $Force
50+
[switch] $Force,
51+
52+
# Captures any arguments not declared here (no parameter errors)
53+
[Parameter(ValueFromRemainingArguments = $true)]
54+
$RemoveTestResourcesRemainingArguments
5155
)
5256

5357
# By default stop for any error.
@@ -105,7 +109,7 @@ if ($ProvisionerApplicationId) {
105109
}
106110

107111
$provisionerAccount = Retry {
108-
Connect-AzAccount -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
112+
Connect-AzAccount -Force:$Force -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
109113
}
110114

111115
$exitActions += {
@@ -143,54 +147,40 @@ $exitActions.Invoke()
143147
<#
144148
.SYNOPSIS
145149
Deletes the resource group deployed for a service directory from Azure.
146-
147150
.DESCRIPTION
148151
Removes a resource group and all its resources previously deployed using
149152
New-TestResources.ps1.
150-
151153
If you are not currently logged into an account in the Az PowerShell module,
152154
you will be asked to log in with Connect-AzAccount. Alternatively, you (or a
153155
build pipeline) can pass $ProvisionerApplicationId and
154156
$ProvisionerApplicationSecret to authenticate a service principal with access to
155157
create resources.
156-
157158
.PARAMETER BaseName
158159
A name to use in the resource group and passed to the ARM template as 'baseName'.
159160
This will delete the resource group named 'rg-<baseName>'
160-
161161
.PARAMETER ResourceGroupName
162162
The name of the resource group to delete.
163-
164163
.PARAMETER TenantId
165164
The tenant ID of a service principal when a provisioner is specified.
166-
167165
.PARAMETER SubscriptionId
168166
Optional subscription ID to use for new resources when logging in as a
169167
provisioner. You can also use Set-AzContext if not provisioning.
170-
171168
.PARAMETER ProvisionerApplicationId
172169
A service principal ID to provision test resources when a provisioner is specified.
173-
174170
.PARAMETER ProvisionerApplicationSecret
175171
A service principal secret (password) to provision test resources when a provisioner is specified.
176-
177172
.PARAMETER ServiceDirectory
178173
A directory under 'sdk' in the repository root - optionally with subdirectories
179174
specified - in which to discover pre removal script named 'remove-test-resources-pre.json'.
180-
181175
.PARAMETER Environment
182176
Name of the cloud environment. The default is the Azure Public Cloud
183177
('PublicCloud')
184-
185178
.PARAMETER Force
186179
Force removal of resource group without asking for user confirmation
187-
188180
.EXAMPLE
189181
Remove-TestResources.ps1 -BaseName 'uuid123' -Force
190-
191182
Use the currently logged-in account to delete the resource group by the name of
192183
'rg-uuid123'
193-
194184
.EXAMPLE
195185
Remove-TestResources.ps1 `
196186
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}" `
@@ -199,11 +189,9 @@ Remove-TestResources.ps1 `
199189
-ProvisionerApplicationSecret '$(AppSecret)' `
200190
-Force `
201191
-Verbose `
202-
203192
When run in the context of an Azure DevOps pipeline, this script removes the
204193
resource group whose name is stored in the environment variable
205194
AZURE_RESOURCEGROUP_NAME.
206-
207195
.LINK
208196
New-TestResources.ps1
209-
#>
197+
#>
Lines changed: 28 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,40 @@
1-
# Deploys resources to a cloud type specified by the variable (not parameter)
2-
# 'CloudType'. Use this as part of a matrix to deploy resources to a particular
3-
# cloud instance. Normally we would use template parameters instead of variables
4-
# but matrix variables are not available during template expansion so any
5-
# benefits of parameters are lost.
6-
71
parameters:
82
ServiceDirectory: not-set
93
ArmTemplateParameters: '@{}'
104
DeleteAfterHours: 24
115
Location: ''
6+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
7+
8+
# SubscriptionConfiguration will be splat into the parameters of the test
9+
# resources script. It should be JSON in the form:
10+
# {
11+
# "SubscriptionId": "<subscription id>",
12+
# "TenantId": "<tenant id>",
13+
# "TestApplicationId": "<test app id>",
14+
# "TestApplicationSecret": "<test app secret>",
15+
# "ProvisionerApplicationId": "<provisoner app id>",
16+
# "ProvisoinerApplicationSecret": "<provisoner app secert>",
17+
# "Environment": "AzureCloud | AzureGov | AzureChina | <other environment>"
18+
# }
1219

1320
steps:
1421
# New-TestResources command requires Az module
1522
- pwsh: Install-Module -Name Az -Scope CurrentUser -AllowClobber -Force -Verbose
1623
displayName: Install Azure PowerShell module
1724

18-
- pwsh: >
19-
eng/common/TestResources/New-TestResources.ps1
20-
-BaseName 'Generated'
21-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
22-
-TenantId '$(aad-azure-sdk-test-tenant-id)'
23-
-SubscriptionId '$(azure-subscription-id)'
24-
-TestApplicationId '$(aad-azure-sdk-test-client-id)'
25-
-TestApplicationSecret '$(aad-azure-sdk-test-client-secret)'
26-
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id)'
27-
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret)'
28-
-AdditionalParameters ${{ parameters.ArmTemplateParameters }}
29-
-DeleteAfterHours ${{ parameters.DeleteAfterHours }}
30-
-Location '${{ parameters.Location }}'
31-
-Environment 'AzureCloud'
32-
-CI
33-
-Force
34-
-Verbose
35-
displayName: Deploy test resources (AzureCloud)
36-
condition: and(succeeded(), eq(variables['CloudType'], 'AzureCloud'))
37-
38-
- pwsh: >
39-
eng/common/TestResources/New-TestResources.ps1
40-
-BaseName 'Generated'
41-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
42-
-TenantId '$(aad-azure-sdk-test-tenant-id-gov)'
43-
-SubscriptionId '$(azure-subscription-id-gov)'
44-
-TestApplicationId '$(aad-azure-sdk-test-client-id-gov)'
45-
-TestApplicationSecret '$(aad-azure-sdk-test-client-secret-gov)'
46-
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-gov)'
47-
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret-gov)'
48-
-AdditionalParameters ${{ parameters.ArmTemplateParameters }}
49-
-DeleteAfterHours ${{ parameters.DeleteAfterHours }}
50-
-Location '${{ parameters.Location }}'
51-
-Environment 'AzureUSGovernment'
52-
-CI
53-
-Force
54-
-Verbose
55-
displayName: Deploy test resources (AzureUSGovernment)
56-
condition: and(succeeded(), eq(variables['CloudType'], 'AzureUSGovernment'))
25+
- pwsh: |
26+
$subscriptionConfiguration = @"
27+
${{ parameters.SubscriptionConfiguration }}
28+
"@ | ConvertFrom-Json -AsHashtable;
5729
58-
- pwsh: >
59-
eng/common/TestResources/New-TestResources.ps1
60-
-BaseName 'Generated'
61-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
62-
-TenantId '$(aad-azure-sdk-test-tenant-id-cn)'
63-
-SubscriptionId '$(azure-subscription-id-cn)'
64-
-TestApplicationId '$(aad-azure-sdk-test-client-id-cn)'
65-
-TestApplicationSecret '$(aad-azure-sdk-test-client-secret-cn)'
66-
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-cn)'
67-
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret-cn)'
68-
-AdditionalParameters ${{ parameters.ArmTemplateParameters }}
69-
-DeleteAfterHours ${{ parameters.DeleteAfterHours }}
70-
-Location '${{ parameters.Location }}'
71-
-Environment 'AzureChinaCloud'
72-
-CI
73-
-Force
74-
-Verbose
75-
displayName: Deploy test resources (AzureChinaCloud)
76-
condition: and(succeeded(), eq(variables['CloudType'], 'AzureChinaCloud'))
30+
eng/common/TestResources/New-TestResources.ps1 `
31+
-BaseName 'Generated' `
32+
-ServiceDirectory ${{ parameters.ServiceDirectory }} `
33+
-Location '${{ parameters.Location }}' `
34+
-DeleteAfterHours ${{ parameters.DeleteAfterHours }} `
35+
-AdditionalParameters ${{ parameters.ArmTemplateParameters }} `
36+
@subscriptionConfiguration `
37+
-CI `
38+
-Force `
39+
-Verbose
40+
displayName: Deploy test resources
Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,35 @@
1-
# Removes resources from a cloud type specified by the variable (not parameter)
2-
# 'CloudType'. Use this as part of a matrix to remove resources from a
3-
# particular cloud instance. Normally we would use template variables instead of
4-
# parameters but matrix variables are not available during template expansion
5-
# so any benefits of parameters are lost.
6-
71
# Assumes steps in deploy-test-resources.yml was run previously. Requires
82
# environment variable: AZURE_RESOURCEGROUP_NAME and Az PowerShell module
93

104
parameters:
115
ServiceDirectory: ''
6+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
127

13-
steps:
14-
- pwsh: >
15-
eng/common/TestResources/Remove-TestResources.ps1
16-
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}"
17-
-TenantId '$(aad-azure-sdk-test-tenant-id)'
18-
-SubscriptionId '$(azure-subscription-id)'
19-
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id)'
20-
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret)'
21-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
22-
-Environment 'AzureCloud'
23-
-Force
24-
-Verbose
25-
displayName: Remove test resources (AzureCloud)
26-
condition: and(ne(variables['AZURE_RESOURCEGROUP_NAME'], ''), eq(variables['CloudType'], 'AzureCloud'))
27-
continueOnError: true
8+
# SubscriptionConfiguration will be splat into the parameters of the test
9+
# resources script. It should be JSON in the form:
10+
# {
11+
# "SubscriptionId": "<subscription id>",
12+
# "TenantId": "<tenant id>",
13+
# "TestApplicationId": "<test app id>",
14+
# "TestApplicationSecret": "<test app secret>",
15+
# "ProvisionerApplicationId": "<provisoner app id>",
16+
# "ProvisoinerApplicationSecret": "<provisoner app secert>",
17+
# "Environment": "AzureCloud | AzureGov | AzureChina | <other environment>"
18+
# }
19+
# The Remove-TestResources.ps1 script accommodates extra parameters so it will
20+
# not error when parameters are provided which the script doesn't use.
2821

29-
- pwsh: >
30-
eng/common/TestResources/Remove-TestResources.ps1
31-
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}"
32-
-TenantId '$(aad-azure-sdk-test-tenant-id-gov)'
33-
-SubscriptionId '$(azure-subscription-id-gov)'
34-
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-gov)'
35-
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret-gov)'
36-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
37-
-Environment 'AzureUSGovernment'
38-
-Force
39-
-Verbose
40-
displayName: Remove test resources (AzureUSGovernment)
41-
condition: and(ne(variables['AZURE_RESOURCEGROUP_NAME'], ''), eq(variables['CloudType'], 'AzureUSGovernment'))
42-
continueOnError: true
22+
steps:
23+
- pwsh: |
24+
$subscriptionConfiguration = @"
25+
${{ parameters.SubscriptionConfiguration }}
26+
"@ | ConvertFrom-Json -AsHashtable;
4327
44-
- pwsh: >
45-
eng/common/TestResources/Remove-TestResources.ps1
46-
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}"
47-
-TenantId '$(aad-azure-sdk-test-tenant-id-cn)'
48-
-SubscriptionId '$(azure-subscription-id-cn)'
49-
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-cn)'
50-
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret-cn)'
51-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
52-
-Environment 'AzureChinaCloud'
53-
-Force
54-
-Verbose
55-
displayName: Remove test resources (AzureChinaCloud)
56-
condition: and(ne(variables['AZURE_RESOURCEGROUP_NAME'], ''), eq(variables['CloudType'], 'AzureChinaCloud'))
28+
eng/common/TestResources/Remove-TestResources.ps1 `
29+
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}" `
30+
-ServiceDirectory ${{ parameters.ServiceDirectory }} `
31+
@subscriptionConfiguration `
32+
-Force `
33+
-Verbose
34+
displayName: Remove test resources
5735
continueOnError: true

eng/tox/allowed_pylint_failures.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"azure-eventgrid",
4040
"azure-graphrbac",
4141
"azure-loganalytics",
42-
"azure-servicebus",
4342
"azure-servicefabric",
4443
"azure-template",
4544
"azure-keyvault",

eng/tox/mypy_hard_failure_packages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
MYPY_HARD_FAILURE_OPTED = [
99
"azure-core",
1010
"azure-eventhub",
11+
"azure-servicebus",
1112
"azure-ai-textanalytics",
1213
"azure-ai-formrecognizer"
1314
]

sdk/eventhub/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ stages:
5151
safeName: azureeventhubcheckpointstoreblobaio
5252
- name: azure_eventhub_checkpointstoreblob
5353
safeName: azureeventhubcheckpointstoreblob
54+
- name: azure-mgmt-eventhub
55+
safeName: azuremgmteventhub
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 0.1.0 (2020-05-18)
4+
5+
* Initial Release
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
recursive-include tests *.py *.yaml
2+
include *.md
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Microsoft Azure SDK for Python
2+
3+
This is the Microsoft Azure HybridKubernetes Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
6+
7+
8+
# Usage
9+
10+
For code examples, see [HybridKubernetes Management](https://docs.microsoft.com/python/api/overview/azure/hybrid-kubernetes)
11+
on docs.microsoft.com.
12+
13+
14+
# Provide Feedback
15+
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
18+
section of the project.
19+
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-hybridkubernetes%2FREADME.png)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from ._configuration import ConnectedKubernetesClientConfiguration
13+
from ._connected_kubernetes_client import ConnectedKubernetesClient
14+
__all__ = ['ConnectedKubernetesClient', 'ConnectedKubernetesClientConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+

0 commit comments

Comments
 (0)