Draft
[Monitor] Fix Avocado MULTIPLE_API_VERSION: add GA stable/2026-01-01/metricAlert.json with single-version readme#44121
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com>
Regenerate MetricAlert swagger outputs for TypeSpec validation
Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com>
…/fix-typespec-validation-job-yet-again
…yet-again Copilot/fix typespec validation job yet again
- Added comprehensive response bodies for multiple metric alert examples, including dynamic and static threshold criteria. - Updated existing examples to include new properties such as actions, criteria, and tags for better clarity and usability. - Ensured consistency across examples for various alert types, including single resource, multiple resources, and subscription-level alerts. - Improved formatting and structure of JSON responses to align with best practices and enhance readability.
…anges The preview swagger metricAlert.json was inadvertently modified when the TypeSpec error model was updated (MetricAlertErrorResponse -> Microsoft.Common.ErrorResponse). Modifications to an existing published preview swagger are breaking changes. Restoring 2024-03-01-preview/metricAlert.json to its original state on main branch. The new error model only applies to the new stable 2026-01-01 swagger.
…lidations due to validator issues
…s for metricAlert.json
…ions for aggregation and operator types
…rator, and sensitivity types
…rations - Added examples for creating/updating metric alerts for multiple resources, single resources, and resource groups. - Included dynamic threshold criteria and static threshold criteria in the examples. - Enhanced examples with identity, action properties, and custom properties. - Updated existing examples to reflect new naming conventions and structures. - Included webhook properties and failing periods in the alert configurations. - Added examples for web test metric alerts and alerts with dimensions.
Next Steps to Merge⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛Comment generated by summarize-checks workflow run. |
…le-version readme.md to fix Avocado MULTIPLE_API_VERSION The failing CI job (Swagger Avocado - Analyze Code) reported MULTIPLE_API_VERSION on Insights/readme.md because its default tag package-2025-08 contains swaggers from many different API version folders (2015–2026). The fix avoids touching Insights/readme.md (which would re-trigger the check) by: 1. Adding the GA stable/2026-01-01/metricAlert.json swagger generated from TypeSpec 2. Adding all stable/2026-01-01/examples/ metric alert example files 3. Adding stable/2026-01-01/readme.md with a single-version default tag (package-2026-01-01) referencing both activityLogAlerts_API.json and metricAlert.json With readme.md present in stable/2026-01-01/, avocado's findTheNearestReadme traces the new swagger files to this single-version readme (no MULTIPLE_API_VERSION), and Insights/readme.md with its composite multi-version default tag is never evaluated. Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com>
… Email.Subject typo in examples Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com>
Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job Swagger Avocado - Analyze Code
[Monitor] Fix Avocado MULTIPLE_API_VERSION: add GA stable/2026-01-01/metricAlert.json with single-version readme
Jun 21, 2026
…/fix-swaggervavocado-analyze-code-job
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
Comment generated by After APIView workflow run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Swagger Avocado - Analyze CodeCI job fails withMULTIPLE_API_VERSIONonInsights/readme.mdbecause its default tagpackage-2025-08spans 14+ API version folders (2015–2026). Avocado'sisPRRelatedError()always surfaces this for Monitor PRs, so it cannot be suppressed via targetMap deduplication.Changes
stable/2026-01-01/metricAlert.json— GA stable Metric Alerts swagger (promoted frompreview/2024-03-01-preview); securityDefinitions updated to Microsoft Entra ID terminologystable/2026-01-01/examples/— 26 metric alert example files aligned tox-ms-examplesreferences in the swaggerstable/2026-01-01/readme.md— new single-version AutoRest readme (tag: package-2026-01-01) referencing bothactivityLogAlerts_API.jsonandmetricAlert.jsonFix strategy
By adding
stable/2026-01-01/readme.md, avocado'sfindTheNearestReadmeresolves the new swagger files to the single-version readme rather than the compositeInsights/readme.md. SinceInsights/readme.mdis never touched, it is never added toreadmeDirsand never evaluated — theMULTIPLE_API_VERSIONerror is never triggered. Verified locally with avocado exit code 0.Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!
Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.
Additional information
Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the
Generated ApiViewcomment added to this PR. You can use ApiView to show API versions diff.Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.
Getting help
Purpose of this PRandDue diligence checklist.write accessper aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositoriesNext Steps to Mergecomment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.and https://aka.ms/ci-fix.
queuedstate, please add a comment with contents/azp run.This should result in a new comment denoting a
PR validation pipelinehas started and the checks should be updated after few minutes.