Closed Zhuse closed 1 month ago
Dear @Zhuse,
thanks a stack for your report.
Any deployed Grafana versions should be sanitized prior to parsing with verlib2.
We agree with your assessment, and will try to add an improvement for the upcoming release.
With kind regards, Andreas.
grafana-client 4.1.2, just published to PyPI, may improve the situation for you.
Appreciate it!
Describe the bug
After updating our Grafana version to v11.3.0-75420.patch2-75797, verlib2 throws in InvalidVersion exception trying to parse it:
File "/home/airflow/.local/lib/python3.7/site-packages/grafana_client/elements/datasource.py", line 378, in smartquery elif datasource_type in ("prometheus", "loki") and Version(self.api.version) <= VERSION_7: File "/home/airflow/.local/lib/python3.7/site-packages/verlib2/version.py", line 200, in __init__ raise InvalidVersion(f"Invalid version: '{version}'")
To Reproduce Steps to reproduce the behavior:
grafana_client.datasource.smartquery
on a Grafana server deployed with a patch version.Expected behavior Any deployed Grafana versions should be sanitized prior to parsing with verlib2.
Versions
grafana-client
: [ 3.11.0]