Update lambda response handling #252
Merged
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.
The lambda has been updated to return a boolean rather than a string when making a prediction. This means we need to update the cassettes, and also the comparison we perform as part of the response handling.
There are tests and cassettes that capture the new behavior, but if you want to see it live, I've added the env vars to the review app to point at the lambda in Dev1. Opening a console in the review app should allow you to kick off the whole process, see logs get generatd in Cloudwatch, and see the response from the detector get parsed correctly into the Detector::MlCitation model.
Developer
Ticket(s)
https://mitlibraries.atlassian.net/browse/TCO-157
Accessibility
all issues introduced by these changes have been resolved or opened
as new issues (link to those issues in the Pull Request details above)
Documentation
ENV
Stakeholders
Dependencies and migrations
NO dependencies are updated
NO migrations are included
Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing