Deprecate support for InfluxDB
This has not been maintained and it is not apparent anyone is using it. Deprecate it. If anyone shows us to fix things we can undeprecate it. Change-Id: Idcdf5958df7bf5230fc46852f37393906fca9227 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
@@ -367,6 +367,21 @@ class CloudRegion:
|
||||
self._statsd_client = None
|
||||
self._influxdb_config = influxdb_config
|
||||
self._influxdb_client = None
|
||||
|
||||
if influxdb_config is not None:
|
||||
# NOTE(stephenfin): If you are a user and care about InfluxDB,
|
||||
# please propose patches to migrate this to the influxdb3-python
|
||||
# library [1]. Any migration should include tests.
|
||||
#
|
||||
# [1] https://github.com/InfluxCommunity/influxdb3-python
|
||||
warnings.warn(
|
||||
'Support for InfluxDB requires the influxdb library which '
|
||||
'only supports InfluxDB 1.x and is deprecated. As a result, '
|
||||
'influxdb is also deprecated and will be removed in a future '
|
||||
'release.',
|
||||
os_warnings.RemovedInSDK60Warning,
|
||||
)
|
||||
|
||||
self._collector_registry = collector_registry
|
||||
|
||||
self._service_type_manager = os_service_types.ServiceTypes()
|
||||
@@ -1430,10 +1445,18 @@ class CloudRegion:
|
||||
def get_influxdb_client(
|
||||
self,
|
||||
) -> ty.Optional['influxdb_client.InfluxDBClient']:
|
||||
# TODO(stephenfin): We could do with a typed dict here.
|
||||
influx_args: dict[str, ty.Any] = {}
|
||||
if not self._influxdb_config:
|
||||
return None
|
||||
|
||||
warnings.warn(
|
||||
'Support for InfluxDB requires the influxdb library which '
|
||||
'only supports InfluxDB 1.x and is deprecated. As a result, '
|
||||
'influxdb is also deprecated and will be removed in a future '
|
||||
'release.',
|
||||
os_warnings.RemovedInSDK60Warning,
|
||||
)
|
||||
|
||||
use_udp = bool(self._influxdb_config.get('use_udp', False))
|
||||
port = self._influxdb_config.get('port')
|
||||
if use_udp:
|
||||
|
||||
@@ -373,6 +373,16 @@ class OpenStackConfig:
|
||||
influxdb_config.update(influxdb_cfg)
|
||||
|
||||
if influxdb_config:
|
||||
# NOTE(stephenfin): defer the warning to here so we catch config in
|
||||
# both clouds.yaml and directly passed in
|
||||
warnings.warn(
|
||||
'Support for InfluxDB requires the influxdb library which '
|
||||
'only supports InfluxDB 1.x and is deprecated. As a result, '
|
||||
'influxdb is also deprecated and will be removed in a future '
|
||||
'release.',
|
||||
os_warnings.RemovedInSDK60Warning,
|
||||
)
|
||||
|
||||
config = {}
|
||||
if 'use_udp' in influxdb_config:
|
||||
use_udp = influxdb_config['use_udp']
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
Support for reporting metrics to InfluxDB has been deprecated for removal.
|
||||
The implementation relied on an EOL Python library and only supported
|
||||
InfluxDB v1.
|
||||
Reference in New Issue
Block a user