stoplightio / spectral-action

GitHub Action wrapper for Spectral - a JSON/YAML/OpenAPI/AsyncAPI/etc linter with custom rule support.
https://stoplight.io/open-source/spectral
Apache License 2.0
85 stars 46 forks source link

spectral-action reports success due to "Error: You have exceeded a secondary rate limit." #660

Open bdoughan-snow opened 6 months ago

bdoughan-snow commented 6 months ago

The spectal-action is not failing when linting an OpenAPI document with a large (over 1000 errors). The issue appears to be that it is hitting "Error: You have exceeded a secondary rate limit".

Context

PRs with OpenAPI documents with a large amount of errors are passing the check. This makes the check useless in this case.

Current Behavior

PRs with OpenAPI documents with a large amount of errors are passing the check.

Expected Behavior

OpenAPI docs that should fail the PR check are passing.

Possible Workaround/Solution

I have not found a workaround yet. If the spectral-action hits this error it should report a failuire.

Steps to Reproduce

  1. Use spectral-action to lint a document with over 1000 errors.

Environment

maxwlang commented 5 months ago

Seeing this too

owebb98 commented 1 month ago

Also seeing this

acolombier commented 17 hours ago

I have made a fix for it here - it should allow you to publish 1000+ (I tried with my project containing 1400, which all got published successfully)

diff --git a/.github/workflows/spectral.yml b/.github/workflows/spectral.yml
index e1b254ab72..4aca040f10 100644
--- a/.github/workflows/spectral.yml
+++ b/.github/workflows/spectral.yml
@@ -16,6 +16,6 @@ jobs:
       - uses: actions/checkout@v3

       # Run Spectral
-      - uses: stoplightio/spectral-action@v0.8.11
+      - uses: acolombier/spectral-action@de2a9d36832b9a5c674d583e1538396ecc94adf4
         with:
           file_glob: 'doc/api/*.yaml'

Happy to create a PR for it, but sadly, I'm not sure if any maintainer is looking at that repo....