Skip to content

Commit

Permalink
Merge pull request #2 from Azure/main
Browse files Browse the repository at this point in the history
Update 6/21
  • Loading branch information
BigCat20196 authored Jun 21, 2021
2 parents f1aeb2f + ff778a6 commit 89cb1ee
Show file tree
Hide file tree
Showing 1,483 changed files with 101,412 additions and 565,527 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
# PRLabel: %Monitor - Exporter
/sdk/monitor/azure-monitor-opentelemetry-exporter @rakshith91 @lmazuel @lzchen

# PRLabel: %Monitor - Log
/sdk/monitor/azure-monitor-query @rakshith91

# PRLabel: %Consumption
/sdk/consumption/ @sandeepnl

Expand Down
2 changes: 1 addition & 1 deletion doc/dev/mgmt/generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ autorest readme.md --python --use="@microsoft.azure/autorest.python@~4.0.71" --p

Which means "Generate the Python code for the Swagger mentioned in this readme, using autorest for Pyton v4.0.71 or above (but not v5), do not generate async files, generate multiapi if supported (if not ignore), and assume the package was already generated and it's an update"

In pratical terms, this is not necessary since the Python SDK has the necessary tooling to simplify to just specify the readme.md:
In practical terms, this is not necessary since the Python SDK has the necessary tooling to simplify to just specify the readme.md:

- Checkout the branch
- Checkout the RestAPI specs repo
Expand Down
1 change: 1 addition & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ known_content_issues:
- ['sdk/core/azure-servicemanagement-legacy/README.md', '#4554']
- ['sdk/eventgrid/azure-eventgrid/README.md', '#4554']
- ['sdk/monitor/azure-monitor-query/README.md', '#4554']
- ['sdk/monitor/azure-monitor-query/samples/README.md', '#4554']
- ['sdk/graphrbac/azure-graphrbac/README.md', '#4554']
- ['sdk/loganalytics/azure-loganalytics/README.md', '#4554']
- ['sdk/servicebus/azure-servicebus/README.md', '#4554']
Expand Down
4 changes: 2 additions & 2 deletions eng/common/pipelines/templates/steps/set-default-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ steps:
- pwsh: |
$setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'
if ($LASTEXITCODE -ne 0) {
Write-Host "Not able to fetch the default branch from git command. Set to master."
$setDefaultBranch = 'master'
Write-Host "Not able to fetch the default branch from git command. Set to main."
$setDefaultBranch = 'main'
}
Write-Host "Setting DefaultBranch=$setDefaultBranch"
Write-Host "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch"
Expand Down
54 changes: 48 additions & 6 deletions eng/common/scripts/ChangeLog-Operations.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,45 @@ function Get-ChangeLogEntriesFromContent {
return $null
}

$changelogEntry = $null
$sectionName = $null
$changeLogEntries = [Ordered]@{}
try {
# walk the document, finding where the version specifiers are and creating lists
$changeLogEntry = $null
foreach ($line in $changeLogContent) {
if ($line -match $RELEASE_TITLE_REGEX) {
$changeLogEntry = [pscustomobject]@{
$changeLogEntry = [pscustomobject]@{
ReleaseVersion = $matches["version"]
ReleaseStatus = $matches["releaseStatus"]
ReleaseTitle = "## {0} {1}" -f $matches["version"], $matches["releaseStatus"]
ReleaseContent = @()
Sections = @{}
}
$changeLogEntries[$changeLogEntry.ReleaseVersion] = $changeLogEntry
}
else {
if ($changeLogEntry) {
if ($line.Trim() -match "^###\s(?<sectionName>.*)")
{
$sectionName = $matches["sectionName"].Trim()
$changeLogEntry.Sections[$sectionName] = @()
$changeLogEntry.ReleaseContent += $line
continue
}

if ($sectionName)
{
$changeLogEntry.Sections[$sectionName] += $line
}

$changeLogEntry.ReleaseContent += $line
}
}
}
}
catch {
Write-Host "Error parsing Changelog."
Write-Host $_.Exception.Message
Write-Error "Error parsing Changelog."
Write-Error $_
}
return $changeLogEntries
}
Expand Down Expand Up @@ -160,6 +175,21 @@ function Confirm-ChangeLogEntry {
LogError "Entry has no content. Please ensure to provide some content of what changed in this version."
return $false
}

$emptySections = @()
foreach ($key in $changeLogEntry.Sections.Keys)
{
$sectionContent = $changeLogEntry.Sections[$key]
if ([System.String]::IsNullOrWhiteSpace(($sectionContent | Out-String)))
{
$emptySections += $key
}
}
if ($emptySections.Count -gt 0)
{
LogError "The changelog entry has the following sections with no content ($($emptySections -join ', ')). Please ensure to either remove the empty sections or add content to the section."
return $false
}
}
return $true
}
Expand Down Expand Up @@ -195,9 +225,21 @@ function New-ChangeLogEntry {
return $null
}

if (!$Content) { $Content = @() }
if (!$Content) {
$Content = @()
$Content += ""
$Content += "### Features Added"
$Content += ""
$Content += "### Breaking Changes"
$Content += ""
$Content += "### Key Bugs Fixed"
$Content += ""
$Content += "### Fixed"
$Content += ""
$Content += ""
}

$newChangeLogEntry = [pscustomobject]@{
$newChangeLogEntry = [pscustomobject]@{
ReleaseVersion = $Version
ReleaseStatus = $Status
ReleaseTitle = "## $Version $Status"
Expand Down
9 changes: 5 additions & 4 deletions eng/common/scripts/Update-ChangeLog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ param (
[String]$ChangelogPath,
[String]$ReleaseDate
)
Set-StrictMode -Version 3

. (Join-Path $PSScriptRoot common.ps1)

Expand All @@ -39,11 +40,11 @@ if ($ReleaseDate)
exit 1
}
}
elseif ($Unreleased)
elseif ($Unreleased)
{
$ReleaseStatus = $CHANGELOG_UNRELEASED_STATUS
}
else
else
{
$ReleaseStatus = "$(Get-Date -Format $CHANGELOG_DATE_FORMAT)"
$ReleaseStatus = "($ReleaseStatus)"
Expand All @@ -61,7 +62,7 @@ if ([string]::IsNullOrEmpty($ChangelogPath))
$ChangelogPath = $pkgProperties.ChangeLogPath
}

if (!(Test-Path $ChangelogPath))
if (!(Test-Path $ChangelogPath))
{
LogError "Changelog path [$ChangelogPath] is invalid."
exit 1
Expand Down Expand Up @@ -103,7 +104,7 @@ if ($LatestsSorted[0] -ne $Version) {
LogWarning "Version [$Version] is older than the latestversion [$LatestVersion] in the changelog. Consider using a more recent version."
}

if ($ReplaceLatestEntryTitle)
if ($ReplaceLatestEntryTitle)
{
$newChangeLogEntry = New-ChangeLogEntry -Version $Version -Status $ReleaseStatus -Content $ChangeLogEntries[$LatestVersion].ReleaseContent
LogDebug "Resetting latest entry title to [$($newChangeLogEntry.ReleaseTitle)]"
Expand Down
3 changes: 2 additions & 1 deletion eng/common/scripts/Verify-ChangeLog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ param (
[string]$ServiceDirectory,
[boolean]$ForRelease = $False
)
Set-StrictMode -Version 3

. (Join-Path $PSScriptRoot common.ps1)

$validChangeLog = $false
if ($ChangeLogLocation -and $VersionString)
if ($ChangeLogLocation -and $VersionString)
{
$validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $ChangeLogLocation -VersionString $VersionString -ForRelease $ForRelease
}
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ param (

. (Join-Path $PSScriptRoot common.ps1)

$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)master"
$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)main"

function GetMetaData {
if (Test-Path Variable:MetadataUri) {
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/autorest_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
displayName: 'Run AutoRest'

pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'

steps:
- task: NodeTool@0
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/generate-all-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
timeoutInMinutes: 120

pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'

steps:
- task: UsePythonVersion@0
Expand Down
10 changes: 10 additions & 0 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ parameters:
- name: TestMarkArgument
type: string
default: ''
- name: BeforeTestSteps
type: object
default: []
- name: AfterTestSteps
type: object
default: []
- name: BuildTargetingString
type: string
default: 'azure-*'
Expand Down Expand Up @@ -110,3 +116,7 @@ jobs:
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- ${{ each step in parameters.BeforeTestSteps }}:
- ${{ step }}
AfterTestSteps: ${{ parameters.AfterTestSteps }}
20 changes: 14 additions & 6 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ parameters:
- name: TestMarkArgument
type: string
default: ''
- name: BeforeTestSteps
type: object
default: []
- name: AfterTestSteps
type: object
default: []
- name: BuildTargetingString
type: string
default: 'azure-*'
Expand Down Expand Up @@ -54,8 +60,8 @@ jobs:
- template: ../variables/globals.yml

pool:
name: azsdk-pool-mms-ubuntu-1804-general
vmImage: MMSUbuntu18.04
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04

steps:
- template: ../steps/build-artifacts.yml
Expand All @@ -82,8 +88,8 @@ jobs:
- 'Build'

pool:
name: azsdk-pool-mms-ubuntu-1804-general
vmImage: MMSUbuntu18.04
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04

steps:
- template: /eng/common/pipelines/templates/steps/check-spelling.yml
Expand Down Expand Up @@ -121,6 +127,8 @@ jobs:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestPipeline: ${{ parameters.TestPipeline }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}
BeforeTestSteps: ${{ parameters.BeforeTestSteps }}
AfterTestSteps: ${{ parameters.AfterTestSteps }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
ToxEnvParallel: ${{ parameters.ToxEnvParallel }}
Expand Down Expand Up @@ -160,8 +168,8 @@ jobs:
- 'Build'

pool:
name: azsdk-pool-mms-ubuntu-1804-general
vmImage: MMSUbuntu18.04
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04

steps:
- template: ../steps/test_regression.yml
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/publish-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ parameters:
jobs:
- job: Publish_Code_Coverage
pool:
name: azsdk-pool-mms-ubuntu-1804-general
vmImage: MMSUbuntu18.04
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04

steps:
- task: UsePythonVersion@0
Expand Down
36 changes: 18 additions & 18 deletions eng/pipelines/templates/jobs/smoke.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,26 @@ jobs:
Python_27_Linux (AzureCloud):
PythonVersion: '2.7'
SkipAsyncInstall: true
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Linux (AzureCloud):
PythonVersion: '3.7'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureCloud):
PythonVersion: '3.8'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureCloud Canary):
PythonVersion: '3.8'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
ArmTemplateParameters: $(azureCloudArmParameters)
Location: 'eastus2euap'
Expand All @@ -74,8 +74,8 @@ jobs:
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Windows (AzureCloud):
PythonVersion: '3.8'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Mac (AzureCloud):
Expand All @@ -92,27 +92,27 @@ jobs:
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureUSGovernment):
PythonVersion: '3.8'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu120.04"
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Python_37_Windows (AzureUSGovernment):
PythonVersion: '3.7'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Python_38_Linux (AzureChinaCloud):
PythonVersion: '3.8'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-cn-test-resources)
Location: 'chinanorth'
ArmTemplateParameters: $(azureChinaCloudArmParameters)
Python_37_Windows (AzureChinaCloud):
PythonVersion: '3.7'
Pool: "azsdk-pool-mms-ubuntu-1804-general"
OSVmImage: "MMSUbuntu18.04"
Pool: "azsdk-pool-mms-ubuntu-2004-general"
OSVmImage: "MMSUbuntu20.04"
SubscriptionConfiguration: $(sub-config-cn-test-resources)
Location: 'chinanorth'
ArmTemplateParameters: $(azureChinaCloudArmParameters)
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/tests-nightly-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
timeoutInMinutes: 90

pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'

steps:
- task: UsePythonVersion@0
Expand Down
Loading

0 comments on commit 89cb1ee

Please sign in to comment.