[engine] Boost v3 notifIcations minds#3624
Ticket(s) / Related Merge Requests
- Issue card minds#3624 (closed)
- Front MR front!2156 (merged)
Summary of Changes
Testing Considerations
Boost creation
Create a boost and then enter Vitess, and grab the GUID for the boost. - we cannot do this through the console as it hasn't been updated yet. You may need to proxy vtgate via kubectl port-forward -n vitess svc/minds-vtgate 3307:3306
- I use TablePlus to access from here with the user role and can help you get set up if you like, or try access through a command something like mysql -h 127.0.0.1 -u user -P 3307
. You WILL need the password for the user user
to get in.
Dispatching notifications
I created a CLI job to do this easily. You will need to interpolate the boost ID into the below commands:
source /vault/secrets/env && php cli.php Boost triggerActionEvent --boostGuid='1459507044271788039' --eventType='reject' --rejectionReason=999
source /vault/secrets/env && php cli.php Boost triggerActionEvent --boostGuid='1459507044271788039' --eventType='approve'
source /vault/secrets/env && php cli.php Boost triggerActionEvent --boostGuid='1459507044271788039' --eventType='complete'
Note that on Sandbox the system user seems to have some issues with the ACL preventing system notifications to show - to actually get them to appear, you will need to enter Cassandra and edit the notification sender to one that works on sandbox. First select all notifications from your user:
SELECT * FROM minds.notifications_mergeable WHERE to_guid=991463054707265537 LIMIT 20;
Find the ones you just made for boost, and change the from_guid to 991441275603390467
with the below command, interpolating your user ID into the to_guid
and the uuid
of the notif you want to change the value from into the uuid
(see below command):
UPDATE minds.notifications_mergeable SET from_guid=991441275603390467 WHERE to_guid=991463054707265537 AND uuid=55189ba0-90e5-11ed-8670-c5874f88fbfc;
When you check your notifications you should now see the notifications have came through.
To test push, make sure the account the boost belongs to has enabled push notifications, run the above commands and wait 30 seconds.
Troubleshooting
If you notice your notifications don't appear in Cassandra, get the image id of the deployment for the pod, and use it to replace the notifications runner image - for some unknown reason this drifted out of sync while developing, so just making a note of it incase it happens again.
Deployment Considerations
Make sure it is merged to runners
Reset push notif and notif runner images on QA passed.
Push
Push notifications should appear after running the above CLI commands for the triggerActionEvent
function of the Boost CLI controller. You will need to wait around 30 seconds for them to appear.
Regression Scope
Boost notifications, push and in-app.
Platform Affected (web, mobile, etc)
Web, Mob (mobile has changes to come)
Developer Testing Completed
Jasmine / Karma, PHPSpec, manual
Screenshots / Screen Recording
Completion push
Accept push
Reject push
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out