poissonconsulting / fwapgr

An R Client for BC Freshwater Atlas Web API
https://poissonconsulting.github.io/fwapgr
Other
8 stars 1 forks source link

watershed_at_measure not retrieving data #61

Closed sebdalgarno closed 2 years ago

sebdalgarno commented 2 years ago

For example try: https://features.hillcrestgeo.ca/fwa/functions/postgisftw.fwa_watershedatmeasure/items.html?blue_line_key=356308001&downstream_route_measure=10000&limit=10

sebdalgarno commented 2 years ago

also see result from trying to get the JSON:

https://features.hillcrestgeo.ca/fwa/functions/postgisftw.fwa_watershedatmeasure/items.json?blue_line_key=356308001&downstream_route_measure=10000&limit=10

smnorris commented 2 years ago

Fixed. Table fwa_bcboundary name changed (from fwa_bc_boundary and I missed updating the the post data load script that updates permissions to allow queries by featureserv.

Couple of things I can do to make sure issues like this don't pop up again:

joethorley commented 2 years ago

@smnorris - do you want permissions to trigger the GitHub actions tests scripts for the package?

The only challenge is that I think the caching of results can mean some tests pass when the database is broken. Are you able to configure the database so it doesn't cache results from particular IP addresses?

smnorris commented 2 years ago

That could work well. It looks like I can configure server to accept requests with argument ?nocache=true for cache bypass, eg:

http://www.example.com/?nocache=true

smnorris commented 2 years ago

Ok, the webserver is configured to bypass the cache if argument nocache=true is set for these services: https://features.hillcrestgeo.ca/fwa https://features.hillcrestgeo.ca/bcfishobs https://features.hillcrestgeo.ca/bcfishpass

Testing on this one and I can confirm the query is going through to the db each time request is made: https://features.hillcrestgeo.ca/fwa/collections/whse_basemapping.fwa_obstructions_sp/items.json?nocache=true

joethorley commented 2 years ago

Hi @smnorris - I've made you a maintainer of this repository so you can trigger GitHub actions for testing. We'll update our tests to have /?nocache=true.