Skip to content

Onboard Azure.Provisioning.Education - #63261

Open
RuiJun Hu (MSFT) (cxznmhdcxz) wants to merge 3 commits into
Azure:mainfrom
cxznmhdcxz:feature/provisioning-education
Open

RuiJun Hu (MSFT) (cxznmhdcxz) wants to merge 3 commits into
Azure:mainfrom
cxznmhdcxz:feature/provisioning-education

Conversation

@cxznmhdcxz

Copy link
Copy Markdown
Member

Summary

  • onboard the new Azure.Provisioning.Education package
  • add generated provisioning resources, tests, README snippets, API listings, metadata, and CI configuration
  • reference the unmerged specification commit from the contributor fork

Related

Validation

  • dotnet format for the source and test projects
  • eng/scripts/Export-API.ps1 education
  • eng/scripts/Update-Snippets.ps1 education

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@cxznmhdcxz
RuiJun Hu (MSFT) (cxznmhdcxz) marked this pull request as ready for review September 22, 2026 07:38
Copilot AI balanced review requested due to automatic review settings September 22, 2026 07:38
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Resource scope modeling makes several generated resources and the primary sample invalid for their actual billing-scoped endpoints.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 High severity · 2 Medium severity · 5 Low severity

Open (9)
What changed in this PR

Onboards the TypeSpec-generated Azure.Provisioning.Education package, including its public API, validation assets, documentation, and CI integration.

Changes:

  • Adds Education provisioning resources and models.
  • Adds unit/live tests, README snippets, API listings, and package metadata.
  • Registers the package in Education CI and spell checking.
File Description
sdk/​education/​cspell.yaml Adds provisioning terminology.
sdk/​education/​ci.mgmt.yml Adds package CI coverage.
Azure.Provisioning.Education/​tsp-location.yaml References the draft specification commit.
tests/​BasicLiveEducationTests.cs Adds live validation.
tests/​BasicEducationTests.cs Adds Bicep generation test and snippet.
tests/​Azure.Provisioning.Education.Tests.csproj Configures tests and references.
src/​Generated/​StudentLabDetails.cs Adds student-lab resource.
src/​Generated/​Models/​StudentRole.cs Adds student-role enum.
src/​Generated/​Models/​StudentProperties.cs Adds student properties.
src/​Generated/​Models/​StudentLabStatus.cs Adds student-lab statuses.
src/​Generated/​Models/​StudentLabProperties.cs Adds student-lab properties.
src/​Generated/​Models/​LabStatus.cs Adds lab statuses.
src/​Generated/​Models/​LabProperties.cs Adds lab properties.
src/​Generated/​Models/​JoinRequestStatus.cs Adds join-request statuses.
src/​Generated/​Models/​JoinRequestProperties.cs Adds join-request properties.
src/​Generated/​Models/​GrantDetailProperties.cs Adds grant properties.
src/​Generated/​Models/​EducationGrantType.cs Adds grant types.
src/​Generated/​Models/​EducationGrantStatus.cs Adds grant statuses.
src/​Generated/​Models/​EducationAmount.cs Adds monetary model.
src/​Generated/​Internal/​CodeGenTypeAttribute.cs Adds generator customization attribute.
src/​Generated/​Internal/​CodeGenSuppressAttribute.cs Adds suppression attribute.
src/​Generated/​Internal/​CodeGenSerializationAttribute.cs Adds serialization attribute.
src/​Generated/​Internal/​CodeGenMemberAttribute.cs Adds member customization attribute.
src/​Generated/​Internal/​CodeGenEnumValueAttribute.cs Adds enum customization attribute.
src/​Generated/​GrantDetails.cs Adds grant resource.
src/​Generated/​EducationStudent.cs Adds student resource.
src/​Generated/​EducationLab.cs Adds lab resource.
src/​Generated/​EducationJoinRequest.cs Adds join-request resource.
src/​Azure.Provisioning.Education.csproj Defines the new package.
README.md Documents installation and lab creation.
metadata.json Records the supported API version.
Directory.Build.props Configures package-wide build settings.
CHANGELOG.md Records the initial preview.
Azure.Provisioning.Education.slnx Includes source and test projects.
api/​Azure.Provisioning.Education.netstandard2.0.cs Records the netstandard API.
api/​Azure.Provisioning.Education.net8.0.cs Records the .NET 8 API.
api/​Azure.Provisioning.Education.net10.0.cs Records the .NET 10 API.

_name = DefineProperty<string>(nameof(Name), new string[] { "name" }, isRequired: true, defaultValue: "default");
_systemData = DefineModelProperty<SystemData>(nameof(SystemData), new string[] { "systemData" }, isOutput: true);
_properties = DefineModelProperty<LabProperties>(nameof(Properties), new string[] { "properties" });
_scope = DefineResource<ProvisionableResource>(nameof(Scope), new string[] { "scope" });
_name = DefineProperty<string>(nameof(Name), new string[] { "name" }, isRequired: true);
_systemData = DefineModelProperty<SystemData>(nameof(SystemData), new string[] { "systemData" }, isOutput: true);
_properties = DefineModelProperty<StudentProperties>(nameof(Properties), new string[] { "properties" });
_scope = DefineResource<ProvisionableResource>(nameof(Scope), new string[] { "scope" });
Comment on lines +21 to +22
EducationLab lab =
new(nameof(lab), EducationLab.ResourceVersions.V2021_12_01_PREVIEW)
Comment on lines +19 to +21
await test.SetupLiveCalls(this)
.Lint()
.ValidateAsync();
Comment on lines +34 to +35
EducationLab lab =
new(nameof(lab), EducationLab.ResourceVersions.V2021_12_01_PREVIEW)
Comment on lines +17 to +18
/// <summary> Grant details. </summary>
public partial class GrantDetails : ProvisionableResource
Comment on lines +10 to +11
/// <summary> Join request status. </summary>
public enum JoinRequestStatus
Comment on lines +10 to +11
/// <summary> The status of this lab. </summary>
public enum LabStatus
Comment on lines +10 to +11
/// <summary> Student Role. </summary>
public enum StudentRole
@github-actions

Copy link
Copy Markdown

Provisioning schema extractor output

Package: sdk/education/Azure.Provisioning.Education

Schema extracted from generated and custom source
# Provisioning Resource Schema

Package: `sdk/education/Azure.Provisioning.Education`
Source: `sdk/education/Azure.Provisioning.Education/src/Generated`

## EducationJoinRequest

- Resource type: `Microsoft.Education/labs/joinRequests`
- Default API version: `2021-12-01-preview`
- Source file: `src/Generated/EducationJoinRequest.cs`

| Property | Path | Kind | Type | Required | Settable | Default | Metadata |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `Id` | `id` | Property | `BicepValue<ResourceIdentifier>` | False | False | `` | False |
| `Name` | `name` | Property | `BicepValue<string>` | True | True | `` | False |
| `SystemData` | `systemData` | ModelProperty | `SystemData` | False | False | `` | False |
| `Properties` | `properties` | ModelProperty | `JoinRequestProperties` | False | False | `` | False |
| `Parent` | `parent` | Resource | `EducationLab` | True | True | `` | True |

## EducationLab

- Resource type: `Microsoft.Education/labs`
- Default API version: `2021-12-01-preview`
- Source file: `src/Generated/EducationLab.cs`

| Property | Path | Kind | Type | Required | Settable | Default | Metadata |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `Id` | `id` | Property | `BicepValue<ResourceIdentifier>` | False | False | `` | False |
| `Name` | `name` | Property | `BicepValue<string>` | True | False | `"default"` | False |
| `SystemData` | `systemData` | ModelProperty | `SystemData` | False | False | `` | False |
| `Properties` | `properties` | ModelProperty | `LabProperties` | False | False | `` | False |
| `Scope` | `scope` | Resource | `ProvisionableResource` | False | True | `` | True |

## EducationStudent

- Resource type: `Microsoft.Education/labs/students`
- Default API version: `2021-12-01-preview`
- Source file: `src/Generated/EducationStudent.cs`

| Property | Path | Kind | Type | Required | Settable | Default | Metadata |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `Id` | `id` | Property | `BicepValue<ResourceIdentifier>` | False | False | `` | False |
| `Name` | `name` | Property | `BicepValue<string>` | True | True | `` | False |
| `SystemData` | `systemData` | ModelProperty | `SystemData` | False | False | `` | False |
| `Properties` | `properties` | ModelProperty | `StudentProperties` | False | False | `` | False |
| `Scope` | `scope` | Resource | `ProvisionableResource` | False | True | `` | True |

## GrantDetails

- Resource type: `Microsoft.Education/grants`
- Default API version: `2021-12-01-preview`
- Source file: `src/Generated/GrantDetails.cs`

| Property | Path | Kind | Type | Required | Settable | Default | Metadata |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `Id` | `id` | Property | `BicepValue<ResourceIdentifier>` | False | False | `` | False |
| `Name` | `name` | Property | `BicepValue<string>` | True | False | `"default"` | False |
| `SystemData` | `systemData` | ModelProperty | `SystemData` | False | False | `` | False |
| `Properties` | `properties` | ModelProperty | `GrantDetailProperties` | False | False | `` | False |

## StudentLabDetails

- Resource type: `Microsoft.Education/studentLabs`
- Default API version: `2021-12-01-preview`
- Source file: `src/Generated/StudentLabDetails.cs`

| Property | Path | Kind | Type | Required | Settable | Default | Metadata |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `Id` | `id` | Property | `BicepValue<ResourceIdentifier>` | False | False | `` | False |
| `Name` | `name` | Property | `BicepValue<string>` | True | True | `` | False |
| `SystemData` | `systemData` | ModelProperty | `SystemData` | False | False | `` | False |
| `Properties` | `properties` | ModelProperty | `StudentLabProperties` | False | False | `` | False |

Analyzed by Azure .NET Provisioning SDK PR Review: https://github.com/Azure/azure-sdk-for-net/actions/runs/35702739646

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provisioning SDK Review Summary

  • Scope: sdk/education/Azure.Provisioning.Education/** (new package onboarding: generated resources, models, README, tests, metadata, CHANGELOG, CI/cspell config)
  • Classification: onboarding
  • CI: pass (net - pullrequest succeeded on this head commit)
  • Schema and metadata correctness: fail — see findings below and the schema-extractor output posted separately
  • Compatibility: not applicable (new package, no ApiCompatBaseline.txt/BackwardCompatible concerns)
  • Tests/snippets/docs: fail — sample/tests inherit the same missing-scope issue as the resource model

Findings (blocking):

  1. [Docs] tsp-location.yaml references an unmerged specification commit in a contributor's personal fork (cxznmhdcxz/azure-rest-api-specs) instead of the official Azure/azure-rest-api-specs. Regenerating from a commit outside the canonical spec repo is fragile (no durable audit trail, fork can disappear/change) and should be updated once the linked spec PR (azure-rest-api-specs#46577) merges.
  2. [Provisioning schema] GrantDetails (Microsoft.Education/grants) defines no Scope/Parent property at all, even though the spec examples place grants under a Billing billingProfile (an extension-resource scope). Without scope metadata, generated Bicep for this resource cannot address the real service path.

A prior review (copilot-pull-request-reviewer[bot]) already flagged related scope issues on EducationLab, EducationStudent, BasicEducationTests.cs, BasicLiveEducationTests.cs, and README.md (missing required billing invoice-section scope), plus naming customizations for GrantDetails/JoinRequestStatus/LabStatus/StudentRole. Those findings are valid and should also be addressed; this review adds the two new findings above (unmerged fork spec reference, and GrantDetails missing scope entirely) that were not previously called out.

The full generated-resource schema inventory (property settability/required/default/metadata flags for all 5 resources) is posted in a separate comment for reviewer verification.

Analyzed by Azure .NET Provisioning SDK PR Review: https://github.com/Azure/azure-sdk-for-net/actions/runs/35702739646

namespace Azure.Provisioning.Education
{
/// <summary> Grant details. </summary>
public partial class GrantDetails : ProvisionableResource

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Provisioning schema] GrantDetails (Microsoft.Education/grants) has no Scope or Parent property at all — unlike EducationLab and EducationStudent, which at least define an optional Scope. Per the spec examples, grants live under /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Education/grants/{name}, i.e. this is a billing-scoped extension resource. Without a Scope/Parent metadata property, the emitted Bicep will declare GrantDetails at the deployment's default scope, which cannot address the real service path and will fail to deploy. Fix the TypeSpec/emitter mapping so this resource models the required billing scope, then regenerate.

@@ -0,0 +1,6 @@
directory: specification/education/resource-manager/Microsoft.Education/Education
commit: 4564b787ab7787add4900d2cd592cdea6ea39a11
repo: cxznmhdcxz/azure-rest-api-specs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Docs] repo: cxznmhdcxz/azure-rest-api-specs points the generator at an unmerged specification commit in a contributor's personal fork rather than the official Azure/azure-rest-api-specs repository. This is confirmed by the PR description itself ("reference the unmerged specification commit from the contributor fork"). Onboarding a new provisioning package against a fork/unmerged commit is fragile: the fork can be deleted or force-pushed, breaking future regeneration and leaving no audit trail back to an approved spec review. Update tsp-location.yaml to reference the merged commit in Azure/azure-rest-api-specs (spec PR #46577) once it lands, and regenerate from that commit before merging this SDK PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants