-
Notifications
You must be signed in to change notification settings - Fork 277
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
fix: small runtime tweaks #3519
Conversation
Can't log after response is written for some reason.
Pull Request Test Coverage Report for Build 712999684
💛 - Coveralls |
Roughly maps to behavior added via microsoft/botbuilder-dotnet#5421
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.
Looks good! Just one bit of feedback around filename handling.
if (nodeEnv) { | ||
files.unshift(`appsettings.${nodeEnv}.json`); | ||
} |
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.
Somehow my comment was lost... The norm in .NET is to use appsettings.Development.json
which means the JS SDK should standardize on an expected casing pattern... Or maybe do extra steps when looking for the appsettings.${nodeEnv}.json
.
If the SDK standardizes on one casing pattern, it could capitalize the value of NODE_ENV
as its value is normally lowercased, e.g. production
and development
.
Do the generators create the same filenames (appsettings.json
and appsettings.Development.json
) for both .NET and JS/TS bots?
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.
Generators don't create environment-specific settings files, at least not at the moment. To me, using process.env.NODE_ENV
directly is a more predictable behavior from the JS perspective. Once someone generates a project, the selected language is fixed. In this case, I think it's better to be consistent with JS expectations rather than trying to force .NET patterns. Doing zero transformations to the NODE_ENV
environment variable gives users the most flexibility, and they don't have to try to understand a potentially fluid set of rules.
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.
That works for me! I asked because it's important to have these discussions to make sure we as a team move in the right direction for our customers.
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.
* fix: azure logs issues Can't log after response is written for some reason. * fix: watch files in dev only * fix: load appsettings files based on NODE_ENV Roughly maps to behavior added via microsoft/botbuilder-dotnet#5421
* fix: azure logs issues Can't log after response is written for some reason. * fix: watch files in dev only * fix: load appsettings files based on NODE_ENV Roughly maps to behavior added via microsoft/botbuilder-dotnet#5421
Fixes #3520