Skip to content

Commit c71823c

Browse files
committed
* 'main' of https://github.com/Azure/azure-sdk-for-python: Address API view issues (Azure#20407) skip custom translation model samples (Azure#20414) [purview account] first release for azure-purview-account (Azure#20335) improve docs and samples for glossaries and custom models (Azure#18587) Sync eng/common directory with azure-sdk-tools for PR 1918 (Azure#20342) Update .docsettings.yml (Azure#20402) improve begin_translation docstring (Azure#20401) [translation] fix poller.details (Azure#20392) Chain exceptions from LibsecretPersistence (Azure#20380) [AutoRelease] t2-datamigration-2021-08-19-04035 (Azure#20349) [AutoRelease] t2-policyinsights-2021-08-23-78735 (Azure#20381) [AutoRelease] t2-servicebus-2021-08-19-00756 (Azure#20350) [AutoRelease] t2-costmanagement-2021-07-27-84467 (Azure#19949) keyvault and storage have a conflict between mindependency and what local azure-identity requires. resolve it (Azure#20391) Add Cloud Configuration section to Identity readme (Azure#20373) Consistency related changes (Azure#20385)
2 parents 329d01b + 37cb22c commit c71823c

File tree

300 files changed

+61835
-4909
lines changed

Some content is hidden

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

300 files changed

+61835
-4909
lines changed

eng/.docsettings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ omitted_paths:
1010
- sdk/identity/azure-identity/tests/*
1111
- sdk/**/tests/perfstress_tests/*
1212
- sdk/nspkg/*
13+
- sdk/**/swagger/*
1314

1415
language: python
1516
root_check_enabled: True
@@ -91,6 +92,7 @@ known_content_issues:
9192
- ['sdk/purview/azure-purview-catalog/swagger/README.md',  '#4554']
9293
- ['sdk/purview/azure-purview-scanning/swagger/README.md',  '#4554']
9394
- ['sdk/agrifood/azure-agrifood-farming/swagger/README.md',  '#4554']
95+
- ['sdk/purview/azure-purview-account/swagger/README.md', '#4554']
9496
- ['sdk/containerregistry/azure-containerregistry/swagger/README.md', '#4554']
9597
- ['sdk/appconfiguration/azure-appconfiguration/swagger/README.md', '#4554']
9698
- ['sdk/attestation/azure-security-attestation/swagger/README.md', '#4554']

eng/common/scripts/stress-testing/deploy-stress-tests.ps1

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ $ErrorActionPreference = 'Stop'
2020
. $PSScriptRoot/find-all-stress-packages.ps1
2121
$FailedCommands = New-Object Collections.Generic.List[hashtable]
2222

23-
if (!(Get-Module powershell-yaml)) {
24-
Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser
25-
}
23+
. (Join-Path $PSScriptRoot "../Helpers" PSModule-Helpers.ps1)
24+
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
2625

2726
# Powershell does not (at time of writing) treat exit codes from external binaries
2827
# as cause for stopping execution, so do this via a wrapper function.
@@ -51,7 +50,10 @@ function Login([string]$subscription, [string]$clusterGroup, [boolean]$pushImage
5150
RunOrExitOnFailure az login --allow-no-subscriptions
5251
}
5352

54-
$clusterName = (az aks list -g $clusterGroup -o json| ConvertFrom-Json).name
53+
# Discover cluster name, only one cluster per group is expected
54+
Write-Host "Listing AKS cluster in $subscription/$clusterGroup"
55+
$cluster = RunOrExitOnFailure az aks list -g $clusterGroup --subscription $subscription -o json
56+
$clusterName = ($cluster | ConvertFrom-Json).name
5557

5658
RunOrExitOnFailure az aks get-credentials `
5759
-n "$clusterName" `
@@ -60,8 +62,9 @@ function Login([string]$subscription, [string]$clusterGroup, [boolean]$pushImage
6062
--overwrite-existing
6163

6264
if ($pushImages) {
63-
$registry = (az acr list -g $clusterGroup -o json | ConvertFrom-Json).name
64-
RunOrExitOnFailure az acr login -n $registry
65+
$registry = RunOrExitOnFailure az acr list -g $clusterGroup --subscription $subscription -o json
66+
$registryName = ($registry | ConvertFrom-Json).name
67+
RunOrExitOnFailure az acr login -n $registryName
6568
}
6669
}
6770

@@ -110,11 +113,8 @@ function DeployStressPackage(
110113
[string]$repository,
111114
[boolean]$pushImages
112115
) {
113-
$registry = (az acr list -g $clusterGroup -o json | ConvertFrom-Json).name
114-
if (!$registry) {
115-
Write-Host "Could not find container registry in resource group $clusterGroup"
116-
exit 1
117-
}
116+
$registry = RunOrExitOnFailure az acr list -g $clusterGroup --subscription $subscription -o json
117+
$registryName = ($registry | ConvertFrom-Json).name
118118

119119
Run helm dependency update $pkg.Directory
120120
if ($LASTEXITCODE) { return }
@@ -133,7 +133,7 @@ function DeployStressPackage(
133133
if (!$imageName) {
134134
$imageName = $dockerFile.Directory.Name
135135
}
136-
$imageTag = "${registry}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
136+
$imageTag = "${registryName}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
137137
Write-Host "Building and pushing stress test docker image '$imageTag'"
138138
Run docker build -t $imageTag -f $dockerFile.FullName $dockerFile.DirectoryName
139139
if ($LASTEXITCODE) { return }
@@ -154,7 +154,7 @@ function DeployStressPackage(
154154
Run helm upgrade $pkg.ReleaseName $pkg.Directory `
155155
-n $pkg.Namespace `
156156
--install `
157-
--set repository=$registry.azurecr.io/$repository `
157+
--set repository=$registryName.azurecr.io/$repository `
158158
--set tag=$deployId `
159159
--set stress-test-addons.env=$environment
160160
if ($LASTEXITCODE) {
@@ -176,4 +176,7 @@ function DeployStressPackage(
176176
Run kubectl label secret -n $pkg.Namespace --overwrite $helmReleaseConfig deployId=$deployId
177177
}
178178

179-
DeployStressTests @PSBoundParameters
179+
# Don't call functions when the script is being dot sourced
180+
if ($MyInvocation.InvocationName -ne ".") {
181+
DeployStressTests @PSBoundParameters
182+
}

eng/tox/allowed_pylint_failures.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"azure-purview-nspkg",
5555
"azure-purview-scanning",
5656
"azure-purview-catalog",
57+
"azure-purview-account",
5758
"azure-messaging-nspkg",
5859
"azure-agrifood-farming",
5960
"azure-eventhub",

scripts/devops_tasks/test_run_samples.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
"sample_list_translations_with_filters_async.py",
124124
"sample_list_document_statuses_with_filters.py",
125125
"sample_list_translations_with_filters.py",
126+
"sample_translation_with_custom_model.py",
127+
"sample_translation_with_custom_model_async.py",
126128
]
127129
}
128130

sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 3.0.0 (2021-07-27)
4+
5+
**Breaking changes**
6+
7+
- Parameter dataset of model QueryDefinition is now required
8+
- Parameter dataset of model ForecastDefinition is now required
9+
310
## 2.0.0 (2021-06-08)
411

512
**Features**
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].0",
4+
"@autorest/[email protected].4",
55
"@autorest/[email protected]"
66
],
7-
"commit": "67528b3e539b96ccaaf82c360f5715184e467e21",
7+
"commit": "74efe54fbc55c91a1d9213afbb2723747acfddf9",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].0 --use=@autorest/[email protected] --version=3.4.2",
9+
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].4 --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/cost-management/resource-manager/readme.md"
1111
}

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0"
9+
VERSION = "3.0.0"

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ class FunctionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
185185
"""The name of the aggregation function to use.
186186
"""
187187

188+
AVG = "Avg"
189+
MAX = "Max"
190+
MIN = "Min"
188191
SUM = "Sum"
189192

190193
class GranularityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ class ForecastDefinition(msrest.serialization.Model):
10121012
:type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType
10131013
:param time_period: Has time period for pulling data for the forecast.
10141014
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1015-
:param dataset: Has definition for data in this forecast.
1015+
:param dataset: Required. Has definition for data in this forecast.
10161016
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
10171017
:param include_actual_cost: a boolean determining if actualCost will be included.
10181018
:type include_actual_cost: bool
@@ -1023,6 +1023,7 @@ class ForecastDefinition(msrest.serialization.Model):
10231023
_validation = {
10241024
'type': {'required': True},
10251025
'timeframe': {'required': True},
1026+
'dataset': {'required': True},
10261027
}
10271028

10281029
_attribute_map = {
@@ -1042,7 +1043,7 @@ def __init__(
10421043
self.type = kwargs['type']
10431044
self.timeframe = kwargs['timeframe']
10441045
self.time_period = kwargs.get('time_period', None)
1045-
self.dataset = kwargs.get('dataset', None)
1046+
self.dataset = kwargs['dataset']
10461047
self.include_actual_cost = kwargs.get('include_actual_cost', None)
10471048
self.include_fresh_partial_cost = kwargs.get('include_fresh_partial_cost', None)
10481049

@@ -1267,7 +1268,7 @@ class QueryAggregation(msrest.serialization.Model):
12671268
:param name: Required. The name of the column to aggregate.
12681269
:type name: str
12691270
:param function: Required. The name of the aggregation function to use. Possible values
1270-
include: "Sum".
1271+
include: "Avg", "Max", "Min", "Sum".
12711272
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
12721273
"""
12731274

@@ -1364,7 +1365,8 @@ class QueryDataset(msrest.serialization.Model):
13641365
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
13651366
by clauses.
13661367
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1367-
:param filter: Has filter expression to use in the query.
1368+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1369+
documentation for how to properly format the filter.
13681370
:type filter: ~azure.mgmt.costmanagement.models.QueryFilter
13691371
"""
13701372

@@ -1407,7 +1409,8 @@ class QueryDatasetAutoGenerated(msrest.serialization.Model):
14071409
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
14081410
by clauses.
14091411
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1410-
:param filter: Has filter expression to use in the query.
1412+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1413+
documentation for how to properly format the filter.
14111414
:type filter: ~azure.mgmt.costmanagement.models.QueryFilterAutoGenerated
14121415
"""
14131416

@@ -1469,13 +1472,14 @@ class QueryDefinition(msrest.serialization.Model):
14691472
:type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType
14701473
:param time_period: Has time period for pulling data for the query.
14711474
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1472-
:param dataset: Has definition for data in this query.
1475+
:param dataset: Required. Has definition for data in this query.
14731476
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
14741477
"""
14751478

14761479
_validation = {
14771480
'type': {'required': True},
14781481
'timeframe': {'required': True},
1482+
'dataset': {'required': True},
14791483
}
14801484

14811485
_attribute_map = {
@@ -1493,7 +1497,7 @@ def __init__(
14931497
self.type = kwargs['type']
14941498
self.timeframe = kwargs['timeframe']
14951499
self.time_period = kwargs.get('time_period', None)
1496-
self.dataset = kwargs.get('dataset', None)
1500+
self.dataset = kwargs['dataset']
14971501

14981502

14991503
class QueryFilter(msrest.serialization.Model):
@@ -1700,7 +1704,7 @@ class ReportConfigAggregation(msrest.serialization.Model):
17001704
:param name: Required. The name of the column to aggregate.
17011705
:type name: str
17021706
:param function: Required. The name of the aggregation function to use. Possible values
1703-
include: "Sum".
1707+
include: "Avg", "Max", "Min", "Sum".
17041708
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
17051709
"""
17061710

sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ class ForecastDefinition(msrest.serialization.Model):
11171117
:type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType
11181118
:param time_period: Has time period for pulling data for the forecast.
11191119
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1120-
:param dataset: Has definition for data in this forecast.
1120+
:param dataset: Required. Has definition for data in this forecast.
11211121
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
11221122
:param include_actual_cost: a boolean determining if actualCost will be included.
11231123
:type include_actual_cost: bool
@@ -1128,6 +1128,7 @@ class ForecastDefinition(msrest.serialization.Model):
11281128
_validation = {
11291129
'type': {'required': True},
11301130
'timeframe': {'required': True},
1131+
'dataset': {'required': True},
11311132
}
11321133

11331134
_attribute_map = {
@@ -1144,8 +1145,8 @@ def __init__(
11441145
*,
11451146
type: Union[str, "ForecastType"],
11461147
timeframe: Union[str, "ForecastTimeframeType"],
1148+
dataset: "QueryDataset",
11471149
time_period: Optional["QueryTimePeriod"] = None,
1148-
dataset: Optional["QueryDataset"] = None,
11491150
include_actual_cost: Optional[bool] = None,
11501151
include_fresh_partial_cost: Optional[bool] = None,
11511152
**kwargs
@@ -1392,7 +1393,7 @@ class QueryAggregation(msrest.serialization.Model):
13921393
:param name: Required. The name of the column to aggregate.
13931394
:type name: str
13941395
:param function: Required. The name of the aggregation function to use. Possible values
1395-
include: "Sum".
1396+
include: "Avg", "Max", "Min", "Sum".
13961397
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
13971398
"""
13981399

@@ -1499,7 +1500,8 @@ class QueryDataset(msrest.serialization.Model):
14991500
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
15001501
by clauses.
15011502
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1502-
:param filter: Has filter expression to use in the query.
1503+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1504+
documentation for how to properly format the filter.
15031505
:type filter: ~azure.mgmt.costmanagement.models.QueryFilter
15041506
"""
15051507

@@ -1548,7 +1550,8 @@ class QueryDatasetAutoGenerated(msrest.serialization.Model):
15481550
:param grouping: Array of group by expression to use in the query. Query can have up to 2 group
15491551
by clauses.
15501552
:type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping]
1551-
:param filter: Has filter expression to use in the query.
1553+
:param filter: The filter expression to use in the query. Please reference our Query API REST
1554+
documentation for how to properly format the filter.
15521555
:type filter: ~azure.mgmt.costmanagement.models.QueryFilterAutoGenerated
15531556
"""
15541557

@@ -1618,13 +1621,14 @@ class QueryDefinition(msrest.serialization.Model):
16181621
:type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType
16191622
:param time_period: Has time period for pulling data for the query.
16201623
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
1621-
:param dataset: Has definition for data in this query.
1624+
:param dataset: Required. Has definition for data in this query.
16221625
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
16231626
"""
16241627

16251628
_validation = {
16261629
'type': {'required': True},
16271630
'timeframe': {'required': True},
1631+
'dataset': {'required': True},
16281632
}
16291633

16301634
_attribute_map = {
@@ -1639,8 +1643,8 @@ def __init__(
16391643
*,
16401644
type: Union[str, "ExportType"],
16411645
timeframe: Union[str, "TimeframeType"],
1646+
dataset: "QueryDataset",
16421647
time_period: Optional["QueryTimePeriod"] = None,
1643-
dataset: Optional["QueryDataset"] = None,
16441648
**kwargs
16451649
):
16461650
super(QueryDefinition, self).__init__(**kwargs)
@@ -1875,7 +1879,7 @@ class ReportConfigAggregation(msrest.serialization.Model):
18751879
:param name: Required. The name of the column to aggregate.
18761880
:type name: str
18771881
:param function: Required. The name of the aggregation function to use. Possible values
1878-
include: "Sum".
1882+
include: "Avg", "Max", "Min", "Sum".
18791883
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
18801884
"""
18811885

0 commit comments

Comments
 (0)