spiffe / spiffe.io

Source for the SPIFFE and SPIRE project websites. Hosted by the Cloud Native Computing Foundation
https://spiffe.io/
Other
26 stars 61 forks source link

Full build of site is flaky #250

Closed ajessup closed 2 years ago

ajessup commented 2 years ago

Looking at the Netlify deploy logs (https://app.netlify.com/sites/spiffe/deploys) it seems that there's often sporadic failures that can be resolved by just retrying the build. At least a few of these have failed with:

10:45:13 AM: ERROR 2022/07/29 14:45:13 Failed to get JSON resource "https://api.github.com/repos/spiffe/spire/releases": Failed to retrieve remote file: Forbidden

Examples:

It would be nice to make this code a little more resilient (perhaps retries?) to minimize this flakiness.

mchurichi commented 2 years ago

This error started to show up some time ago and it's getting more frequent. I don't know what the cause is but I've only seen this on Netlify, not locally, so I guess it may be related to their build system. Anyways, as the error comes from Hugo trying to dynamically load content the fix is not as straightforward as one could think, as it does not allow to set a retry policy. #251 should fix this by removing the dynamic loading and pre-loading (with retries) the json even before Hugo starts.