hubmapconsortium / antibody-api

API for the Antibody DB.
https://avr.hubmapconsortium.org/
0 stars 0 forks source link

PostgreSQL migration Tests #159

Closed ChuckKollar closed 8 months ago

ChuckKollar commented 9 months ago

Reach out to Chris to get the new information regarding to the PostgreSQL that was recently upgraded.

Run tests on this repo as well as spatial which uses this database.

ChuckKollar commented 9 months ago

Zhou Yuan [Dec 7, 23 10:03 AM]

I reached out and asked for the slides used for the Demo Days presentation apparently they forgot to upload, slide No.12 highlights your AVR.

Please reach out to Chris Burke to obtain the database connection info for the migrated antibody-api (AVR) and spatial-api on DEV. We set up a new Postgres server in docker. Thanks to Chris, he moved the databases from AWS (for AVR only) and another separate spatial-api database to this new server. I've updated the API config files and both seem still work fine. We'll need your help to verify again, maybe upload some AVR reports to be sure. I don't know how to test the spatial-api calls. No rush, whenever after you finish other tasks.

ChuckKollar commented 9 months ago

From Joe, We've been using two AWS RDS Postgres clusters one for DEV and one for PROD. The antibody-api (AVR) connects to it. We had to reduce some AWS cost by downgrading EC2 a couple of months ago, now it's time for the Postgres cluster since we really don't need a cluster for the AVR. On the other hand, the spatial-api connects to a standalone docker container of Postgres that you put together long time ago to support some GIS extensions, because AWS didn't support extensions back then. So recently, I set up a standalone Postgres container using the same dockerfile, to support both AVR and spatial-api. Chris created individual databases for each and had migrated the DEV data to this new server. I had updated the api config to connect to each new database too. Chris did a db dump then imported to this new server.

We need your final review to double check before moving to PROD.

ChuckKollar commented 9 months ago

I was able to test AVR by adding some .csv/.pdf files and it worked OK. I used a local server connected to the new PostgreSQL. I tried to delete and rebuild the database but was not able to do so because the user was not the owner of the table. Chris confirmed that this was the case, so that was not tested, but I had rebuilt the database previously. All of the data in the columns of the API looked like it was in the right place