amida-tech / greyscale

Indaba - Turn knowledge into data :earth_africa: :earth_asia: :earth_americas:
http://indaba.amida-tech.com
Other
8 stars 4 forks source link

Feature/inba 329 jf upgrade pg lib #500

Closed jmfadeley closed 6 years ago

jmfadeley commented 6 years ago

What does this PR do?

This PR updates the pg node package to 7.4.3 and prepares us somewhat for rewriting Greyscale to use Sequelize, and probably do away with Thunkify.

@au2, the issue I was having is due to version 7.4.3 also returning the SET command of the namespace as the first of two fields of any query. Before we were getting only an object of the real query (ie, DELETE, SELECT). These calls are made twice on lines, like, 139 and 221 of util.js. If you notice any magic to ignore that, let me know.

Related JIRA tickets:

https://jira.amida-tech.com/browse/INBA-329 https://jira.amida-tech.com/browse/INBA-907

How should this be manually tested?

Assuming you still have su@mail.net in your auth db and with Amida-Auth-Microservice running, blow away indaba and indabatestuser and recreate the DBs. Run node seed.js. A test may fail due to date comparison (need to investigate), but ensure that you have a populated DB otherwise. Then log in and do a full regression test of all features.

If you don't have su@mail.net, you may need to create him or change the super user to an admin type in your auth microservice. You can change it under backend\config\config.js under testEntities.superAdmin.

Background/Context

Screenshots (if appropriate):

jmfadeley commented 6 years ago

@au2 I've implemented fixes for 1 thru 3. 4 and 5, I want to stop for a moment and pick your brain on tomorrow (Friday). I think I get it, but if my understanding it correct, there's going to be moderate code shaving.

jmfadeley commented 6 years ago

@au2 I think I got it. Take a gander now, as I think I've hit all five points.

jmfadeley commented 6 years ago

@au2 totalCount dropped. Merging.