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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 48 additions & 6 deletions
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

Lines changed: 5 additions & 4 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)