Skip to content

Test: Azure.ResourceManager.HorizonDb scaffolding CI validation#57873

Closed
haiyuazhang wants to merge 1 commit intomainfrom
haiyzhan/test-mgmt-scaffolding-horizondb
Closed

Test: Azure.ResourceManager.HorizonDb scaffolding CI validation#57873
haiyuazhang wants to merge 1 commit intomainfrom
haiyzhan/test-mgmt-scaffolding-horizondb

Conversation

@haiyuazhang
Copy link
Copy Markdown
Member

@haiyuazhang haiyuazhang commented Apr 7, 2026

🧪 Test PR — Mgmt Scaffolding CI Validation

⚠️ Do not merge — this PR will be closed after CI validation.

Purpose

This PR validates that a new management-plane TypeSpec SDK, generated with the scaffolding automation from #57875, passes all CI checks. Generated from the same spec commit (f6e1fbd) as AutoPR #57579 for direct comparison.

Scaffolding Pattern Validation

We audited 10 existing mgmt packages (old and new) to verify our scaffolding output matches real-world conventions:

File Our Output Repo Pattern Match?
ci.mgmt.yml Minimal config (trigger: none, LimitForPullRequest: true, single artifact) Identical to MongoCluster, StandbyPool, AgriculturePlatform and all newer packages
Directory.Build.props Standard boilerplate (imports parent props) 100% uniform across all 10 packages sampled
AssemblyInfo.cs AzureResourceProviderNamespace + 2 InternalsVisibleTo entries 100% uniform across all 10 packages sampled
Tests.csproj Minimal (src project ref only) Matches template + newer packages (MongoCluster)
CHANGELOG.md Standard skeleton (empty ### Features Added / ### Breaking Changes sections) Correct for initial 1.0.0-beta.1 (Unreleased) — all packages use this for unreleased versions
TestBase.cs CreateResourceGroup(subscription, rgNamePrefix, location) with Recording.GenerateAssetName() Matches current template + modern packages (MongoCluster, ContainerService, PostgreSql)
TestEnvironment.cs Empty class inheriting TestEnvironment Standard across all packages
README.md Template-based with package name substitution Standard across all packages
Packages audited
Package Age Notes
Azure.ResourceManager.Compute Mature (v1.15.0-beta) Large, multi-artifact ci.mgmt.yml
Azure.ResourceManager.Network Mature (v1.16.0-beta) Utilities-based test pattern
Azure.ResourceManager.Storage Mature (v1.7.0-beta) TypeSpec-migrated
Azure.ResourceManager.KeyVault Mature (v1.5.0-beta) Custom test classes
Azure.ResourceManager.ContainerService Mature (v1.5.0-beta) Uses rgNamePrefix pattern
Azure.ResourceManager.CosmosDB Mature (v1.5.0-beta) Includes AzureCoreTestFramework
Azure.ResourceManager.PostgreSql Mature (v1.5.0-beta) Uses rgNamePrefix pattern
Azure.ResourceManager.Batch Mature (v1.7.0-beta) OneTimeSetUp pattern
Azure.ResourceManager.MongoCluster Newer (v1.1.0-beta) Minimal Tests.csproj
Azure.ResourceManager.StandbyPool Newer (v1.3.0-beta) Includes AzureCoreTestFramework

How this PR was generated

This is the exact output of running Invoke-GenerateAndBuildV2.ps1 locally with the scaffolding changes from #57875 applied.

1. Created an input JSON simulating an AutoPR trigger:

{
  "specFolder": "C:/Users/haiyzhan/code/spec",
  "headSha": "f6e1fbd6268be7712bf96a516ba846f7d42e2baa",
  "repoHttpsUrl": "https://github.com/Azure/azure-rest-api-specs",
  "relatedTypeSpecProjectFolder": [
    "specification/horizondb/resource-manager/Microsoft.HorizonDb/HorizonDb"
  ],
  "sdkReleaseType": "beta"
}

2. Ran the generation pipeline script:

.\eng\scripts\Invoke-GenerateAndBuildV2.ps1 `
  -inputJsonFile .\newMgmtTypeSpecInput.json `
  -outputJsonFile .\newMgmtTypeSpecOutput.json

3. The script executed this flow:

tsp-client init
  → Emitter generated src/Generated/ code, .csproj, .sln, metadata.json, tsp-location.yaml
  ↓
New-MgmtPackageScaffolding()        ← NEW from #57875
  → Created ci.mgmt.yml, Directory.Build.props, README.md, CHANGELOG.md,
    AssemblyInfo.cs, test project, test base/environment classes
  ↓
GeneratePackage() with gate removed  ← CHANGED in #57875
  → dotnet build (succeeded)
  → dotnet pack (succeeded, produced .nupkg)
  → Export-API.ps1 (generated api/*.cs files)

4. Pipeline output:

{
  "packages": [{
    "packageName": "Azure.ResourceManager.HorizonDb",
    "result": "succeeded",
    "version": "1.0.0-beta.1"
  }]
}

File inventory

All files in this PR were produced by the generation pipeline. No manual edits.

Source Files What
Emitter (@azure-typespec/http-client-csharp-mgmt) src/Generated/**, .csproj, .sln, metadata.json, tsp-location.yaml Generated C# code and project structure
New-MgmtPackageScaffolding() ci.mgmt.yml, Directory.Build.props, README.md, CHANGELOG.md, src/Properties/AssemblyInfo.cs, tests/** Required CI/build files from eng/templates/Azure.ResourceManager.Template/
Export-API.ps1 (via GeneratePackage) api/*.cs (3 files) Public API surface listings

Spec reference

Expected outcome

All CI checks pass ✅, proving the scaffolding from #57875 produces a complete, CI-ready management SDK package without manual intervention.

@github-actions github-actions Bot added the Mgmt This issue is related to a management package. label Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.ResourceManager.HorizonDb

Generated using Invoke-GenerateAndBuildV2.ps1 with scaffolding from #57875.
Uses same spec commit (f6e1fbd) as AutoPR #57579 for direct comparison.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@haiyuazhang haiyuazhang force-pushed the haiyzhan/test-mgmt-scaffolding-horizondb branch from 0d1dae5 to 5124f8a Compare April 7, 2026 23:50
@haiyuazhang haiyuazhang changed the title Test: Azure.ResourceManager.HorizonDB scaffolding CI validation Test: Azure.ResourceManager.HorizonDb scaffolding CI validation Apr 7, 2026
@haiyuazhang haiyuazhang closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant