Content-Length: 458220 | pFad | http://github.com/Azure/azure-sdk-for-net/pull/50482

24 [http-client-csharp-mgmt] Generate tag related methods by haiyuazhang · Pull Request #50482 · Azure/azure-sdk-for-net · GitHub
Skip to content

[http-client-csharp-mgmt] Generate tag related methods #50482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

haiyuazhang
Copy link
Contributor

@haiyuazhang haiyuazhang commented Jun 8, 2025

Generate tag related methods in Resource.

@Copilot Copilot AI review requested due to automatic review settings June 8, 2025 16:16
@github-actions github-actions bot added CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library. labels Jun 8, 2025
Copy link
Contributor

@Copilot 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

This PR adds new tag-related methods to the HTTP client management generator, enabling add, remove (and potentially set) operations on resource tags while refactoring diagnostic and pipeline processing statements. Key changes include:

  • Introduction of new tag method providers (AddTagMethodProvider, RemoveTagMethodProvider, and a placeholder for SetTagsMethodProvider).
  • Enhancements to diagnostic scope and pipeline processing by leveraging shared snippet helpers.
  • Updates to the ResourceClientProvider to include tag providers and improve argument population.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ResourceMethodSnippets.cs Added diagnostic scope helper methods for resource operations.
SetTagsMethodProvider.cs Implemented tag-setting provider with conditional logic for tag resource usage.
RemoveTagMethodProvider.cs Implemented tag removal provider with primary and secondary execution paths.
BaseTagMethodProvider.cs Provided common functionality shared by tag method providers.
AddTagMethodProvider.cs Implemented tag addition provider supporting both sync and async scenarios.
ResourceClientProvider.cs Updated to register tag method providers and improved argument population.
ResourceOperationMethodProvider.cs Refactored pipeline processing to use shared diagnostic snippet methods.
KnownAzureParameters.cs Updated cancellation token parameter with a default value.
Comments suppressed due to low confidence (1)

eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/RemoveTagMethodProvider.cs:128

  • Ensure that the reference to 'WaitUntil' is consistently qualified across providers (e.g., use 'Azure.WaitUntil' if that is the convention used in other tag method providers).
                    Static(typeof(WaitUntil)).Property("Completed"),

@live1206
Copy link
Member

live1206 commented Jun 9, 2025

And also, can we have some UT to verify the generated methods?

@haiyuazhang
Copy link
Contributor Author

And also, can we have some UT to verify the generated methods?

Unit tests added.

@haiyuazhang haiyuazhang reopened this Jun 10, 2025
@haiyuazhang haiyuazhang merged commit fc7d07a into Azure:main Jun 10, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Azure/azure-sdk-for-net/pull/50482

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy