Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
issue 1
when the bot doesn't need to publish the luis files and the luis settings may be empty, we don't need to do luis publish. But in our azure publish flow today, we still publish luis to the prediction endpoint, and will throw error when the setting is empty.
fix
Don't do luis publish when we have no luis build.
issue 2
during the azure publish state, we use bf-lu to build the luis file. and bf-lu will create a setting file after the build finish. The file name format is luis.settings.{environment}.{region}.json. If user remove the environment from the settings, the name will become luis.settings..{region}.json. But the runtime has a default value when the environment is empty. So the runtime can't load the setting file when the environment is empty.
fix
add default value when the environment is empty.
Some other update
There is a logger will use the response to print from the publish request. But the response is not match the logger parameter in the azure publish flow. It will throw error when the flow run to this line. So in this PR I remove it first and we can take some time to investigate the response and make it available here.
In the feature, I think we should check the publish config before publishing. This may reduce some strange issues.
Task Item
#minor
closes #5108
Screenshots