* 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
* deps: update stac-fastapi-pgstac to v2.4.5
Includes a requirements.txt file (generated with pip-tools) to freeze
requirements for pcstac.
* chore: update changelog
* Fetch all configs when iterating over collections
Rather then fetch 1 render config at a time on the /collections
endpoint, fetch all at once and preserve the Dict for the request
duration.
* Allow POST CORS requests in dev env
* Vector tile support
* Add default msft:region attribute to collections
* Upgrade to postgres 14 and pgstac 0.6.13
Prod services operate on pg14
* Fix tests and setup
The API now uses table_service.get_entities and there is an Azurite bug
that prevents an empty string for "all records", so it was switched to a
specific PartitionKey filter string.
* Add logging for pbf requests
* Deployment
* Add logging and debug code
Analyze relative performance of different calls in the VT endpoint
chain.
* Fix Exceptions
* Changelog
* Update fastapi, stacfastapi version
Updates to released versions of fastapi now that a needed starlette dep
has been upgraded. stac-fastapi is updated but still not using a release
due to some advanced work in the pgstac backend that we don't want to
incorporate yet (queryables).
* Update test for starlette
* Write empty tile for any error during backoff
Rather than looking for TileError, assume any error emitted from the
backoff strategy should result in a blank tile. Typically, this will
actually be a BackoffError with an inner error of TileError.
* Upgrade unit test db version to 0.6.9
* Log request entity header or qs value
This can denote well-known clients as request origin entities for better
understanding logged requests.
* Correctly configure CORS settings
* mypy
* Pin pygeoif
The upstream pgstac backend for stac-fastapi had an unpinned dependency
move and break. Pinning locally to the project until the fix is applied
upstream.
* 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
* Upgrade uvicorn
* Pin version of Azurite due to bug in upsert
A recent release of Azurite caused tests with upserts to fail due to
https://github.com/Azure/Azurite/issues/1565.
* 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
* Hydrate search result items in the API
Uses new pgstac `nohydrate` option to avoid using database to merge
result items with collection base items. This reduces CPU load on the
database and distributes it across the API cluster, allowing higher
request throughput.
* Experimental malloc setting for memory consumption
Attempt at managing memory leak.
* Debug timing for tile stages
* Logs and max items
* Update default max_items setting
* Upgrade to pgstac 0.6.1
* Adjust two search tests
These tests began to fail at pgstac post 0.5.2. It wasn't clear why
there was an expectation that timestamps off by 1 second should match an
item, and the open window format of "../.." was clearly disallowed via
the spec:
https://github.com/radiantearth/stac-api-spec/blob/master/implementation.md#datetime-parameter-handling
> Only one of the interval ends may be open.
* Changelog
* Finalize dependencies
* Allow GDAL to rety certain HTTP failures
* Use uvicorn for stac api
This matches the change for pctiler in #67
* Clean up env vars
Some env vars were used only in gunicorn, which was removed previously.
Other helm values were nested under the wrong keys.
* Specify min/max connection size for pcstac at 1
This overrides the stac-fastapi default of 10, and ensures a single
instance only opens a single database connection.
* Add CQL_TEXT conformace class
* Updates from ./scripts/format
* Upgrade stac-fastapi / pgstac
Upgrades to an unreleased version of stac-fastapi to capture a pgstac
upgrade for item search improvements and cql2-text support. Also
upgrades fastapi version to match dependency requirements in stac-fastapi.
* Fix tests for new behavior of `limit`
When searching for ids, limit is no longer respected. You will get all
ids you requested. Two tests needed to be modified to account for this
behavior, to ensure that a paginated request was constructed, avoid
using ids and instead use a wide datetime to ensure a large response set
that can be limited.
* Add additional dependencies to pccommon
* Fix mypy error in pctiler
Brining in the type stubs for cachetools caused
mypy to complain about unknown types for the key
function
* Refactor scripts to test pccommon
Also run flake8 on pccommon,
which wasn't happening
* Linting fixups
* Add tables classes
* Refactor collection config in pccommon
Also refactor CommonConfig to use pydantic settings.
Create a table setup for collection configuration
and container configuration.
Use cachetools to cache the configuration.
* Add Azurite setup
Encode collection configuration and container
configuration (which was hardcoded) as JSON.
This can be used to populate the initial
table structure in deployment as well, after
which this test data will diverge from production
settings.
* Update codebase to use refactored configuration
* Set azurite settings in docker-compose
Also account for environment prefix for DEBUG
that change with refactor to use BaseSettings in
CommonConfig
* Move to using only pytest for consistency
* Test get render config for naip
* Refactor config code layout
Enable configuration of TTL
* Run azurite setup in scripts/setup
Also fix setup_azurite
* Add mosaicInfo and queriables to collection config
* Remove usage of requirements.txt
This was being used inconsistently.
* Add script for local package install
* Fetch queryables from storage tables
* Use orjson in pccommon
* Use ORJSONResponse
* Remove unused endpoint prefixes
* Add mosiac/info endpoint
* Add method to fetch all rows
* Add CLI for loading and dumping config data
* Variable for k8s version; update dev
* Allow AKS to pull from ACR
* Storage Tables in terraform
* Add config table env vars to helm charts
* Update ingress apiVersion
* Make note in deploy README about updating tables
* Update CHANGELOG
* Linting/formatting
* Remove unused __init__ override
This was left over from a previous
implementation, should have been cleaned up.
* Remove unused vars in dev terraform
* Allow cli to dump configs by id
Co-authored-by: Matt McFarland <mmcfarland@microsoft.com>