With the latest master, I get an error from SQLAlchemy about a relationship conflict between ResourceHistory.metrics, Metric.resource and Resource.metrics.
I'm unsure of the effects of this. Everything appears to work fine. It might simply be the result of still using older (deprecated) relationship syntax in parts of the codebase.
2024-09-02 03:29:26,743 [135] WARNING py.warnings: /var/lib/openstack/lib/python3.10/site-packages/gnocchi/indexer/sqlalchemy.py:841: SAWarning: relationship 'ResourceHistory.metrics' will copy column resource_history.id to column metric.resource_id, which conflicts with relationship(s): 'Metric.resource' (copies resource.id to metric.resource_id), 'Resource.metrics' (copies resource.id to metric.resource_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="metrics,resource"' to the 'ResourceHistory.metrics' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)
return list(session.scalars(q).all())
With the latest
master
, I get an error from SQLAlchemy about a relationship conflict betweenResourceHistory.metrics
,Metric.resource
andResource.metrics
.I'm unsure of the effects of this. Everything appears to work fine. It might simply be the result of still using older (deprecated) relationship syntax in parts of the codebase.
More detail about the specific error here: https://docs.sqlalchemy.org/en/14/errors.html#error-qzyx
Which version of Gnocchi are you using
master
(potentially has been occurring for a while, though)How to reproduce your problem
Run Gnocchi API or metricd, and check the logs.
What is the result that you get
What is result that you expected
No warning.