-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tooling to make customization of DB Connection possible #538
Add tooling to make customization of DB Connection possible #538
Conversation
3694844
to
228f599
Compare
The other thing I'll note that this can be used for is for platforms that do not allow setting search_path on config. The |
Alright @bitner & others, I believe this is now good to go. Testing is failing due to the issue described in stac-utils/pgstac#177, but that should be fixed when we upgrade to pgSTAC 0.7.5 (via fix from stac-utils/pgstac#178). I added one simple test to validate that the customized DB connection can be used to run logic with API requests: stac-fastapi/stac_fastapi/pgstac/tests/clients/test_postgres.py Lines 182 to 212 in befe6ea
|
befe6ea
to
6e1fb87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks for the heads up. I'll merge this as is, and then open an issue to backport it to https://github.com/stac-utils/stac-fastapi-pgstac/. |
Description:
This PR updates the way in which the pgSTAC extension connects with its underlying database. This was done to support the possibility of users running custom connection setup/teardown steps for each request. This allows us to do something like the following when setting up a pgSTAC-based STAC API:
PR Checklist:
pre-commit run --all-files
)make test
)make docs
)