Skip to content

Use CustomPatch for EdgeActions Service#39517

Merged
tundwed merged 6 commits intoAzure:mainfrom
kazrael2119:update-customPatch1
Jan 15, 2026
Merged

Use CustomPatch for EdgeActions Service#39517
tundwed merged 6 commits intoAzure:mainfrom
kazrael2119:update-customPatch1

Conversation

@kazrael2119
Copy link
Member

@kazrael2119 kazrael2119 commented Jan 8, 2026

This is the change only impacting the client generation no REST API change.

Update the ArmResourcePatchSync to ArmCustomPatchSync and this is supposed to only impact the client generation and have no impact for REST API.

Guidance doc: https://azure.github.io/typespec-azure/docs/howtos/arm/resource-operations/#resource-update-operations-patch

2025-09-01-preview and 2025-12-01-preview have not released SDKs before.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.

Comment generated by summarize-checks workflow run.

@github-actions github-actions bot added ARMReview resource-manager TypeSpec Authored with TypeSpec WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jan 8, 2026
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

API Change Check

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

Language API Review for Package
TypeSpec Microsoft.Cdn
Go sdk/resourcemanager/edgeactions/armedgeactions
Python azure-mgmt-edgeactions
JavaScript @azure/arm-edgeactions
Java com.azure.resourcemanager:azure-resourcemanager-edgeactions
Swagger Microsoft.Cdn-EdgeActions

@github-actions github-actions bot added VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required NotReadyForARMReview and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jan 8, 2026
get is ArmResourceRead<EdgeAction>;
create is ArmResourceCreateOrUpdateAsync<EdgeAction>;
update is ArmResourcePatchAsync<EdgeAction, EdgeActionProperties>;
update is ArmCustomPatchAsync<EdgeAction, EdgeActionUpdate>;
Copy link
Member

Choose a reason for hiding this comment

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

Looks like we are updating the input (request object) from EdgeActionProperties to EdgeActionUpdate

@kazrael2119 I think that would impact not just the client but also our api, we would have to update our model classes and the api.

Do we need to change the request object?

same for the other object

Copy link
Member

@MaryGao MaryGao Jan 9, 2026

Choose a reason for hiding this comment

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

@tundwed This change to ArmCustomPatchAsync will not change the input model and you could compare the main update with this commit change.

Actually this change would not update any REST-level stuff. We just switched the template from ArmResourcePatchAsync to ArmCustomPatchAsync which is our recommandation in guide so that client side could better handle this operation.

The same for the other object.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, got it.

@MaryGao MaryGao changed the title use CustomPatch for EdgeActions Service Use CustomPatch for EdgeActions Service Jan 9, 2026
@MaryGao MaryGao added the tsp-updates-impact-sdk-only This TypeSpec change affects only SDK generation; therefore, ARM review can be safely skipped. label Jan 9, 2026
@kazrael2119
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@kazrael2119
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

Copy link
Member

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

Mostly a question for service:

Do we need the SkuTypeUpdate?

For service to update the sku, can user e.g. only write name and leave tier undefined?

Ask because SkuTypeUpdate feels unusual...

@MaryGao MaryGao added the BreakingChange-Approved-Benign Changes are not breaking at the REST API level and have at most minor impact to generated SDKs. label Jan 13, 2026
@MaryGao
Copy link
Member

MaryGao commented Jan 13, 2026

Add some labels consdiering there is no real REST change and these labels are false alarmed.

@MaryGao MaryGao added the BreakingChange-Approved-BugFix Changes are to correct the REST API definition to correctly describe service behavior label Jan 13, 2026
@MaryGao MaryGao added the Versioning-Approved-Benign https://github.com/Azure/azure-sdk-tools/issues/6374 label Jan 13, 2026
@github-actions github-actions bot added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed NotReadyForARMReview labels Jan 13, 2026
/** The type used for update operations of the EdgeAction. */
model EdgeActionUpdate {
@doc("The resource-specific properties for this resource.")
properties?: EdgeActionPropertiesUpdate;
Copy link
Member

Choose a reason for hiding this comment

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

properties?: EdgeActionPropertiesUpdate;

I don't think the empty property bag is required. If you can remove this, you may also be able to remove two suppressions.

Copy link
Member Author

@kazrael2119 kazrael2119 Jan 14, 2026

Choose a reason for hiding this comment

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

}

/** Represents an edge action properties */
#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
Copy link
Member

Choose a reason for hiding this comment

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

"FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"

Add the missing justification.

@github-actions github-actions bot added ARMAutoSignedOff ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required ARMChangesRequested labels Jan 13, 2026
@tundwed
Copy link
Member

tundwed commented Jan 14, 2026

Mostly a question for service:

Do we need the SkuTypeUpdate?

For service to update the sku, can user e.g. only write name and leave tier undefined?

Ask because SkuTypeUpdate feels unusual...

@weidongxu-microsoft We do not need this type, it was not present before. @kazrael2119 why was this type added?

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Jan 14, 2026

Mostly a question for service:
Do we need the SkuTypeUpdate?
For service to update the sku, can user e.g. only write name and leave tier undefined?
Ask because SkuTypeUpdate feels unusual...

@weidongxu-microsoft We do not need this type, it was not present before. @kazrael2119 why was this type added?

The type was in openapi.json before this PR

I think it was generated due to the ArmResourcePatchSync template. And ZiWei kept it in this PR to avoid breaking change on Swagger.

I think we can clean up it a bit in this PR, as long as service is good with it. As change to existing Swagger schema (e.g. remove the SkuTypeUpdate would trigger a breaking change review, though I think we can add a "benign" or "bugfix" label to suppress, as there is no service change)

@tundwed
Copy link
Member

tundwed commented Jan 14, 2026

Mostly a question for service:
Do we need the SkuTypeUpdate?
For service to update the sku, can user e.g. only write name and leave tier undefined?
Ask because SkuTypeUpdate feels unusual...

@weidongxu-microsoft We do not need this type, it was not present before. @kazrael2119 why was this type added?

The type was in openapi.json before this PR

I think it was generated due to the ArmResourcePatchSync template. And ZiWei kept it in this PR to avoid breaking change on Swagger.

I think we can clean up it a bit in this PR, as long as service is good with it. As change to existing Swagger schema (e.g. remove the SkuTypeUpdate would trigger a breaking change review, though I think we can add a "benign" or "bugfix" label to suppress, as there is no service change)

We currently have no dependency on SkuTypeUpdate on the service side, so we can use name and tier and that should be fine. And so, if we can suppress it could we do that @kazrael2119 ?

@kazrael2119
Copy link
Member Author

Mostly a question for service:
Do we need the SkuTypeUpdate?
For service to update the sku, can user e.g. only write name and leave tier undefined?
Ask because SkuTypeUpdate feels unusual...

@weidongxu-microsoft We do not need this type, it was not present before. @kazrael2119 why was this type added?

The type was in openapi.json before this PR

I think it was generated due to the ArmResourcePatchSync template. And ZiWei kept it in this PR to avoid breaking change on Swagger.
I think we can clean up it a bit in this PR, as long as service is good with it. As change to existing Swagger schema (e.g. remove the SkuTypeUpdate would trigger a breaking change review, though I think we can add a "benign" or "bugfix" label to suppress, as there is no service change)

We currently have no dependency on SkuTypeUpdate on the service side, so we can use name and tier and that should be fine. And so, if we can suppress it could we do that @kazrael2119 ?

I can't use skuType directly for an Update model as it will fail the lint check with this error message
image
so I have to use skuTypeUpdate instead

@tundwed
Copy link
Member

tundwed commented Jan 14, 2026

Mostly a question for service:
Do we need the SkuTypeUpdate?
For service to update the sku, can user e.g. only write name and leave tier undefined?
Ask because SkuTypeUpdate feels unusual...

@weidongxu-microsoft We do not need this type, it was not present before. @kazrael2119 why was this type added?

The type was in openapi.json before this PR

I think it was generated due to the ArmResourcePatchSync template. And ZiWei kept it in this PR to avoid breaking change on Swagger.
I think we can clean up it a bit in this PR, as long as service is good with it. As change to existing Swagger schema (e.g. remove the SkuTypeUpdate would trigger a breaking change review, though I think we can add a "benign" or "bugfix" label to suppress, as there is no service change)

We currently have no dependency on SkuTypeUpdate on the service side, so we can use name and tier and that should be fine. And so, if we can suppress it could we do that @kazrael2119 ?

I can't use skuType directly for an Update model as it will fail the lint check with this error message image so I have to use skuTypeUpdate instead

I see, looks like ARM enforces this. Since it maintains the current state. I am okay with leaving it as is.

image

@weidongxu-microsoft let me know if you have a different thought

@tundwed tundwed self-requested a review January 14, 2026 03:23
Copy link
Member

@tundwed tundwed left a comment

Choose a reason for hiding this comment

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

The changes do not impact api logic.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Jan 14, 2026

I see, looks like ARM enforces this. Since it maintains the current state. I am okay with leaving it as is.

image @weidongxu-microsoft let me know if you have a different thought

Good to me, if we keep current state.

@tundwed tundwed merged commit 6256065 into Azure:main Jan 15, 2026
94 of 95 checks passed
@kazrael2119 kazrael2119 deleted the update-customPatch1 branch January 15, 2026 01:54
Copilot AI added a commit that referenced this pull request Jan 15, 2026
…tion

Co-authored-by: tundwed <55289657+tundwed@users.noreply.github.com>
tundwed added a commit to Azure/azure-sdk-for-js that referenced this pull request Feb 11, 2026
…59847 (#37048)

Configurations:
'specification/cdn/resource-manager/Microsoft.Cdn/EdgeActions/tspconfig.yaml',
API Version: 2025-12-01-preview, SDK Release Type: beta, and CommitSHA:
'3fc43b6c80d8fce282a242b1f34fecced80ddcb5' in SpecRepo:
'https://github.com/Azure/azure-rest-api-specs' Pipeline run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5759847
Refer to
https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites
to prepare for SDK release. **Release plan link:**
[https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=9e03d787-20ec-f011-8544-000d3a5b5a24](https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=9e03d787-20ec-f011-8544-000d3a5b5a24)
**Submitted by**: dannytundwe@microsoft.com
## Release Plan Details
- Release Plan:
https://aka.ms/sdk-release-planner?release-plan-id=9e03d787-20ec-f011-8544-000d3a5b5a24
Spec pull request:
Azure/azure-rest-api-specs#39517
Spec API version: 2025-12-01-preview

---------

Co-authored-by: tundwed <55289657+tundwed@users.noreply.github.com>
Co-authored-by: Danny Tundwe (from Dev Box) <dannytundwe@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARMAutoSignedOff ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review BreakingChange-Approved-Benign Changes are not breaking at the REST API level and have at most minor impact to generated SDKs. BreakingChange-Approved-BugFix Changes are to correct the REST API definition to correctly describe service behavior Network - CDN PublishToCustomers Acknowledgement the changes will be published to Azure customers. resource-manager tsp-updates-impact-sdk-only This TypeSpec change affects only SDK generation; therefore, ARM review can be safely skipped. TypeSpec Authored with TypeSpec Versioning-Approved-Benign https://github.com/Azure/azure-sdk-tools/issues/6374 VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants