Home
Support Forums

It’s seems all my builds are down due to roles condition

All my project are failing to rebuild. Fresh builds are working after clearing cache, but for some reason the go code cannot restore the previous cache json

In the build log I can find the following error when trying to parse the cached build.
I.e. the
5:38:45 AM: Build ready to start

5:38:47 AM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302

5:38:47 AM: build-image tag: v3.7.6

5:38:47 AM: buildbot version: 00e794c8abfdf634e411d5afc169b41bd6a2f9f3

5:38:47 AM: Fetching cached dependencies

5:38:48 AM: Starting to download cache of 1.7GB

5:39:10 AM: Finished downloading cache in 22.349294237s

5:39:10 AM: Starting to extract cache

5:39:47 AM: Finished extracting cache in 36.850246865s

5:39:47 AM: Finished fetching cache in 59.476701101s

5:39:47 AM: Starting to prepare the repo for build

5:39:47 AM: Preparing Git Reference refs/heads/master

5:39:49 AM: Parsing package.json dependencies

5:39:49 AM: Creating deploy upload records

5:39:49 AM: Failing build: Failed to parse configuration

5:39:49 AM: Failed during stage ‘Reading and parsing configuration files’:
… large JSON of my redirects and edge handlers with the error here …
: json: cannot unmarshal string into Go struct field RedirectCondition.Config.redirects.conditions.role of type string

12:01:03 AM: Finished processing build request in 1m0.863216717s
This kind of stuff will break all of our builds because a normal user of our system cannot really clear build caches :frowning:

Ok, I was wrong it’s not “Edge handlers” but the Roles condition that’s causing the problem. Builds seem to work after caching, but not under rebuild.
The declaration of the Role condition seems to have changed to string, but the current builds still write it out as a single string with commas in it as in

{
        "path": "/home/*",
        "query": {},
        "to": "/home/:splat",
        "status": 200,
        "force": true,
        "conditions": {
          "Role": "s-9ef85bb05b-a,s-a-a,s-9ef85bb05b-4807206ddd,s-9ef85bb05b-9b1dd881be,s-9ef85bb05b-edfc40d809,s-9ef85bb05b-0f936c550f,s-9ef85bb05b-c60f984105,admin,super"
        },
        "headers": {},
        "proxy": false
      },

Then on rebuild when it tries to read the current redirects the build fails.

Hi,

We’ve created an incident here: https://www.netlifystatus.com/
You’ll get the latest updates regarding the incident on that page. Hopefully it’ll be resolved soon!