Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/rulesets/generated/spectral/az-arm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3328,6 +3328,7 @@ const ruleset = {
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?

formats: [oas2],
given: ["$[paths,'x-ms-paths'].*.*[?(@property === 'x-ms-long-running-operation' && @ === true)]^.responses.*"],
then: {
Expand Down
1 change: 1 addition & 0 deletions packages/rulesets/src/spectral/az-arm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ const ruleset: any = {
description: "All long-running operations must include an `Azure-AsyncOperation` response header.",
message: "{{description}}",
severity: "error",
stagingOnly: true,
formats: [oas2],
given: ["$[paths,'x-ms-paths'].*.*[?(@property === 'x-ms-long-running-operation' && @ === true)]^.responses.*"],
then: {
Expand Down