Skip to content

Generate .NET SDK for Microsoft.Insights metric alerts 2024-03-01-preview version#53565

Draft
violetVo wants to merge 1788 commits intosdk-gen-trigger-metricAlert-preview-2024-03from
main
Draft

Generate .NET SDK for Microsoft.Insights metric alerts 2024-03-01-preview version#53565
violetVo wants to merge 1788 commits intosdk-gen-trigger-metricAlert-preview-2024-03from
main

Conversation

@violetVo
Copy link
Contributor

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

Copy link
Member

@mrm9084 mrm9084 left a comment

Choose a reason for hiding this comment

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

Update for release

nick863 and others added 15 commits March 6, 2026 17:04
* Split the projects into Azure.AI.Extensions.OpenAI and Azure.AI.Projects.Agents

* Generate code

* Fixes

* Generate Azure.AI.Projects.Agents and adopt 1.11.0 version of OpenAI specs

* Generate code

* Fixes and new code generation

* Fix Azure.AI.Projects.Agents

* Move Agents part from the Azure.AI.Extensions.OpenAI

* Remove Agents from projects.

* Remove container App sample as it is absent in V1

* Fix tests for split projects.

* Remove Azure.AI.Projects.OpenAI, fix readmes and port Telemetry samples and test.

* Fix ci/cd and add readme for agents

* Cleanup

* Regenerate code

* Record evaluation tests.

* Record Finetuning test and generate code from Feature branch

* Improve documentation

* Fixes

* Fix

---------

Co-authored-by: Nikolay Rovinskiy <nirovins@microsoft.com>
Co-authored-by: Ubuntu <cloudtest@005681e9c000000.tkkhlgj2u51eln3mcb0lygmbye.dx.internal.cloudapp.net>
Add PublishNugetPackages parameter and HasNugetPackages support to the
http-client-csharp-mgmt CI pipeline, matching the pattern used by the
base http-client-csharp pipeline. This enables publishing
Azure.Generator.Management NuGet packages to the DevOps feed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jorge Rangel <jorgerangel@microsoft.com>
The focus of this change is to remove owners flagged as invalid by the linter.
* Use create-authenticated-npmrc.yml for all npmrc authentication

* Add option to skip npmrc authentication

---------

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
…56893)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
* Update mgmt PR review rule for method renames

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

* Standardize backward compatibility wording

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
hnsunil and others added 30 commits March 20, 2026 21:13
* Regenerate SDK using API version 2025-12-15-preview

* regenerate the code

* fixing copilot comments

* updating assets.json after pushing new recordings

* updating test
…ureClients (#57317)

Tests that create EventHub namespaces fail with recording mismatches when
UseProjectReferenceToAzureClients=true because local EventHubs source has
unreleased serialization changes that differ from NuGet 1.2.1 recordings.

Reproduces on fresh main with: Configuration=Release /p:UseProjectReferenceToAzureClients=true

These tests need re-recording with current EventHubs SDK.

Ref #57316

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The focus of these changes is to update the triage
process to remove the need to make priviledged API
calls via the gh command line for "is_customer"
checks, moving to a blended approach of permissions
and falling back to public profile data when needed.
…alpha.20260320.2 (#57224)

* Regenerate repository SDK with TypeSpec build 20260318.2

* Update SDK code dy_ma_2

* Update SDK code co_du_1

* Update SDK code mo_re_3

* Update SDK code re_wo_4

* Update SDK code ad_co_0

* regen Azure.Analytics.PlanetaryComputer

* regen contentunderstanding

* update commit ref for contentunderstanding

* Add ExperimentalAttribute shared source, changelog entries, and API exports for libraries with new Settings types

- Added ExperimentalAttribute.cs shared source to 24 csproj files
- Added changelog entries for new *ClientSettings types under Features Added
- Ran Export-API for all affected service directories

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

* Fix custom code to remove references to removed _tokenCredential/_keyCredential fields

Refactored custom constructors to use credential parameter directly instead
of the removed generated field. For DevCenter, child clients now accept the
built Pipeline instead of raw credentials.

Remaining codegen bugs (in unbranded emitter):
- TextTranslation: authenticationPolicy parameter unused in generated ctor
- EventGrid Namespaces: Settings exposes internal Options type publicly
- TextAuthoring: sub-client constructors dropped scoping parameters
- KeyVault Admin: ServiceVersion enum/string type mismatch

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

* remove more unused credential parameters to make build pass properly

* fix planetarycomputer

* add experimental attribte

* add experimentalatt to schemaregistry

* remove unused fields from search

* fix search

* fix kv

* fix appconfig

* export API & update changelog

* more fixes

* more kv fixes

* regen

* Fix CI failures: EventGrid options type mismatch and missing API exports

- EventGrid: Add customizations for ClientSettings to use correct per-client
  options types (EventGridReceiverClientOptions/EventGridSenderClientOptions)
  instead of internal EventGridNamespacesClientOptions. Suppress wrong
  generated constructors via CodeGenSuppress and provide custom replacements.
  Regenerated code to apply suppressions.
- KeyVault Admin: Add missing API export files for new ClientSettings types
- SchemaRegistry: Add missing API export files for new ClientSettings types

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

* Fix null-endpoint tests to pass non-null credential

The new constructor pattern validates credential before endpoint.
Pass a valid credential so the endpoint null check is the one that triggers.

Affected tests:
- Azure.AI.Language.Text (TextAnalysisClientTest)
- Azure.AI.Language.Conversations (ConversationsClientTests)

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

* bump template version

* fix lock file

* Fix QuestionAnswering null-endpoint tests to pass non-null credential

Same issue as Language.Text/Conversations: the new constructor pattern
validates credential before endpoint, so pass a valid credential when
testing endpoint null validation.

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

* Update azure-typespec/http-client-csharp to 1.0.0-alpha.20260320.1

Includes fix for dictionary deserialization crash (skip \ metadata
in dictionary key iteration).

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

* Update azure-typespec/http-client-csharp to 1.0.0-alpha.20260320.2

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

* Regenerate contentunderstanding, search, and Language.Text.Authoring

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

* regen batch 1: anomalydetector, appconfiguration, batch, conversations

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

* Revert eng/packages/http-client-csharp changes and regen batch 2

Revert unintended Spector test project changes under eng/packages/.
Regen: QA.Authoring, QA.Inference, Language.Text, JobRouter

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

* regen batch 4: documentintelligence, easm, healthdeidentification, keyvault

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

* regen batch 5: loadtesting, monitor.ingestion, monitor.exporter, monitor.query.logs

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

* regen batch 6: monitor.query.metrics, onlineexperimentation, planetarycomputer, purview

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

---------

Co-authored-by: Jorge Rangel <jorgerangel@microsoft.com>
Co-authored-by: jolov <jolov@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Arcturus Zhang <dapzhang@microsoft.com>
* fix date in changelog

* fix changelog
#57327)

* Add emitter version dashboard and auto-generated banner to Library Inventory

- Add doc/GeneratorVersions/Emitter_Version_Dashboard.ps1 script that queries
  npm registry and git history to produce a version dashboard
- Add doc/GeneratorVersions/Emitter_Version_Dashboard.md showing dependency
  chain, dependency versions, latest npm versions, and commit links
- Add auto-generated banner to Library_Inventory output

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

* Address PR review comments on emitter version dashboard

- Fix header comment to match actual file names and remove stale NuGet reference
- Remove unused encodedName variable from Get-NpmVersionLink
- Always use canonical repo URL (Azure/azure-sdk-for-net) for commit links
- Guard commit link construction against null hashes
- Regenerate dashboard with corrected commit links

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

* Use absolute GitHub URLs for source file links in dashboard

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…and audio. (#56620)

* Add ContentRange parameter support in AnalyzeBinary and AnalyzeUrl samples

* [ContentUnderstanding] Fix Sample01_AnalyzeBinary.md reference for ContentRange factory methods (#56621)

* Initial plan

* Update Sample01_AnalyzeBinary.md to reference Sample02 for factory methods

Co-authored-by: changjian-wang <15209050+changjian-wang@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: changjian-wang <15209050+changjian-wang@users.noreply.github.com>

* Update samples to include ContentRange usage for document, video, and audio analysis

* Reintroduce ContentRange analysis example for document processing in AnalyzeBinaryAsync sample

* Add tests for ContentRange functionality in document, video, and audio analysis samples

* Remove duplicate explanation of AnalysisResult.Contents in Sample01_AnalyzeBinary.md

* Update samples and tests to enhance ContentRange usage for document, video, and audio analysis

* Refine assertions in AnalyzeVideoUrlAsync and AnalyzeAudioUrlAsync to improve validation of ContentRange results

* Add samples for analyzing documents, videos, and audio with ContentRange

* Update Tag in assets.json to reflect the latest version for ContentUnderstanding

* Add range validation assertions for video and audio content analysis tests

* Add raw range string examples for document, video, and audio analysis

* Add ContentRange parameter support in AnalyzeBinary and AnalyzeUrl samples

* [ContentUnderstanding] Fix Sample01_AnalyzeBinary.md reference for ContentRange factory methods (#56621)

* Initial plan

* Update Sample01_AnalyzeBinary.md to reference Sample02 for factory methods

Co-authored-by: changjian-wang <15209050+changjian-wang@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: changjian-wang <15209050+changjian-wang@users.noreply.github.com>

* Update samples to include ContentRange usage for document, video, and audio analysis

* Reintroduce ContentRange analysis example for document processing in AnalyzeBinaryAsync sample

* Add tests for ContentRange functionality in document, video, and audio analysis samples

* Remove duplicate explanation of AnalysisResult.Contents in Sample01_AnalyzeBinary.md

* Update samples and tests to enhance ContentRange usage for document, video, and audio analysis

* Refine assertions in AnalyzeVideoUrlAsync and AnalyzeAudioUrlAsync to improve validation of ContentRange results

* Add samples for analyzing documents, videos, and audio with ContentRange

* Update Tag in assets.json to reflect the latest version for ContentUnderstanding

* Add range validation assertions for video and audio content analysis tests

* Add raw range string examples for document, video, and audio analysis

* Update assets.json tag and modify sample file paths in ContentUnderstanding tests

* Enhance content range tests with precise assertions for video and audio segments

* Update assertion in AnalyzeBinaryWithPageContentRangesAsync to check for exact page count

* Update sample file path in AnalyzeBinaryAsync to use sample_invoice.pdf

* Add detailed assertions for content range tests in AnalyzeBinaryWithPageContentRangesAsync

* Add LiveOnly tests for AnalyzeVideoUrlWithTimeContentRangesAsync and AnalyzeAudioUrlWithTimeContentRangesAsync

* Update content range tag in assets.json and add LiveOnly attribute to video and audio content range tests

---------

Co-authored-by: Changjian Wang <v-changjwang@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: changjian-wang <15209050+changjian-wang@users.noreply.github.com>
Co-authored-by: aluneth <wangchangjian1130@163.com>
* add config

* regen and export api

* add custom code and regen

* fixed test issue

* Fix case-sensitive path in tsp-location.yaml for Support SDK

The directory path used lowercase 'support' but the actual path in
azure-rest-api-specs is 'Support' (uppercase S). This causes ENOENT
errors on case-sensitive Linux CI filesystems.

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

* add comments in custom code and delete unnecessary content added by copilot in changelog

* regen

* revert delete api compat version and regen

* regen

* remove useless sample project

* Link codegen bug issue #57073 to TenantSupportTicketCollection custom code

Add reference to #57073
in the custom code comment for TenantSupportTicketCollection.cs.

The MPG generator incorrectly assigns resourceScope 'Subscription' instead
of 'Tenant' for TenantSupportTicket in tspCodeModel.json, requiring custom
workarounds for ValidateResourceId and GetAll/GetAllAsync methods.

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

* Regen Support SDK: remove custom code no longer needed

Generator now correctly handles:
- TenantSupportTicket scoping (tenant-level)
- TenantFileWorkspace extension methods on TenantResource
- ValidateResourceId for both collections

Remaining custom code (ApiCompat):
- ChatTranscriptDetailData/FileWorkspaceDetailData public ctors
- ProblemClassificationData.SecondaryConsentEnabled
- SupportAzureServiceData.ResourceTypes
- TranscriptContentType struct + ChatTranscriptMessageProperties.ContentType

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

* fixed test issue

* Update commit hash in tsp-location.yaml

* Regenerate Support SDK with latest emitter (0.66.x)

Rebased on latest main to pick up emitter version
@azure-typespec/http-client-csharp-mgmt@1.0.0-alpha.20260314.2

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

* Update main commit hash in tsp-location.yaml

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Arcturus Zhang <dapzhang@microsoft.com>
#57248)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… parameters (#57253)

* Fix child resource accessor methods not passing path parameters

BuildGetChildResourceMethods() in ResourceClientProvider.cs generates collection
getter and Get/GetAsync methods for child resources on a parent resource class.
When child resources have extra path parameters (e.g., nestedResourceTypeFirst),
these parameters were:

1. Not passed to the collection constructor in the getter method body
2. Not included in the Get/GetAsync method signatures
3. Not forwarded when calling the collection getter from Get/GetAsync methods

This caused broken generated code for any ARM resource with nested children that
have intermediate path segments (e.g., ProviderHub's NestedResourceTypeFirstSku,
SecondSku, ThirdSku under ResourceTypeRegistration).

Also adds defensive TryGetValue in ArmProviderSchema.Deserialize to avoid
KeyNotFoundException when building parent-child resource linkage.

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

* Add regression tests for nested child resource path parameter forwarding

Add test data builder ClientWithNestedChildResource() that creates a parent
resource with a nested child resource having an extra path parameter
(nestedTypeName) between parent and child segments.

Add two tests:
- Verify_NestedChildResource_CollectionGetter_IncludesPathParameters: ensures
  the collection getter method includes the intermediate path parameter
- Verify_NestedChildResource_GetMethods_IncludePathParameters: ensures both
  sync and async Get methods include the intermediate path parameter

Also add BuildArmProviderSchemaMultiResource() helper and ResourceSchemaInput
record to support multi-resource test scenarios.

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

* Fix GetCachedClient cache collision for parameterized collection getters

When collection getters have path parameters (e.g. nestedTypeName),
GetCachedClient is unsafe because its cache key is only typeof(T).
Different parameter values would silently return the first cached instance.

Skip GetCachedClient and create the collection directly when path
parameters are present. Keep GetCachedClient for parameter-less
collection getters where caching is safe.

Add test proving the cache collision behavior.

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

* Revert defensive warning in ArmProviderSchema.Deserialize

Fail-fast on malformed schema is the better contract for a generator.
The original KeyNotFoundException on missing parent resource is earlier,
closer to the bad input, and easier to diagnose than a deferred warning.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#57335)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….0.0-alpha.20260322.3 (#57341)

Co-authored-by: Arcturus Zhang <dapzhang@microsoft.com>
…ody (#57244)

Co-authored-by: haiyuazhang <1924967+haiyuazhang@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Haiyuan Zhang <haiyzhan@microsoft.com>
….0.0-alpha.20260322.4 (#57347)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Wei Hu <huwe@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Model Inference AI Projects Client This issue is related to a non-management package CodeGen Issues that relate to code generation Event Grid Health Deidentification Image Analysis KeyVault Mgmt This issue is related to a management package. Monitor - Query Provisioning Schema Registry

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.