NYCPlanning / ae-zoning-api

This application is API for serving data related to zoning and tax lots.
1 stars 0 forks source link

use data flow repo and allow remote Zoning API databases #198

Closed damonmcc closed 2 months ago

damonmcc commented 4 months ago

related to https://github.com/NYCPlanning/ae-data-flow/issues/29

summary of changes

These changes enable the use of remote Zoning API databases and deprecate the first-pass approach for populating those DBs. The use of a remote DB seems essential for (an eventually) remote API instance.

details

When trying to use a remote Zoning API database in Digital Ocean, all API calls resulted in a 500 error without the SSL mode configuration. An example of error details is shown below (sensitive values replaces with *s).

{
  "statusCode": 500,
  "error": "Internal Server Error",
  "name": "DataRetrievalException",
  "message": "Error while retrieving data: no pg_hba.conf entry for host \"**.***.***.***\", user \"****\", database \"****\", no encryption",
}

This also deprecates the old method of populating a Zoning API DB (copying csvs from a public S3 bucket) in favor of the new method (using the ae-data-flow repo)

screenshots

see comment here showing successful use of new data flow repo to populate a Zoning API DB