Skip to content

[TypeSpec Validation] Ensure "All" pipeline fails if no specs are validated #26318

@mikeharder

Description

@mikeharder

The change in #26276 (reverted in #26316), caused Get-TypeSpec-Folders.ps1 --CheckAll to no-op rather than returning all specs. This caused pipeline TypeSpec Validation - All to "pass", since no specs were validated (and none failed):

Starting: Validate All Specs
==============================================================================
/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/mnt/vss/_work/_temp/6cce655a-600a-44aa-b949-858f7dbe07c8.ps1'
Finishing: Validate All Specs

https://dev.azure.com/azure-sdk/public/_build/results?buildId=3174617&view=logs&j=f2650786-f3c8-5076-65bc-1ba9b64fac25&t=dbe5b552-8159-5dbd-6d0f-1a1649e01974

This is a very dangerous failure mode, since it causes the pipeline to pass, even though nothing was validated.

Please update pipeline typespec-validation-all.yml to fail if Validate-TypeSpec.ps1 -CheckAll doesn't actually validate any specs.

Metadata

Metadata

Assignees

Labels

Spec PR ToolsTooling that runs in azure-rest-api-specs repo.

Type

No type

Projects

Status

🎊 Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions