💥 Move setResponse from response to after.response middleware + fix missing unit test methods #901
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.
Proposed changes
Fixes
jovo-plugin-inbox
from shallow to deepDeprecation
jovo-analytics-voicehero
after service shutdown (issue Drop VoiceHero integration package #899)Breaking change
Currently, platform responses are called in the
response
middleware. Other plugins - like any analytics integration - hook into theresponse
middleware to post data after thesetResponse
of the host (Lambda, etc) has been called. This works because the request is not completed until all processes have run through. This won't work for Lambda with enabledcallbackWaitsForEmptyEventLoop
. Tasks in theresponse
middleware pipe could be canceled before they are completed.With this change
setResponse
is called inafter.response
. This would complete every task inresponse
before the payload is returned.Depending on depth and type of customization this could break plugins that hook into the
response
middleware.Quick fix for these cases would be changing the middleware from
response
toafter.response
Types of changes
Checklist