Skip to content

Update azure-typespec/http-client-csharp-mgmt version to prerelease 1.0.0-alpha.20260418.1#58332

Open
azure-sdk wants to merge 2 commits intoAzure:mainfrom
azure-sdk:validate-typespec-20260418.1-azure-typespec/http-client-csharp-mgmt
Open

Update azure-typespec/http-client-csharp-mgmt version to prerelease 1.0.0-alpha.20260418.1#58332
azure-sdk wants to merge 2 commits intoAzure:mainfrom
azure-sdk:validate-typespec-20260418.1-azure-typespec/http-client-csharp-mgmt

Conversation

@azure-sdk
Copy link
Copy Markdown
Collaborator

Generated by branded - http-client-csharp-mgmt build 20260418.1
Triggered from branch: main

Copilot AI review requested due to automatic review settings April 18, 2026 18:51
@github-actions github-actions bot added the Quota Quota Service label Apr 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the @azure-typespec/http-client-csharp-mgmt emitter prerelease version and applies the resulting regenerated Azure.ResourceManager.Quota (Quota RP) code changes.

Changes:

  • Bumps @azure-typespec/http-client-csharp-mgmt from 1.0.0-alpha.20260416.1 to 1.0.0-alpha.20260418.1 (plus lockfile update).
  • Regenerates Quota management SDK code to route SubscriptionQuotaAllocationsList operations through management-group subscription scope and require groupQuotaName/resourceProviderName parameters.
  • Regenerates QuotaAllocationRequestStatusCollection to carry groupQuotaName/resourceProviderName on the collection instance and update REST request construction accordingly.

Reviewed changes

Copilot reviewed 1 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/quota/Azure.ResourceManager.Quota/src/Generated/SubscriptionQuotaAllocationsListCollection.cs Updates resource id validation + changes Get/Exists APIs to take groupQuotaName/resourceProviderName and adjusts REST request parameter mapping.
sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaAllocationRequestStatusCollection.cs Adds stored _groupQuotaName/_resourceProviderName used in request construction; updates scope validation and request parameter mapping.
sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/QuotaExtensions.cs Updates public extension method signatures and forwarding to include groupQuotaName/resourceProviderName.
sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/MockableQuotaArmClient.cs Updates mockable forwarding APIs to new signatures; adds validation for subscription quota allocations inputs.
eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json Updates emitter dependency version.
eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json Updates resolved emitter package version + integrity metadata.
Files not reviewed (1)
  • eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json: Language not supported

/// <param name="resourceProviderName"> The resourceProviderName for the resource. </param>
internal QuotaAllocationRequestStatusCollection(ArmClient client, ResourceIdentifier id, string groupQuotaName, string resourceProviderName) : base(client, id)
{
TryGetApiVersion(QuotaAllocationRequestStatusResource.ResourceType, out string quotaAllocationRequestStatusApiVersion);
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

groupQuotaName and resourceProviderName are stored and later used to build request URIs, but they are never validated. Passing null/empty will fail later (e.g., during URI construction) with less actionable exceptions or malformed paths. Add Argument.AssertNotNullOrEmpty for both parameters in the constructor (or ensure they’re validated before constructing this collection).

Suggested change
TryGetApiVersion(QuotaAllocationRequestStatusResource.ResourceType, out string quotaAllocationRequestStatusApiVersion);
TryGetApiVersion(QuotaAllocationRequestStatusResource.ResourceType, out string quotaAllocationRequestStatusApiVersion);
Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName));
Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName));

Copilot uses AI. Check for mistakes.
/// <returns> Returns a collection of <see cref="QuotaAllocationRequestStatusResource"/> objects. </returns>
public virtual QuotaAllocationRequestStatusCollection GetQuotaAllocationRequestStatuses(ResourceIdentifier scope)
public virtual QuotaAllocationRequestStatusCollection GetQuotaAllocationRequestStatuses(ResourceIdentifier scope, string groupQuotaName, string resourceProviderName)
{
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

GetQuotaAllocationRequestStatuses accepts groupQuotaName/resourceProviderName but doesn’t validate them, unlike the similar GetSubscriptionQuotaAllocationsList* methods above. This allows null/empty values to flow into QuotaAllocationRequestStatusCollection and then into request URI building. Add Argument.AssertNotNullOrEmpty checks for both parameters here (and/or in the downstream methods) for consistent parameter validation.

Suggested change
{
{
Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName));
Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName));

Copilot uses AI. Check for mistakes.
Comment on lines +183 to +187
public static Response<SubscriptionQuotaAllocationsListResource> GetSubscriptionQuotaAllocationsList(this ArmClient client, ResourceIdentifier scope, string groupQuotaName, string resourceProviderName, AzureLocation location, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));

return GetMockableQuotaArmClient(client).GetSubscriptionQuotaAllocationsList(scope, location, cancellationToken);
return GetMockableQuotaArmClient(client).GetSubscriptionQuotaAllocationsList(scope, groupQuotaName, resourceProviderName, location, cancellationToken);
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

This change updates a public extension-method signature, but the committed API listings under sdk/quota/Azure.ResourceManager.Quota/api/ still contain the old GetSubscriptionQuotaAllocationsList(this ArmClient, ResourceIdentifier, AzureLocation, ...) shape (and similarly for other updated Quota extensions). Please regenerate/update the API files (netstandard2.0/net8.0/net10.0) so the public API surface matches the code and CI API checks don’t fail.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Quota Quota Service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants