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

Fix lambda calls in {dev,demo} #116

Closed kaihendry closed 5 years ago

kaihendry commented 5 years ago

https://media.dev.unee-t.com/2019-03-01/rds-lambda.checks.mp4

Run lambda checks in Postman will show that accountIDs and calls are not properly set in {dev,demo}

These RDS checks are performed by https://github.com/unee-t/rdslint If they are wrong or could be improved, please let me know: https://github.com/unee-t/rdslint/issues

kaihendry commented 5 years ago

Sidenote: Once these corrections are made we should perform a backup and restore to ensure it works: https://github.com/unee-t/bugzilla-customisation/tree/master/backup

I am still a little confused about the users. This needs to be documented.

franck-boullier commented 5 years ago

Yes we should be able to fix these. Yesterday I worked on a script which should help: 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.31.sql

@kaihendry can you try this please in the Demo? Make sure to read the important comments and instructions that I included in the script and ping me if any question

kaihendry commented 5 years ago

lambda_notification_case_event seems to be missing from Add_all_lambda_related_objects_v4.31.sql

dev fixed

sed -i 's,192458993663,812644853088,g' Add_all_lambda_related_objects_v4.31.sql
mysql -h auroradb.dev.unee-t.com -P 3306 -u unee_t_root --password=$(ssm uneet-dev unee_t_root-Password) bugzilla < Add_all_lambda_related_objects_v4.31.sql

demo fixed

Fixed with a manual alter: https://s.natalian.org/2019-03-01/1551423435_2560x1440.png

_lambda_notification_caseevent is outstanding, so did a manual edit of the account number. And there is also the question on root vs unee_t_root

franck-boullier commented 5 years ago

the question on root vs unee_t_root

Both should work the same. The difference is the user who ran the script in Demo was unee_t_root and the user who ran the procedure in the DEV/Staging was root. There are several ways to fix that but this is very minor IMO. It would be nice to be consistent though...

franck-boullier commented 5 years ago

lambda_notification_case_event is outstanding

I don't understand why this procedure is still there: there must have been some issues at some point. Anyway the procedure lambda_notification_case_event should not exist (it does not exist in the PROD or in the DEV/Staging) it was delete and replaced by the procedure lambda_notification_case_updated in the DB schema version v3.13

franck-boullier commented 5 years ago

@kaihendry I have deleted the procedure lambda_notification_case_updated in the DEMO envo. to make it like PROD and DEV/Staging

franck-boullier commented 5 years ago

AFAICT there is nothing left for me to do on this issue. @kaihendry I'm assigning it back to you so you can close this as you see fit