opendatacube / datacube-ows

Open Data Cube Open Web Services
Other
69 stars 35 forks source link

Running `datacube-ows --version` doesn't output a version #1026

Closed christophfriedrich closed 1 month ago

christophfriedrich commented 2 months ago

Description

Running datacube-ows --version takes forever (because it loads lots of things to start up the server) and then returns:

[2024-06-10 08:34:40,099] [WARNING] Environment variable $AWS_DEFAULT_REGION not set.  (This warning can be ignored if all data is stored locally.)
#######################################################   /env/config/ows_refactored/config.json ###############################
 * Serving Flask app 'datacube_ows'
 * Debug mode: off
[2024-06-10 08:34:41,388] [INFO] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
[2024-06-10 08:34:41,388] [INFO] Press CTRL+C to quit

I.e. lots of stuff but no version number.

Expected behaviour

The command returns the version number instantly without loading anything.

Even if it loads everything and starts up the server, having the version number printed somewhere would be beneficial.

Steps to Reproduce

Not really needed or applicable I guess

Context (Environment)

This issue template prompted me to "Run command datacube-ows --versiion" (sic), which per the nature of this issue doesn't help us to know the version I'm running, but the top-most heading in my HISTORY.rst file is "1.8.35 (2023-09-01)".

SpacemanPaul commented 2 months ago

datacube-ows-update --version works.

But I agree, datacube-ows --version should also.

SpacemanPaul commented 2 months ago

(And the issue template needs updating)