-
Notifications
You must be signed in to change notification settings - Fork 19
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
Only save session vars to call_logs
#931
Merged
ysbaddaden
merged 2 commits into
master
from
fix/921-failure-to-persist-call-logs-js-context
Mar 28, 2023
Merged
Only save session vars to call_logs
#931
ysbaddaden
merged 2 commits into
master
from
fix/921-failure-to-persist-call-logs-js-context
Mar 28, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hum, I can do much better here:
|
call_logs
Done. Now, let's test it. |
96e68df
to
67f6ea5
Compare
ysbaddaden
commented
Mar 21, 2023
matiasgarciaisaia
approved these changes
Mar 21, 2023
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!
Except for the comment that I've left, and as far as I can review this, looks good to me :) |
leandroradusky
approved these changes
Mar 22, 2023
ba37e10
to
c7c5c3b
Compare
Changes the call_logs.js_context column to a BLOB instead of TEXT, and leverages `term_to_binary/1` and `binary_to_term/1` to serialize the Erlang termns to binary and back.
The call log now longer saves the js context but only the session vars, and only when needed to (otherwise it's an empty proplist). The session vars are serialized to YAML so we can process them in Ruby as well as Erlang. The active GC now reconstructs the callback url from the project associated to the call log, and authenticates the callback (this was previously overlooked). The `js_context` and `callback_url` columns have been dropped from the `call_logs` table as we don't need them anymore.
c7c5c3b
to
835fe2f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes thecall_logs.js_context column
to a BLOB instead of TEXT, and leveragesterm_to_binary/1
andbinary_to_term/1
to serialize the Erlang terms to binary and back.Note: I assume that the commit was never actually released to production, as we can't save anything. I'm still cleaning up the column to NULL, not that it would break the text to binary migration but to make sure the Broker won't receive invalid data.The call log no longer saves the js context but only the session vars, and only when needed to (otherwise it's an empty proplist). The session vars are serialized to YAML so we can process them in Ruby as well as Erlang.
The active GC now reconstructs the callback url from the project associated to the call log, and authenticates the callback (this was previously overlooked).
The
js_context
andcallback_url
columns have been dropped from thecall_logs
table as we don't need them anymore.fixes #921
fixes instedd/surveda#2220