unee-t / bz-database

Scripts and schema for the bz database so we can build the BZ FE
GNU Affero General Public License v3.0
0 stars 2 forks source link

CRITICAL - Add information to the notification payload #115

Closed franck-boullier closed 5 years ago

franck-boullier commented 5 years ago

The problem:

In order to be able to manage the new and improved notification mechanism, we need to add the following information to the payload of the notification message:

The objects we need to alter:

DB triggers:

DB procedures:

franck-boullier commented 5 years ago

Done in the DEV/Staging and in the DEMO envo. Waiting to check if this works as intended:

kaihendry commented 5 years ago

I'm not sure how to test this. There is a dev regression this monday morning, not sure if it's related. cc @nbiton

nbiton commented 5 years ago

I don't think it can be related

franck-boullier commented 5 years ago

I'm not sure how to test this

@Kaihendry: see my earlier comment:

  • Make sure all the Uilicious automated tests are still working as they should
  • Make sure that @nbiton has enough to implement the new and improved notification preferences. (see unee-t/frontend#331 for more details)

Not sure how I can be clearer on how to test this 🤔

kaihendry commented 5 years ago

There is a regression. I don't know if the changes here contributed to it as it's not easy to bisect the change.

Perhaps before making a change, do a backup and post a link to the SQL? This would allow Devops person like myself to roll back to previous state to confirm.

I would of course snapshot the DB before rolling back.

I could use an RDS snapshot, but then I would need to guess when the changes were made and choose a time before that.

tl;dr We need to co-ordinate to make sure these changes work.

franck-boullier commented 5 years ago

We need to co-ordinate to make sure these changes work.

Sure!

@kaihendry

I'm going to try to understand what's wrong with the upgrade I did in the DEV/Staging and DEMO envo. It has to be something inside https://github.com/unee-t/bz-database/blob/schema_v4.32.0_lambda_improvements/db%20scripts%20to%20add%20objects%20to%20the%20schema/Add_all_lambda_related_objects_v4.32.sql ...

@nbiton can you please tell me if the DEV/Staging and DEMO environment are generating the new payload correctly?

kaihendry commented 5 years ago

On dev the lambda call accountIDs appear incorrect. https://media.dev.unee-t.com/2019-03-05/accountID.mp4

This is a manual check (not automatic alerting) at present via Postman

kaihendry commented 5 years ago

IIUC we need to build some test payloads for the revised notification_type payloads.

I have previously kept these: https://github.com/unee-t/lambda2sns/tree/master/tests/events

And now they need to be updated. I am actually not 100% sure how these should be done, since I am not 100% sure how to trigger each event in the UI.

nbiton commented 5 years ago

Confirmed to be resolved. The new message payload attributes are present:

Thanks to @kaihendry for helping me retrieve the recent samples of message payloads.

nbiton commented 5 years ago

Also:

These two are used for determining when a case has been made resolved