GeoscienceAustralia / dea-sandbox

Digital Earth Australia Sandbox config and planning
Apache License 2.0
13 stars 6 forks source link

"Deprecated API features" warning when connecting to datacube on latest Sandbox image #242

Closed robbibt closed 1 year ago

robbibt commented 1 year ago

Describe the bug Latest Sandbox image "latest" produces the following warning when connecting to datacube:

dc = datacube.Datacube(app="DEA_Land_Cover")

/env/lib/python3.8/site-packages/datacube/drivers/postgres/_api.py:48: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) select([

To Reproduce Run code above on "Unstable" prod Sandbox

Expected behavior No warning

Screenshots image

SpacemanPaul commented 1 year ago

This is a warning, not an error, so can be ignored. Can be suppressed with:

import os
os.environ["SQLALCHEMY_SILENCE_UBER_WARNING"] = 1

I will probably have to hard-set this in core at some point, but if there is an easy way to push environment variables into sandbox (i.e. into all sandbox instances), that might be a good quick fix.