Azure / Azure/azure-rest-api-specs

[LintDiff] Failure when parsing $refs for files that don't exist

Open
#33,848 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Example build: https://github.com/Azure/azure-rest-api-specs/actions/runs/14371309080/job/40294750003

* The file referenced does not exist so the error is valid
* The diff contains no swagger or readme changes
* In the event of no swagger or readme changes, LintDiff should exit with success instead of failing

Legacy LintDiff does ignore that failure: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4743133&view=logs&j=0574a2a6-2d0a-5ec6-40e4-4c6e2f70bea2&t=80c3e782-49f0-5d1c-70dd-cbee57bdd0c7

Another example: https://github.com/Azure/azure-rest-api-specs/actions/runs/14370951430/job/40293771261
Watch links: https://github.com/Azure/azure-rest-api-specs/actions/runs/14371086728/job/40294150581

* This does have a readme and swagger changes. `$ref` parsing should probably silently exclude `/examples/` files. It might make sense for another tool to surface this.

Contributor guide

Open the contributing guide

Research direction

Start by locating LintDiff's $ref parsing and the logic that checks for swagger or readme changes, using the linked GitHub Actions failures to reproduce the behavior. Done means missing references do not fail runs with no relevant changes, while references under /examples/ are handled appropriately when swagger or readme changes are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.