open-policy-agent / opa

Open Policy Agent (OPA) is an open source, general-purpose policy engine.
https://www.openpolicyagent.org
Apache License 2.0
9.7k stars 1.35k forks source link

[docs] live block generation is broken for some old versions #5593

Open charlieegan3 opened 1 year ago

charlieegan3 commented 1 year ago

When working on https://github.com/open-policy-agent/opa/pull/5592 I was unable to run make netlify-prod. All tasks complete other than make live-blocks-inject which fails with a large error starting with:


--- Errors for ../../public//docs/v0.36.1/policy-performance/index.html ---
ChainedError: indexed evaluation failed for an unexpected, possibly internal reason (check for additional logs): unable to perform local evaluation
    at /Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/preprocess/index.js:217:13
    at async process (/Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/helpers.js:171:18)
    at async Promise.all (index 0)
    at async batchProcess (/Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/helpers.js:177:3)
    at async populateOutputs (/Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/preprocess/index.js:196:3)
    at async processFile (/Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/preprocess/index.js:72:3)
    at async handleLater (/Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/helpers.js:151:13)
    at async /Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/helpers.js:193:15
    at async process (/Users/charlieegan3/Code/opa/docs/website/scripts/live-blocks/src/helpers.js:171:18)
    at async Promise.all (index 0)

I can see that this same issue is present in the production docs website:

https://www.openpolicyagent.org/docs/v0.36.1/policy-performance/#use-indexed-statements

vs latest (which is working)

https://www.openpolicyagent.org/docs/latest/policy-performance/#use-indexed-statements

There may be other versions that are broken but the error is so large it's hard determine exactly which versions are impacted.

srenatus commented 1 year ago

hm interesting, good catch!

I can't see those errors in the netlify logs, though: https://app.netlify.com/sites/openpolicyagent/deploys/63d02f5590b1b0000a78446f#L642

But obviously something's going on on the website, as you pointed out correctly. Weird!

stale[bot] commented 1 year ago

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.