Skip to content

Commit 10a91fb

Browse files
m-nashY-Sindojsquireazure-sdkannelo-msft
authored
pull in feature/modelSerializer so ci proj ref legs are happy (#38710)
* Revert "update api" This reverts commit ae54d7d. * Revert "remove serialization" This reverts commit 748872b. * Release v1.11.1 (#38602) * [Event Hubs] September 2023 Release Prep (#38604) The focus of these changes is to prepare the core Event Hubs library for the September 2023 release. * Sync eng/common directory with azure-sdk-tools repository (#38606) * Don't allow setting Variant to Variant (#38592) * Don't allow setting Variant to Variant * pr fb * Allow As<T> to return null for reference types (#38611) * Allow As<T> to return null for reference types * Improve cast exception message * [Communication]Enable managed identity in ACScommunication resource sdk (#37566) * Update autorest mark down to latest OpenApi spec * initial code generation with new Swagger spec hash * remove bugged format and generate code * update spec link to remote link * Adding test scenario for MI * Update Export Api * Update to most recent spec hash * Update Sample Snippets * Add Managed Identity tests session records assets * Re-enforce resourceId format * updated test recording * updated recordings * updated-recordings * fix tests and Update test recordings * Update changelog release history * Provide backward compatibility to accomodate breaking change * remove param from fallback overload * Update customize folder with communication service resource data * fix build issues * fix build issues * export api to support older resource data * fix build issues * Update release date of `1.2.0-beta.2` --------- Co-authored-by: Joel Enikanorogbon <[email protected]> Co-authored-by: Jorge Beauregard <[email protected]> Co-authored-by: Mingzhe Huang <[email protected]> * Increment package version after release of Microsoft.Azure.WebJobs.Extensions.SignalRService (#38618) * Increment package version after release of Azure.ResourceManager.Communication (#38617) * Increment package version after release of Azure.Messaging.EventHubs (#38627) * [Event Hubs] September 2023 Release Prep (non-core) (#38605) The focus of these changes is to prepare the Event Hubs processor and function extensions libraries for the September 2023 release. * Remove circular shared source references in Azure.Core tests files (#38607) * Initial reshuffle * Second reshuffle * nits * fix * [SignalR extensions] Release v1.11.2 (#38623) * Release v1.11.2 * Fix test issue * STG 90 GA release prep (#38631) * Fix release date for Confidential Ledger (#38629) * Increment version for eventhub releases (#38632) * Increment package version after release of Microsoft.Azure.WebJobs.Extensions.EventHubs * Increment package version after release of Azure.Messaging.EventHubs.Processor * [AppConfig] Update API Compat version (#38628) The focus of these changes is to update the API Compat target after the 1.2.1 release. * Prepare for release (#38612) * Prepare for release * change log * Increment package version after release of Azure.Communication.JobRouter (#38641) * Increment version for storage releases (#38642) * revert some unexpected sample configuration changes (#38619) * Update AutoRest C# version to 3.0.0-beta.20230912.3 (#38653) * Increment package version after release of Azure.Security.ConfidentialLedger (#38644) * update version to patch (#38646) * Update dockerfile for net6.0 (#38645) * NonDisposingStream: delegate remaining Stream APIs to inner stream (#38184) * [App Config] Snapshot API Updates Based on Arch Board Feedback (#38650) [App Configuration] Updates in snapshot API * Fix casing on some events (#38674) * Legacy checkpoint support (#38546) * Sync eng/common directory with azure-sdk-tools for PR 6895 (#38672) * Add legacy moniker migration logic * Add functionality from Java testing --------- Co-authored-by: Daniel Jurek <[email protected]> * .NET-specific changes: Move deprecated packages to legacy (#36194) * First cut at migrating to legacy moniker * Update-PackageMonikers.ps1 * Refinement * Update docindex.yml for testing * Rename * ToC fixes * Refactor namespace discovery * Remove EnsureNamespaces * Add "legacy" moniker * Undo Service-Level-Readme-Automation.ps1 because it is generating incorrect package paths * Better edge case handling, documentation * Add fixes to service level overview generation * Reset eng/common * docindex changes * Comment cleanup * Fix ToC generation tests * Test cleanup * Remove unused <IncludeGeneratorSharedCode> MSBuild properties (#38648) * Remove <IncludeGeneratorSharedCode> MSBuild properties * revert personalizer * Increment package version after release of Azure.Messaging.EventGrid (#38682) * temp fix to release alpha package * update api * update code to not add new types * update code to internalize types * make model factory customer for now * update api * [Document Translation] Fix Document Translation README.md links (#38593) * Fix Document Translation README.md links * Remove extra whitespace and remove en-us from links * Revert mocking link change * Remove duplicate URL --------- Co-authored-by: Rango Meadows <[email protected]> * Prepare release for AppService (#38696) * [WebPubSub] Increase isolated package version and fix a few issues (#38692) * Increase isolated process package. * Fix title * Fixing scaler provider initialization pattern (#38673) * src, test, and samples projects for DataMovement.Files.Shares (#38678) * src, test, and samples projects for DataMovement.Files.Shares * placeholder readme * remove shared source * more csproj * blank changelog --------- Co-authored-by: yzt <[email protected]> Co-authored-by: Jesse Squire <[email protected]> Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Anne Thompson <[email protected]> Co-authored-by: Joel Eniqs <[email protected]> Co-authored-by: Joel Enikanorogbon <[email protected]> Co-authored-by: Jorge Beauregard <[email protected]> Co-authored-by: Mingzhe Huang <[email protected]> Co-authored-by: Sean McCullough <[email protected]> Co-authored-by: Christopher Scott <[email protected]> Co-authored-by: JoshLove-msft <[email protected]> Co-authored-by: Dapeng Zhang <[email protected]> Co-authored-by: Reuben Bond <[email protected]> Co-authored-by: ShivangiReja <[email protected]> Co-authored-by: Alexey Rodionov <[email protected]> Co-authored-by: Daniel Jurek <[email protected]> Co-authored-by: Matthew Meadows (Rango the Dog) <[email protected]> Co-authored-by: Rango Meadows <[email protected]> Co-authored-by: Wei Hu <[email protected]> Co-authored-by: JialinXin <[email protected]> Co-authored-by: Jocelyn <[email protected]>
1 parent f6b779d commit 10a91fb

File tree

345 files changed

+25420
-1154
lines changed

Some content is hidden

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

345 files changed

+25420
-1154
lines changed

Diff for: eng/Packages.Data.props

+5-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<PackageReference Update="Azure.Core.Expressions.DataFactory" Version="1.0.0-beta.4" />
9090
<PackageReference Update="Azure.Data.SchemaRegistry" Version="1.2.0" />
9191
<PackageReference Update="Azure.Data.Tables" Version="12.8.0" />
92-
<PackageReference Update="Azure.Messaging.EventHubs" Version="5.9.2" />
92+
<PackageReference Update="Azure.Messaging.EventHubs" Version="5.9.3" />
9393
<PackageReference Update="Azure.Messaging.EventGrid" Version="4.17.0" />
9494
<PackageReference Update="Azure.Messaging.ServiceBus" Version="7.16.0" />
9595
<PackageReference Update="Azure.Messaging.WebPubSub" Version="1.2.0" />
@@ -142,9 +142,9 @@
142142
<PackageReference Update="CloudNative.CloudEvents.SystemTextJson" Version="2.0.0" />
143143
<PackageReference Update="MessagePack" Version="1.9.11" />
144144
<PackageReference Update="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="1.1.5" />
145-
<PackageReference Update="Microsoft.Azure.SignalR" Version="1.21.4" />
146-
<PackageReference Update="Microsoft.Azure.SignalR.Management" Version="1.21.4" />
147-
<PackageReference Update="Microsoft.Azure.SignalR.Protocols" Version="1.21.4" />
145+
<PackageReference Update="Microsoft.Azure.SignalR" Version="1.21.6" />
146+
<PackageReference Update="Microsoft.Azure.SignalR.Management" Version="1.21.6" />
147+
<PackageReference Update="Microsoft.Azure.SignalR.Protocols" Version="1.21.6" />
148148
<PackageReference Update="Microsoft.Azure.SignalR.Serverless.Protocols" Version="1.9.0" />
149149
<PackageReference Update="Microsoft.Azure.WebJobs" Version="3.0.37" />
150150
<PackageReference Update="Microsoft.Azure.WebJobs.Sources" Version="3.0.37" />
@@ -174,7 +174,7 @@
174174
All should have PrivateAssets="All" set so they don't become package dependencies
175175
-->
176176
<ItemGroup>
177-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230907.2" PrivateAssets="All" />
177+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230912.3" PrivateAssets="All" />
178178
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230822.1" PrivateAssets="All" />
179179
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
180180
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" PrivateAssets="All" />

Diff for: eng/common/scripts/Service-Level-Readme-Automation.ps1

+34-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<#
22
.SYNOPSIS
3-
The script is to generate service level readme if it is missing.
3+
The script is to generate service level readme if it is missing.
44
For exist ones, we do 2 things here:
55
1. Generate the client but not import to the existing service level readme.
66
2. Update the metadata of service level readme
77
88
.DESCRIPTION
9-
Given a doc repo location, and the credential for fetching the ms.author.
9+
Given a doc repo location, and the credential for fetching the ms.author.
1010
Generate missing service level readme and updating metadata of the existing ones.
1111
1212
.PARAMETER DocRepoLocation
@@ -40,7 +40,10 @@ param(
4040
[string]$ClientSecret,
4141

4242
[Parameter(Mandatory = $false)]
43-
[string]$ReadmeFolderRoot = "docs-ref-services"
43+
[string]$ReadmeFolderRoot = "docs-ref-services",
44+
45+
[Parameter(Mandatory = $false)]
46+
[array]$Monikers = @('latest', 'preview', 'legacy')
4447
)
4548
. $PSScriptRoot/common.ps1
4649
. $PSScriptRoot/Helpers/Service-Level-Readme-Automation-Helpers.ps1
@@ -50,12 +53,11 @@ param(
5053
Set-StrictMode -Version 3
5154

5255
$fullMetadata = Get-CSVMetadata
53-
$monikers = @("latest", "preview")
54-
foreach($moniker in $monikers) {
56+
foreach($moniker in $Monikers) {
5557
# The onboarded packages return is key-value pair, which key is the package index, and value is the package info from {metadata}.json
56-
# E.g.
58+
# E.g.
5759
# Key as: @azure/storage-blob
58-
# Value as:
60+
# Value as:
5961
# {
6062
# "Name": "@azure/storage-blob",
6163
# "Version": "12.10.0-beta.1",
@@ -73,22 +75,38 @@ foreach($moniker in $monikers) {
7375
$onboardedPackages = &$GetOnboardedDocsMsPackagesForMonikerFn `
7476
-DocRepoLocation $DocRepoLocation -moniker $moniker
7577
$csvMetadata = @()
78+
7679
foreach($metadataEntry in $fullMetadata) {
7780
if ($metadataEntry.Package -and $metadataEntry.Hide -ne 'true') {
7881
$pkgKey = GetPackageKey $metadataEntry
79-
if($onboardedPackages.ContainsKey($pkgKey)) {
80-
if ($onboardedPackages[$pkgKey] -and $onboardedPackages[$pkgKey].DirectoryPath) {
81-
if (!($metadataEntry.PSObject.Members.Name -contains "DirectoryPath")) {
82-
Add-Member -InputObject $metadataEntry `
83-
-MemberType NoteProperty `
84-
-Name DirectoryPath `
85-
-Value $onboardedPackages[$pkgKey].DirectoryPath
86-
}
87-
}
82+
83+
if (!$onboardedPackages.ContainsKey($pkgKey)) {
84+
continue
85+
}
86+
87+
$package = $onboardedPackages[$pkgKey]
88+
89+
if (!$package) {
8890
$csvMetadata += $metadataEntry
91+
continue
8992
}
93+
94+
# If the metadata JSON entry has a DirectoryPath, but the CSV entry
95+
# does not, add the DirectoryPath to the CSV entry
96+
if (($package.PSObject.Members.Name -contains 'DirectoryPath') `
97+
-and !($metadataEntry.PSObject.Members.Name -contains "DirectoryPath") ) {
98+
99+
Add-Member -InputObject $metadataEntry `
100+
-MemberType NoteProperty `
101+
-Name DirectoryPath `
102+
-Value $package.DirectoryPath
103+
}
104+
105+
$csvMetadata += $metadataEntry
106+
90107
}
91108
}
109+
92110
$packagesForService = @{}
93111
$allPackages = GetPackageLookup $csvMetadata
94112
foreach ($metadataKey in $allPackages.Keys) {

Diff for: eng/common/scripts/Update-DocsMsPackageMonikers.ps1

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<#
2+
.SYNOPSIS
3+
Move metadata JSON and package-level overview markdown files for deprecated packages to the legacy folder.
4+
5+
.DESCRIPTION
6+
Move onboarding information to the "legacy" moniker for whose support is "deprecated" in the Metadata CSV.
7+
Only one version of a package can be documented in the "legacy" moniker. If multiple versions are available,
8+
the "latest" version will be used and the "preview" version will be deleted.
9+
10+
.PARAMETER DocRepoLocation
11+
The location of the target docs repository.
12+
#>
13+
14+
param(
15+
[Parameter(Mandatory = $true)]
16+
[string] $DocRepoLocation
17+
)
18+
19+
. (Join-Path $PSScriptRoot common.ps1)
20+
21+
Set-StrictMode -Version 3
22+
23+
function getPackageMetadata($moniker) {
24+
$jsonFiles = Get-ChildItem -Path (Join-Path $DocRepoLocation "metadata/$moniker") -Filter *.json
25+
$metadata = @{}
26+
27+
foreach ($jsonFile in $jsonFiles) {
28+
$packageMetadata = Get-Content $jsonFile -Raw | ConvertFrom-Json -AsHashtable
29+
$packageIdentity = $packageMetadata.Name
30+
if (Test-Path "Function:$GetPackageIdentity") {
31+
$packageIdentity = &$GetPackageIdentity $packageMetadata
32+
}
33+
34+
$metadata[$packageIdentity] = @{ File = $jsonFile; Metadata = $packageMetadata }
35+
}
36+
37+
return $metadata
38+
}
39+
40+
function getPackageInfoFromLookup($packageIdentity, $version, $lookupTable) {
41+
if ($lookupTable.ContainsKey($packageIdentity)) {
42+
if ($lookupTable[$packageIdentity]['Metadata'].Version -eq $version) {
43+
# Only return if the version matches
44+
return $lookupTable[$packageIdentity]
45+
}
46+
}
47+
48+
return $null
49+
}
50+
51+
function moveToLegacy($packageInfo) {
52+
$docsMsMetadata = &$GetDocsMsMetadataForPackageFn -PackageInfo $packageInfo['Metadata']
53+
54+
Write-Host "Move to legacy: $($packageInfo['Metadata'].Name)"
55+
$packageInfoPath = $packageInfo['File']
56+
Move-Item "$($packageInfoPath.Directory)/$($packageInfoPath.BaseName).*" "$DocRepoLocation/metadata/legacy/" -Force
57+
58+
$readmePath = "$DocRepoLocation/$($docsMsMetadata.PreviewReadMeLocation)/$($docsMsMetadata.DocsMsReadMeName)-readme.md"
59+
if (Test-Path $readmePath) {
60+
Move-Item `
61+
$readmePath `
62+
"$DocRepoLocation/$($docsMsMetadata.LegacyReadMeLocation)/" `
63+
-Force
64+
}
65+
}
66+
67+
function deletePackageInfo($packageInfo) {
68+
$docsMsMetadata = &$GetDocsMsMetadataForPackageFn -PackageInfo $packageInfo['Metadata']
69+
70+
Write-Host "Delete superseded package: $($packageInfo['Metadata'].Name)"
71+
$packageInfoPath = $packageInfo['File']
72+
Remove-Item "$($packageInfoPath.Directory)/$($packageInfoPath.BaseName).*" -Force
73+
74+
$readmePath = "$DocRepoLocation/$($docsMsMetadata.PreviewReadMeLocation)/$($docsMsMetadata.DocsMsReadMeName)-readme.md"
75+
if (Test-Path $readmePath) {
76+
Remove-Item $readmePath -Force
77+
}
78+
}
79+
80+
$metadataLookup = @{
81+
'latest' = getPackageMetadata 'latest'
82+
'preview' = getPackageMetadata 'preview'
83+
}
84+
$deprecatedPackages = (Get-CSVMetadata).Where({ $_.Support -eq 'deprecated' })
85+
86+
foreach ($package in $deprecatedPackages) {
87+
$packageIdentity = $package.Package
88+
if (Test-Path "Function:$GetPackageIdentityFromCsvMetadata") {
89+
$packageIdentity = &$GetPackageIdentityFromCsvMetadata $package
90+
}
91+
92+
$packageInfoPreview = $packageInfoLatest = $null
93+
if ($package.VersionPreview) {
94+
$packageInfoPreview = getPackageInfoFromLookup `
95+
-packageIdentity $packageIdentity `
96+
-version $package.VersionPreview `
97+
-lookupTable $metadataLookup['preview']
98+
}
99+
100+
if ($package.VersionGA) {
101+
$packageInfoLatest = getPackageInfoFromLookup `
102+
-packageIdentity $packageIdentity `
103+
-version $package.VersionGA `
104+
-lookupTable $metadataLookup['latest']
105+
}
106+
107+
if (!$packageInfoPreview -and !$packageInfoLatest) {
108+
# Nothing to move or delete
109+
continue
110+
}
111+
112+
if ($packageInfoPreview -and $packageInfoLatest) {
113+
# Delete metadata JSON and package-level overview markdown files for
114+
# the preview version instead of moving both. This mitigates situations
115+
# where the "latest" verison doesn't have a package-level overview
116+
# markdown file and the "preview" version does.
117+
deletePackageInfo $packageInfoPreview
118+
moveToLegacy $packageInfoLatest
119+
} else {
120+
moveToLegacy ($packageInfoPreview ?? $packageInfoLatest)
121+
}
122+
}

Diff for: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1

+10
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ function Test-RequiredDocsJsonMembers($moniker) {
9191
$script:FoundError = $true
9292
}
9393

94+
if ($fileObject.PSObject.Members.Name -contains 'DirectoryPath') {
95+
if ($null -eq $fileObject.DirectoryPath) {
96+
Write-Host "$path has a null DirectoryPath member. If the DirectoryPath is unknown please use the value `"`"."
97+
$script:FoundError = $true
98+
}
99+
} else {
100+
Write-Host "$path is missing its DirectoryPath member. If the DirectoryPath is unknown please use the value `"`"."
101+
$script:FoundError = $true
102+
}
103+
94104
if ($Language -eq "java") {
95105
if ($fileObject.PSObject.Members.Name -contains "Group")
96106
{

Diff for: eng/common/scripts/common.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ $GetEmitterPackageLockPathFn = "Get-${Language}-EmitterPackageLockPath"
6767
$SetDocsPackageOnboarding = "Set-${Language}-DocsPackageOnboarding"
6868
$GetDocsPackagesAlreadyOnboarded = "Get-${Language}-DocsPackagesAlreadyOnboarded"
6969
$GetPackageIdentity = "Get-${Language}-PackageIdentity"
70+
$GetPackageIdentityFromCsvMetadata = "Get-${Language}-PackageIdentityFromCsvMetadata"

Diff for: eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function CheckDependencies()
401401
$job | Remove-Job -Force
402402

403403
if (($result -eq $null -and $job.State -ne "Completed") -or ($result | Select -Last 1) -ne 0) {
404-
throw "Docker does not appear to be running. Start/restart docker."
404+
throw "Docker does not appear to be running. Start/restart docker or re-run this script with -SkipPushImages"
405405
}
406406
}
407407

Diff for: eng/containers/UbuntuNetCoreKeyring/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/powershell:7.2.1-ubuntu-focal AS build
1+
FROM mcr.microsoft.com/azure-powershell:10.3.0-ubuntu-20.04 AS build
22

33
ENV \
44
NO_AT_BRIDGE=1 \
@@ -8,7 +8,7 @@ ENV \
88
# Do not generate certificate
99
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
1010
# SDK version
11-
DOTNET_SDK_VERSION_5_0=5.0.404 \
11+
DOTNET_SDK_VERSION_6_0=6.0.413 \
1212
DOTNET_SDK_VERSION_3_1=3.1.416 \
1313
# Enable correct mode for dotnet watch (only mode supported in a container)
1414
DOTNET_USE_POLLING_FILE_WATCHER=true \
@@ -18,7 +18,7 @@ ENV \
1818
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Ubuntu-20.04 \
1919
# Setup Dotnet envs
2020
DOTNET_ROOT=/usr/share/dotnet \
21-
PATH=$PATH:usr/share/dotnet
21+
PATH=$PATH:usr/share/dotnet
2222

2323
# Install apt-add-repository
2424
RUN apt-get update && apt-get install -y software-properties-common
@@ -39,8 +39,8 @@ RUN apt-add-repository ppa:git-core/ppa \
3939

4040
# Below adapated from https://hub.docker.com/_/microsoft-dotnet-sdk
4141
# https://github.com/dotnet/dotnet-docker/blob/b20c03e0644b42167d66a85fe6077ec2428a47fa/src/sdk/5.0/focal/amd64/Dockerfile
42-
RUN curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION_5_0/dotnet-sdk-$DOTNET_SDK_VERSION_5_0-linux-x64.tar.gz \
43-
&& dotnet_sha512='6f9b83b2b661ce3b033a04d4c50ff3a435efa288de1a48f58be1150e64c5dd9d6bd2a4bf40f697dcd7d64ffaac24f14cc4a874e738544c5d0e8113c474fd2ee0' \
42+
RUN curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION_6_0/dotnet-sdk-$DOTNET_SDK_VERSION_6_0-linux-x64.tar.gz \
43+
&& dotnet_sha512='ee0a77d54e6d4917be7310ff0abb3bad5525bfb4beb1db0c215e65f64eb46511f5f12d6c7ff465a1d4ab38577e6a1950fde479ee94839c50e627020328a702de' \
4444
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
4545
&& mkdir -p /usr/share/dotnet \
4646
&& tar -ozxf dotnet.tar.gz -C /usr/share/dotnet \

Diff for: eng/emitter-package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"main": "dist/src/index.js",
33
"dependencies": {
4-
"@azure-tools/typespec-csharp": "0.2.0-beta.20230907.2"
4+
"@azure-tools/typespec-csharp": "0.2.0-beta.20230912.3"
55
}
66
}

Diff for: eng/pipelines/docindex.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,22 @@ jobs:
3838
Repositories:
3939
- Name: $(DocRepoOwner)/$(DocRepoName)
4040
WorkingDirectory: $(DocRepoLocation)
41+
4142
# Install the tool for toc step to use
4243
- task: NuGetToolInstaller@1
4344
inputs:
4445
versionSpec: 6.3.1
45-
# Call update docs ci script to onboard packages
46+
4647
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
48+
49+
- task: Powershell@2
50+
inputs:
51+
pwsh: true
52+
filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
53+
arguments: -DocRepoLocation $(DocRepoLocation)
54+
displayName: Move deprecated packages to legacy moniker
55+
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
56+
4757
- task: Powershell@2
4858
inputs:
4959
pwsh: true
@@ -109,6 +119,14 @@ jobs:
109119
displayName: Set package source variable
110120
workingDirectory: $(DocRepoLocation)
111121
122+
- task: Powershell@2
123+
inputs:
124+
pwsh: true
125+
filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
126+
arguments: -DocRepoLocation $(DocRepoLocation)
127+
displayName: Move deprecated packages to legacy moniker
128+
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
129+
112130
- task: Powershell@2
113131
inputs:
114132
pwsh: true

Diff for: eng/scripts/Language-Settings.ps1

+20
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ function Get-dotnet-DocsMsMetadataForPackage($PackageInfo) {
298298
DocsMsReadMeName = $readmeName
299299
LatestReadMeLocation = 'api/overview/azure/latest'
300300
PreviewReadMeLocation = 'api/overview/azure/preview'
301+
LegacyReadMeLocation = 'api/overview/azure/legacy'
301302
Suffix = ''
302303
}
303304
}
@@ -494,6 +495,25 @@ function UpdateDocsMsPackages($DocConfigFile, $Mode, $DocsMetadata) {
494495
continue
495496
}
496497

498+
if ($matchingPublishedPackage.Support -eq 'deprecated') {
499+
if ($Mode -eq 'legacy') {
500+
501+
# Select the GA version, if none use the preview version
502+
$updatedVersion = $matchingPublishedPackage.VersionGA.Trim()
503+
if (!$updatedVersion) {
504+
$updatedVersion = $matchingPublishedPackage.VersionPreview.Trim()
505+
}
506+
$package.Versions = @($updatedVersion)
507+
508+
Write-Host "Add deprecated package to legacy moniker: $($package.Name)"
509+
$outputPackages += $package
510+
} else {
511+
Write-Host "Removing deprecated package: $($package.Name)"
512+
}
513+
514+
continue
515+
}
516+
497517
$updatedVersion = $matchingPublishedPackage.VersionGA.Trim()
498518
if ($Mode -eq 'preview') {
499519
$updatedVersion = $matchingPublishedPackage.VersionPreview.Trim()

0 commit comments

Comments
 (0)