I recently noticed that netlify lambda functions sometimes return responses from previous deployments.
To test this issue, I commit a version.js which output an integer version number and bump the version number from 1 to 2 to 3 in several commits.
For example, when visiting https://eager-booth-dc4b16.netlify.com/.netlify/functions/version, it should output ‘version: 3’.
I noticed that it outputs ‘version: 3’ right after my commit. But after several minutes, it outputs ‘version: 2’ when I visit the link again. Then after a couple of minutes, it outputs ‘version: 3’.
It seems that some other users reported similar issues in the past year:
It seems that the problem still exists? And it looks like some edge nodes still point to previous versions of lambda function after the latest deployment.
I have used netlify for some time. The other functions work very well and I really enjoy it. Hope this issue can be solved.