Skip to content

Fix TypeSpec Validation CI: format MetricAlertResource.tsp and regenerate swagger outputs#43951

Closed
sidanmor with Copilot wants to merge 8 commits into
mainfrom
copilot/fix-typespec-validation-job-one-more-time
Closed

Fix TypeSpec Validation CI: format MetricAlertResource.tsp and regenerate swagger outputs#43951
sidanmor with Copilot wants to merge 8 commits into
mainfrom
copilot/fix-typespec-validation-job-one-more-time

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

TypeSpec Validation CI was failing because MetricAlertResource.tsp had a single-line ArmResourceRead<...> template argument that exceeded the formatter's line length limit. Running tsp format expands it to multi-line, and the compiled swagger outputs needed regeneration to match.

Changes

  • MetricAlertApi/MetricAlertResource.tsptsp format fix: expand get is ArmResourceRead<MetricAlertResource, Error = Microsoft.Common.ErrorResponse> to multi-line:
    -  get is ArmResourceRead<MetricAlertResource, Error = Microsoft.Common.ErrorResponse>;
    +  get is ArmResourceRead<
    +    MetricAlertResource,
    +    Error = Microsoft.Common.ErrorResponse
    +  >;
  • preview/2024-03-01-preview/metricAlert.json, stable/2026-01-01/metricAlert.json — regenerated via tsp compile to reflect switch from MetricAlertErrorResponseMicrosoft.Common.ErrorResponse
  • 8 example files under MetricAlertApi/examples/2026-01-01/ and stable/2026-01-01/examples/ — fixed typo Email.SujbectEmail.Subject in customProperties demo values

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • Other, please clarify:
    • Fix TypeSpec formatting violation and regenerate swagger outputs to unblock CI

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:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    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.
  • A release plan has been created. If not, please create one as it will help guide you through the REST API and SDK creation process.

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 ApiView comment 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

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.
  • For guidance on SDK breaking change review, refer to https://aka.ms/ci-fix.

…-stream1-v2' into copilot/fix-typespec-validation-job-one-more-time

Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown

Next Steps to Merge

Important checks have failed. As of today they are not blocking this PR, but in near future they may.
Addressing the following failures is highly recommended:
  • ⚠️ The check named Swagger PrettierCheck has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Monitor Monitor, Monitor Ingestion, Monitor Query label Jun 14, 2026
Copilot AI and others added 2 commits June 14, 2026 11:02
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 TypeSpec validation Fix TypeSpec Validation CI: format MetricAlertResource.tsp and regenerate swagger outputs Jun 14, 2026
Copilot AI requested a review from sidanmor June 14, 2026 11:06
@sidanmor sidanmor closed this Jun 14, 2026
@sidanmor

Copy link
Copy Markdown
Member

No need

@sidanmor sidanmor deleted the copilot/fix-typespec-validation-job-one-more-time branch June 14, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor Monitor, Monitor Ingestion, Monitor Query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants