Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into switch_to_rest

* '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)
  • Loading branch information
iscai-msft committed Aug 25, 2021
2 parents 329d01b + 37cb22c commit c71823c
Show file tree
Hide file tree
Showing 300 changed files with 61,835 additions and 4,909 deletions.
2 changes: 2 additions & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ omitted_paths:
- sdk/identity/azure-identity/tests/*
- sdk/**/tests/perfstress_tests/*
- sdk/nspkg/*
- sdk/**/swagger/*

language: python
root_check_enabled: True
Expand Down Expand Up @@ -91,6 +92,7 @@ known_content_issues:
- ['sdk/purview/azure-purview-catalog/swagger/README.md',  '#4554']
- ['sdk/purview/azure-purview-scanning/swagger/README.md',  '#4554']
- ['sdk/agrifood/azure-agrifood-farming/swagger/README.md',  '#4554']
- ['sdk/purview/azure-purview-account/swagger/README.md', '#4554']
- ['sdk/containerregistry/azure-containerregistry/swagger/README.md', '#4554']
- ['sdk/appconfiguration/azure-appconfiguration/swagger/README.md', '#4554']
- ['sdk/attestation/azure-security-attestation/swagger/README.md', '#4554']
Expand Down
31 changes: 17 additions & 14 deletions eng/common/scripts/stress-testing/deploy-stress-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ $ErrorActionPreference = 'Stop'
. $PSScriptRoot/find-all-stress-packages.ps1
$FailedCommands = New-Object Collections.Generic.List[hashtable]

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

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

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

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

if ($pushImages) {
$registry = (az acr list -g $clusterGroup -o json | ConvertFrom-Json).name
RunOrExitOnFailure az acr login -n $registry
$registry = RunOrExitOnFailure az acr list -g $clusterGroup --subscription $subscription -o json
$registryName = ($registry | ConvertFrom-Json).name
RunOrExitOnFailure az acr login -n $registryName
}
}

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

Run helm dependency update $pkg.Directory
if ($LASTEXITCODE) { return }
Expand All @@ -133,7 +133,7 @@ function DeployStressPackage(
if (!$imageName) {
$imageName = $dockerFile.Directory.Name
}
$imageTag = "${registry}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
$imageTag = "${registryName}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
Write-Host "Building and pushing stress test docker image '$imageTag'"
Run docker build -t $imageTag -f $dockerFile.FullName $dockerFile.DirectoryName
if ($LASTEXITCODE) { return }
Expand All @@ -154,7 +154,7 @@ function DeployStressPackage(
Run helm upgrade $pkg.ReleaseName $pkg.Directory `
-n $pkg.Namespace `
--install `
--set repository=$registry.azurecr.io/$repository `
--set repository=$registryName.azurecr.io/$repository `
--set tag=$deployId `
--set stress-test-addons.env=$environment
if ($LASTEXITCODE) {
Expand All @@ -176,4 +176,7 @@ function DeployStressPackage(
Run kubectl label secret -n $pkg.Namespace --overwrite $helmReleaseConfig deployId=$deployId
}

DeployStressTests @PSBoundParameters
# Don't call functions when the script is being dot sourced
if ($MyInvocation.InvocationName -ne ".") {
DeployStressTests @PSBoundParameters
}
1 change: 1 addition & 0 deletions eng/tox/allowed_pylint_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"azure-purview-nspkg",
"azure-purview-scanning",
"azure-purview-catalog",
"azure-purview-account",
"azure-messaging-nspkg",
"azure-agrifood-farming",
"azure-eventhub",
Expand Down
2 changes: 2 additions & 0 deletions scripts/devops_tasks/test_run_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
"sample_list_translations_with_filters_async.py",
"sample_list_document_statuses_with_filters.py",
"sample_list_translations_with_filters.py",
"sample_translation_with_custom_model.py",
"sample_translation_with_custom_model_async.py",
]
}

Expand Down
7 changes: 7 additions & 0 deletions sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 3.0.0 (2021-07-27)

**Breaking changes**

- Parameter dataset of model QueryDefinition is now required
- Parameter dataset of model ForecastDefinition is now required

## 2.0.0 (2021-06-08)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/costmanagement/azure-mgmt-costmanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.2",
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.0",
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "67528b3e539b96ccaaf82c360f5715184e467e21",
"commit": "74efe54fbc55c91a1d9213afbb2723747acfddf9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
"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/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/cost-management/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "3.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ class FunctionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The name of the aggregation function to use.
"""

AVG = "Avg"
MAX = "Max"
MIN = "Min"
SUM = "Sum"

class GranularityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ class ForecastDefinition(msrest.serialization.Model):
:type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType
:param time_period: Has time period for pulling data for the forecast.
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
:param dataset: Has definition for data in this forecast.
:param dataset: Required. Has definition for data in this forecast.
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
:param include_actual_cost: a boolean determining if actualCost will be included.
:type include_actual_cost: bool
Expand All @@ -1023,6 +1023,7 @@ class ForecastDefinition(msrest.serialization.Model):
_validation = {
'type': {'required': True},
'timeframe': {'required': True},
'dataset': {'required': True},
}

_attribute_map = {
Expand All @@ -1042,7 +1043,7 @@ def __init__(
self.type = kwargs['type']
self.timeframe = kwargs['timeframe']
self.time_period = kwargs.get('time_period', None)
self.dataset = kwargs.get('dataset', None)
self.dataset = kwargs['dataset']
self.include_actual_cost = kwargs.get('include_actual_cost', None)
self.include_fresh_partial_cost = kwargs.get('include_fresh_partial_cost', None)

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

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

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

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

_validation = {
'type': {'required': True},
'timeframe': {'required': True},
'dataset': {'required': True},
}

_attribute_map = {
Expand All @@ -1493,7 +1497,7 @@ def __init__(
self.type = kwargs['type']
self.timeframe = kwargs['timeframe']
self.time_period = kwargs.get('time_period', None)
self.dataset = kwargs.get('dataset', None)
self.dataset = kwargs['dataset']


class QueryFilter(msrest.serialization.Model):
Expand Down Expand Up @@ -1700,7 +1704,7 @@ class ReportConfigAggregation(msrest.serialization.Model):
:param name: Required. The name of the column to aggregate.
:type name: str
:param function: Required. The name of the aggregation function to use. Possible values
include: "Sum".
include: "Avg", "Max", "Min", "Sum".
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ class ForecastDefinition(msrest.serialization.Model):
:type timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframeType
:param time_period: Has time period for pulling data for the forecast.
:type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod
:param dataset: Has definition for data in this forecast.
:param dataset: Required. Has definition for data in this forecast.
:type dataset: ~azure.mgmt.costmanagement.models.QueryDataset
:param include_actual_cost: a boolean determining if actualCost will be included.
:type include_actual_cost: bool
Expand All @@ -1128,6 +1128,7 @@ class ForecastDefinition(msrest.serialization.Model):
_validation = {
'type': {'required': True},
'timeframe': {'required': True},
'dataset': {'required': True},
}

_attribute_map = {
Expand All @@ -1144,8 +1145,8 @@ def __init__(
*,
type: Union[str, "ForecastType"],
timeframe: Union[str, "ForecastTimeframeType"],
dataset: "QueryDataset",
time_period: Optional["QueryTimePeriod"] = None,
dataset: Optional["QueryDataset"] = None,
include_actual_cost: Optional[bool] = None,
include_fresh_partial_cost: Optional[bool] = None,
**kwargs
Expand Down Expand Up @@ -1392,7 +1393,7 @@ class QueryAggregation(msrest.serialization.Model):
:param name: Required. The name of the column to aggregate.
:type name: str
:param function: Required. The name of the aggregation function to use. Possible values
include: "Sum".
include: "Avg", "Max", "Min", "Sum".
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
"""

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

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

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

_validation = {
'type': {'required': True},
'timeframe': {'required': True},
'dataset': {'required': True},
}

_attribute_map = {
Expand All @@ -1639,8 +1643,8 @@ def __init__(
*,
type: Union[str, "ExportType"],
timeframe: Union[str, "TimeframeType"],
dataset: "QueryDataset",
time_period: Optional["QueryTimePeriod"] = None,
dataset: Optional["QueryDataset"] = None,
**kwargs
):
super(QueryDefinition, self).__init__(**kwargs)
Expand Down Expand Up @@ -1875,7 +1879,7 @@ class ReportConfigAggregation(msrest.serialization.Model):
:param name: Required. The name of the column to aggregate.
:type name: str
:param function: Required. The name of the aggregation function to use. Possible values
include: "Sum".
include: "Avg", "Max", "Min", "Sum".
:type function: str or ~azure.mgmt.costmanagement.models.FunctionType
"""

Expand Down
22 changes: 22 additions & 0 deletions sdk/datamigration/azure-mgmt-datamigration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Release History

## 10.0.0 (2021-08-19)

**Features**

- Model ConnectToTargetAzureDbForMySqlTaskInput has a new parameter is_offline_migration
- Model MySqlConnectionInfo has a new parameter encrypt_connection
- Model TrackedResource has a new parameter system_data
- Model Project has a new parameter system_data
- Model ApiError has a new parameter system_data
- Model ProjectFile has a new parameter system_data
- Model DataMigrationService has a new parameter system_data
- Model ConnectToSourceMySqlTaskInput has a new parameter is_offline_migration
- Model ProjectTask has a new parameter system_data

**Breaking changes**

- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputError is now required
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutput is now required
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel is now required
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel is now required
- Parameter result_type of model MigrateSchemaSqlTaskOutputError is now required

## 9.0.0 (2021-04-07)

**Features**
Expand Down
1 change: 1 addition & 0 deletions sdk/datamigration/azure-mgmt-datamigration/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
11 changes: 11 additions & 0 deletions sdk/datamigration/azure-mgmt-datamigration/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "850425353115aa23d469f12f44847ff9e8326294",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/datamigration/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/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/datamigration/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-07-15-preview"
self.api_version = "2021-06-30"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit c71823c

Please sign in to comment.