Skip to content

Conversation

@tejaswiMinnu
Copy link
Contributor

Updated rule RPC-Async-V1-06 to staging only

description: "All long-running operations must include an `Azure-AsyncOperation` response header.",
message: "{{description}}",
severity: "error",
stagingOnly: true,
Copy link
Member

@mikeharder mikeharder Mar 11, 2025

Choose a reason for hiding this comment

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

Do you have a way of testing staging rules? The previous LintDiff "staging" pipeline has been deprecated. We may want to find a different way to test new rules against organic PRs.

CC: @rkmanda

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we have another option, so I'll discuss it with Roopesh.
I've added this to staging for now to prevent it from accidentally being shipped to production. We are waiting for some changes in TypeSpec, which Mark Cowlishaw needs to review and respond to.

Copy link
Member

Choose a reason for hiding this comment

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

@mikeharder Would adding this flag atleast ensure that the rule is not run in the production swagger lintdiff pipeline? For now the main thing we want to achieve is to not accidentally ship this rule until a change is made in TypeSpec for which we are following up with Mark Cowlishaw.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the flag should disable the rule in prod. But, why merge this PR to main at all until TypeSpec is ready?

Copy link

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 the stagingOnly: true property to the RPC-Async-V1-06 rule (LroAzureAsyncOperationHeader), which ensures that this rule will only run in staging environments and not in production.

Key Changes:

  • Added stagingOnly: true flag to the LroAzureAsyncOperationHeader rule configuration

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
packages/rulesets/src/spectral/az-arm.ts Added stagingOnly: true to the LroAzureAsyncOperationHeader rule definition in the TypeScript source
packages/rulesets/generated/spectral/az-arm.js Added stagingOnly: true to the LroAzureAsyncOperationHeader rule definition in the generated JavaScript output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants