* Set root-path from uvicorn
Sets the root path in uvicorn to match that set via FastAPI. This is
required with updates to starlette, which were included previously.
Fixes https://github.com/microsoft/PlanetaryComputer/issues/360
* New black formatting
* Temporarily use fork for starlette 0.21 release
The 0.21 release resolves a frequent error on our fastapi version.
See:
https://github.com/encode/starlette/pull/1710https://github.com/encode/starlette/pull/1715
* Disable FTP as function app deploy option
Security controls
* Trace request attributes before invoking middleware
If an exception is raised in subsequent middlewares, added trace
attributes will still be logged to Azure. This allows us to find
requests that fail in the logs.
* Make config cache thread safe
cachetools cache is not thread safe and there were frequent exceptions
logged indicating that cache updates during async calls were failing
with key errors similar to those described in:
https://github.com/tkem/cachetools/issues/80
Add a lock per table instance synchronizes cache updates across threads
in.
* Lint
* Changelog
* Consolidate dev dependencies into requirements-dev.txt
* Add simple azure storage support to pccommon
* Set up azurite container for dev output
* Add pcfuncs codebase
This includes the "animation" and "image" functions,
as well as the "funclib" library that contains
reusable code for fetching rasters from the
PC data API.
* Add pcfuncs to dev servers and processes
* Add Azure Functions to deployment
* Move funcs information to main README
* Fix titiler link
* Avoid flake8 on setup.py
* Delete unused reprojection utility method/type
* Remove debug log information
* Don't restrict concurrency setting
* Consolidate how dev depenencies are installed
Previous to this change pcstac and pctiler had
two methods for installing dev dependencies.
This caused different behavior between the two
test projects. For instance, one project auto
upgraded the pytest asyncio plugin, which
under a new version started printing warnings.
This users the setup.py method for installing dev
dependencies consistently and pins some test dependencies
* Use asyncio_mode = auto to quell warnings
* Fix dependencies in docker-compose
* Use hostname in caching key.
Previous to this change, requests coming in from
different hostnames were causing the cache to return
results for different hostnames if that service was
accessible through both - this is the case after a release,
when planetarycomputer-staging.msft.com and planetarycomputer.msft.com
both point to the same stack. This was causing cached
results to be returned with links for staging through
requests to the production endpoints. Added the hostname
to the cache key will ensure cached results are scoped
to the specific hostname.
* Update CHANGELOG