Azure / Azure/azure-sdk-tools

[LintDiff] CI improvements - check for `rush build` run and prevent local breakage

Open
#6,141 0 comments 0 reactions 1 assignee Claimed by @konrad-jamrozik View on GitHub
Central-EngSys enhancement Spec PR Tools
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
144

Description

- [ ] Check if `rush build` was run
If a person forgets to run `rush build` locally before submitting PR, some generated code might be missing and the CI check won't catch this. This needs to be fixed. Example when this happened in the past:
- https://github.com/Azure/azure-openapi-validator/pull/509

Note that even if there are no substantial changes running `rush build` locally will produce pending git changes which result in empty diff when committed. This is possibly caused by newline changes. This needs further investigation. Any added CI check needs to account for that.

- [ ] Prevent local run breakage
Some changes can break local execution which is not currently captured by our CI. Example of the breakage repro is here:
- https://github.com/Azure/azure-openapi-validator/pull/504

And a fix for that breakage here:
- https://github.com/Azure/azure-openapi-validator/pull/510/commits/c89d172d5db9ab3f4be27548e3bb0122f4952466

At this point it is unclear fi this issue happens only upon local repro attempts, or also in the specs PR check run. It might be also happening in the check run.

My working theory is that a problem with rule causes something being output to stdout which is intercepted by autorest which expects proper HTML response and hence produces the error. I suspect this because I observed the same kind of failure when I tried to write out something out to console from the LintDiff code, in `main()` method.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.