Functions CDN too slow to update to new commit

@Dennis it seems the redirect idea is not working. Here is what I did:

In netlify.toml:

[[redirects]]
  from = "/api/v1/graphql"
  to = "/.netlify/functions/api-proxy-HASH"

In package.json, I prepended my build command with:

sed -i s/HASH/${COMMIT_REF}/g netlify.toml &&

And before building the functions, I execute:

mv src/api-proxy.js src/api-proxy-$COMMIT_REF.js

After deploy, I can see that the function was created and deploy with the appended name, however I still receive an old response when I hit /api/v1/graphql.

Can you double confirm whether this caching issue happens before or after redirect rules are applied? Or maybe I’m missing something in my changes?

hey everyone,

we want to thank you for your patience as we worked internally to resolve this tricky issue, but we think we have some good news. We think we have found a way to fix the underlying issue and this behaviour should now no longer occur. :tada:

please, if do see this resurface, please let us know right away! otherwise, enjoy a much better experience with functions acting reliably as you were expecting them to :slight_smile:

1 Like

I’ve checked and it works for me indeed. Thanks a lot to the team for rolling out the fix, saved me from an emergency migration to cloudflare workers! :tada:

1 Like

awesome. that makes me (personally) extremely happy!

1 Like