Skip to content

Commit 89cb1ee

Browse files
authored
Merge pull request #2 from Azure/main
Update 6/21
2 parents f1aeb2f + ff778a6 commit 89cb1ee

File tree

1,483 files changed

+101412
-565527
lines changed

Some content is hidden

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

1,483 files changed

+101412
-565527
lines changed

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
# PRLabel: %Monitor - Exporter
5050
/sdk/monitor/azure-monitor-opentelemetry-exporter @rakshith91 @lmazuel @lzchen
5151

52+
# PRLabel: %Monitor - Log
53+
/sdk/monitor/azure-monitor-query @rakshith91
54+
5255
# PRLabel: %Consumption
5356
/sdk/consumption/ @sandeepnl
5457

doc/dev/mgmt/generation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ autorest readme.md --python --use="@microsoft.azure/autorest.python@~4.0.71" --p
3333

3434
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"
3535

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

3838
- Checkout the branch
3939
- Checkout the RestAPI specs repo

eng/.docsettings.yml

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ known_content_issues:
7070
- ['sdk/core/azure-servicemanagement-legacy/README.md', '#4554']
7171
- ['sdk/eventgrid/azure-eventgrid/README.md', '#4554']
7272
- ['sdk/monitor/azure-monitor-query/README.md', '#4554']
73+
- ['sdk/monitor/azure-monitor-query/samples/README.md', '#4554']
7374
- ['sdk/graphrbac/azure-graphrbac/README.md', '#4554']
7475
- ['sdk/loganalytics/azure-loganalytics/README.md', '#4554']
7576
- ['sdk/servicebus/azure-servicebus/README.md', '#4554']

eng/common/pipelines/templates/steps/set-default-branch.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ steps:
55
- pwsh: |
66
$setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'
77
if ($LASTEXITCODE -ne 0) {
8-
Write-Host "Not able to fetch the default branch from git command. Set to master."
9-
$setDefaultBranch = 'master'
8+
Write-Host "Not able to fetch the default branch from git command. Set to main."
9+
$setDefaultBranch = 'main'
1010
}
1111
Write-Host "Setting DefaultBranch=$setDefaultBranch"
1212
Write-Host "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch"

eng/common/scripts/ChangeLog-Operations.ps1

+48-6
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,45 @@ function Get-ChangeLogEntriesFromContent {
3737
return $null
3838
}
3939

40+
$changelogEntry = $null
41+
$sectionName = $null
4042
$changeLogEntries = [Ordered]@{}
4143
try {
4244
# walk the document, finding where the version specifiers are and creating lists
43-
$changeLogEntry = $null
4445
foreach ($line in $changeLogContent) {
4546
if ($line -match $RELEASE_TITLE_REGEX) {
46-
$changeLogEntry = [pscustomobject]@{
47+
$changeLogEntry = [pscustomobject]@{
4748
ReleaseVersion = $matches["version"]
4849
ReleaseStatus = $matches["releaseStatus"]
4950
ReleaseTitle = "## {0} {1}" -f $matches["version"], $matches["releaseStatus"]
5051
ReleaseContent = @()
52+
Sections = @{}
5153
}
5254
$changeLogEntries[$changeLogEntry.ReleaseVersion] = $changeLogEntry
5355
}
5456
else {
5557
if ($changeLogEntry) {
58+
if ($line.Trim() -match "^###\s(?<sectionName>.*)")
59+
{
60+
$sectionName = $matches["sectionName"].Trim()
61+
$changeLogEntry.Sections[$sectionName] = @()
62+
$changeLogEntry.ReleaseContent += $line
63+
continue
64+
}
65+
66+
if ($sectionName)
67+
{
68+
$changeLogEntry.Sections[$sectionName] += $line
69+
}
70+
5671
$changeLogEntry.ReleaseContent += $line
5772
}
5873
}
5974
}
6075
}
6176
catch {
62-
Write-Host "Error parsing Changelog."
63-
Write-Host $_.Exception.Message
77+
Write-Error "Error parsing Changelog."
78+
Write-Error $_
6479
}
6580
return $changeLogEntries
6681
}
@@ -160,6 +175,21 @@ function Confirm-ChangeLogEntry {
160175
LogError "Entry has no content. Please ensure to provide some content of what changed in this version."
161176
return $false
162177
}
178+
179+
$emptySections = @()
180+
foreach ($key in $changeLogEntry.Sections.Keys)
181+
{
182+
$sectionContent = $changeLogEntry.Sections[$key]
183+
if ([System.String]::IsNullOrWhiteSpace(($sectionContent | Out-String)))
184+
{
185+
$emptySections += $key
186+
}
187+
}
188+
if ($emptySections.Count -gt 0)
189+
{
190+
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."
191+
return $false
192+
}
163193
}
164194
return $true
165195
}
@@ -195,9 +225,21 @@ function New-ChangeLogEntry {
195225
return $null
196226
}
197227

198-
if (!$Content) { $Content = @() }
228+
if (!$Content) {
229+
$Content = @()
230+
$Content += ""
231+
$Content += "### Features Added"
232+
$Content += ""
233+
$Content += "### Breaking Changes"
234+
$Content += ""
235+
$Content += "### Key Bugs Fixed"
236+
$Content += ""
237+
$Content += "### Fixed"
238+
$Content += ""
239+
$Content += ""
240+
}
199241

200-
$newChangeLogEntry = [pscustomobject]@{
242+
$newChangeLogEntry = [pscustomobject]@{
201243
ReleaseVersion = $Version
202244
ReleaseStatus = $Status
203245
ReleaseTitle = "## $Version $Status"

eng/common/scripts/Update-ChangeLog.ps1

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ param (
1515
[String]$ChangelogPath,
1616
[String]$ReleaseDate
1717
)
18+
Set-StrictMode -Version 3
1819

1920
. (Join-Path $PSScriptRoot common.ps1)
2021

@@ -39,11 +40,11 @@ if ($ReleaseDate)
3940
exit 1
4041
}
4142
}
42-
elseif ($Unreleased)
43+
elseif ($Unreleased)
4344
{
4445
$ReleaseStatus = $CHANGELOG_UNRELEASED_STATUS
4546
}
46-
else
47+
else
4748
{
4849
$ReleaseStatus = "$(Get-Date -Format $CHANGELOG_DATE_FORMAT)"
4950
$ReleaseStatus = "($ReleaseStatus)"
@@ -61,7 +62,7 @@ if ([string]::IsNullOrEmpty($ChangelogPath))
6162
$ChangelogPath = $pkgProperties.ChangeLogPath
6263
}
6364

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

106-
if ($ReplaceLatestEntryTitle)
107+
if ($ReplaceLatestEntryTitle)
107108
{
108109
$newChangeLogEntry = New-ChangeLogEntry -Version $Version -Status $ReleaseStatus -Content $ChangeLogEntries[$LatestVersion].ReleaseContent
109110
LogDebug "Resetting latest entry title to [$($newChangeLogEntry.ReleaseTitle)]"

eng/common/scripts/Verify-ChangeLog.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ param (
66
[string]$ServiceDirectory,
77
[boolean]$ForRelease = $False
88
)
9+
Set-StrictMode -Version 3
910

1011
. (Join-Path $PSScriptRoot common.ps1)
1112

1213
$validChangeLog = $false
13-
if ($ChangeLogLocation -and $VersionString)
14+
if ($ChangeLogLocation -and $VersionString)
1415
{
1516
$validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $ChangeLogLocation -VersionString $VersionString -ForRelease $ForRelease
1617
}

eng/common/scripts/update-docs-metadata.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ param (
2424

2525
. (Join-Path $PSScriptRoot common.ps1)
2626

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

2929
function GetMetaData {
3030
if (Test-Path Variable:MetadataUri) {

eng/pipelines/autorest_checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
displayName: 'Run AutoRest'
2828

2929
pool:
30-
vmImage: 'ubuntu-18.04'
30+
vmImage: 'ubuntu-20.04'
3131

3232
steps:
3333
- task: NodeTool@0

eng/pipelines/generate-all-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
timeoutInMinutes: 120
1313

1414
pool:
15-
vmImage: 'ubuntu-18.04'
15+
vmImage: 'ubuntu-20.04'
1616

1717
steps:
1818
- task: UsePythonVersion@0

eng/pipelines/templates/jobs/ci.tests.yml

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ parameters:
88
- name: TestMarkArgument
99
type: string
1010
default: ''
11+
- name: BeforeTestSteps
12+
type: object
13+
default: []
14+
- name: AfterTestSteps
15+
type: object
16+
default: []
1117
- name: BuildTargetingString
1218
type: string
1319
default: 'azure-*'
@@ -110,3 +116,7 @@ jobs:
110116
parameters:
111117
ServiceDirectory: ${{ parameters.ServiceDirectory }}
112118
BuildTargetingString: ${{ parameters.BuildTargetingString }}
119+
120+
- ${{ each step in parameters.BeforeTestSteps }}:
121+
- ${{ step }}
122+
AfterTestSteps: ${{ parameters.AfterTestSteps }}

eng/pipelines/templates/jobs/ci.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ parameters:
1717
- name: TestMarkArgument
1818
type: string
1919
default: ''
20+
- name: BeforeTestSteps
21+
type: object
22+
default: []
23+
- name: AfterTestSteps
24+
type: object
25+
default: []
2026
- name: BuildTargetingString
2127
type: string
2228
default: 'azure-*'
@@ -54,8 +60,8 @@ jobs:
5460
- template: ../variables/globals.yml
5561

5662
pool:
57-
name: azsdk-pool-mms-ubuntu-1804-general
58-
vmImage: MMSUbuntu18.04
63+
name: azsdk-pool-mms-ubuntu-2004-general
64+
vmImage: MMSUbuntu20.04
5965

6066
steps:
6167
- template: ../steps/build-artifacts.yml
@@ -82,8 +88,8 @@ jobs:
8288
- 'Build'
8389

8490
pool:
85-
name: azsdk-pool-mms-ubuntu-1804-general
86-
vmImage: MMSUbuntu18.04
91+
name: azsdk-pool-mms-ubuntu-2004-general
92+
vmImage: MMSUbuntu20.04
8793

8894
steps:
8995
- template: /eng/common/pipelines/templates/steps/check-spelling.yml
@@ -121,6 +127,8 @@ jobs:
121127
ServiceDirectory: ${{ parameters.ServiceDirectory }}
122128
TestPipeline: ${{ parameters.TestPipeline }}
123129
TestMarkArgument: ${{ parameters.TestMarkArgument }}
130+
BeforeTestSteps: ${{ parameters.BeforeTestSteps }}
131+
AfterTestSteps: ${{ parameters.AfterTestSteps }}
124132
BuildTargetingString: ${{ parameters.BuildTargetingString }}
125133
TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
126134
ToxEnvParallel: ${{ parameters.ToxEnvParallel }}
@@ -160,8 +168,8 @@ jobs:
160168
- 'Build'
161169

162170
pool:
163-
name: azsdk-pool-mms-ubuntu-1804-general
164-
vmImage: MMSUbuntu18.04
171+
name: azsdk-pool-mms-ubuntu-2004-general
172+
vmImage: MMSUbuntu20.04
165173

166174
steps:
167175
- template: ../steps/test_regression.yml

eng/pipelines/templates/jobs/publish-coverage.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ parameters:
1313
jobs:
1414
- job: Publish_Code_Coverage
1515
pool:
16-
name: azsdk-pool-mms-ubuntu-1804-general
17-
vmImage: MMSUbuntu18.04
16+
name: azsdk-pool-mms-ubuntu-2004-general
17+
vmImage: MMSUbuntu20.04
1818

1919
steps:
2020
- task: UsePythonVersion@0

eng/pipelines/templates/jobs/smoke.tests.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,26 @@ jobs:
4343
Python_27_Linux (AzureCloud):
4444
PythonVersion: '2.7'
4545
SkipAsyncInstall: true
46-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
47-
OSVmImage: "MMSUbuntu18.04"
46+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
47+
OSVmImage: "MMSUbuntu20.04"
4848
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
4949
ArmTemplateParameters: $(azureCloudArmParameters)
5050
Python_37_Linux (AzureCloud):
5151
PythonVersion: '3.7'
52-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
53-
OSVmImage: "MMSUbuntu18.04"
52+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
53+
OSVmImage: "MMSUbuntu20.04"
5454
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
5555
ArmTemplateParameters: $(azureCloudArmParameters)
5656
Python_38_Linux (AzureCloud):
5757
PythonVersion: '3.8'
58-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
59-
OSVmImage: "MMSUbuntu18.04"
58+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
59+
OSVmImage: "MMSUbuntu20.04"
6060
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
6161
ArmTemplateParameters: $(azureCloudArmParameters)
6262
Python_38_Linux (AzureCloud Canary):
6363
PythonVersion: '3.8'
64-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
65-
OSVmImage: "MMSUbuntu18.04"
64+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
65+
OSVmImage: "MMSUbuntu20.04"
6666
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
6767
ArmTemplateParameters: $(azureCloudArmParameters)
6868
Location: 'eastus2euap'
@@ -74,8 +74,8 @@ jobs:
7474
ArmTemplateParameters: $(azureCloudArmParameters)
7575
Python_38_Windows (AzureCloud):
7676
PythonVersion: '3.8'
77-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
78-
OSVmImage: "MMSUbuntu18.04"
77+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
78+
OSVmImage: "MMSUbuntu20.04"
7979
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
8080
ArmTemplateParameters: $(azureCloudArmParameters)
8181
Python_37_Mac (AzureCloud):
@@ -92,27 +92,27 @@ jobs:
9292
ArmTemplateParameters: $(azureCloudArmParameters)
9393
Python_38_Linux (AzureUSGovernment):
9494
PythonVersion: '3.8'
95-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
96-
OSVmImage: "MMSUbuntu18.04"
95+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
96+
OSVmImage: "MMSUbuntu120.04"
9797
SubscriptionConfiguration: $(sub-config-gov-test-resources)
9898
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
9999
Python_37_Windows (AzureUSGovernment):
100100
PythonVersion: '3.7'
101-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
102-
OSVmImage: "MMSUbuntu18.04"
101+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
102+
OSVmImage: "MMSUbuntu20.04"
103103
SubscriptionConfiguration: $(sub-config-gov-test-resources)
104104
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
105105
Python_38_Linux (AzureChinaCloud):
106106
PythonVersion: '3.8'
107-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
108-
OSVmImage: "MMSUbuntu18.04"
107+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
108+
OSVmImage: "MMSUbuntu20.04"
109109
SubscriptionConfiguration: $(sub-config-cn-test-resources)
110110
Location: 'chinanorth'
111111
ArmTemplateParameters: $(azureChinaCloudArmParameters)
112112
Python_37_Windows (AzureChinaCloud):
113113
PythonVersion: '3.7'
114-
Pool: "azsdk-pool-mms-ubuntu-1804-general"
115-
OSVmImage: "MMSUbuntu18.04"
114+
Pool: "azsdk-pool-mms-ubuntu-2004-general"
115+
OSVmImage: "MMSUbuntu20.04"
116116
SubscriptionConfiguration: $(sub-config-cn-test-resources)
117117
Location: 'chinanorth'
118118
ArmTemplateParameters: $(azureChinaCloudArmParameters)

eng/pipelines/templates/jobs/tests-nightly-python.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
timeoutInMinutes: 90
1212

1313
pool:
14-
vmImage: 'ubuntu-18.04'
14+
vmImage: 'ubuntu-20.04'
1515

1616
steps:
1717
- task: UsePythonVersion@0

0 commit comments

Comments
 (0)