-
Couldn't load subscription status.
- Fork 44
Make entry point failures blocking for v4 #691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
And provide an app setting to configure this behavior regardless of model version
Updated per offline sync regarding Node 20
|
A few updates after going back and forth with Brett on the host team. I was able to get an "end-to-end" scenario tested in Azure and I feel more comfortable with the overall experience now. Two main changes:
|
src/startApp.ts
Outdated
| // Instead, it will be thrown during functionMetadata or functionLoad response which better indicates that the user's app is the problem | ||
| worker.app.blockingAppStartError = error; | ||
| // This will ensure the error makes it to the user's app insights | ||
| console.log(error.stack); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make a difference here logging using console.log vs console.error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought they were the same, but console.error might result in a more accurate severityLevel in app insights. Let me try it out and get back to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah had a better severity level, thanks. Updated
And make this behavior the default starting with Node v20. For Node <v20, we'll provide an app setting
FUNCTIONS_NODE_BLOCK_ON_ENTRY_POINT_ERRORto configure this.There's still an edge case where you get an error before you've registered v4 as the programming model. Not much we can do about that for Node <20 because of #630, though
Fixes Azure/azure-functions-nodejs-library#85
Fixes #697