Comment 5 for bug 1978997

Revision history for this message
Matthias Runge (mrunge) wrote :

E.g see here: https://ac8676a2e4bb22cb45b3-6ec72dc5947dcd41834023b354511109.ssl.cf5.rackcdn.com/842370/6/gate/tripleo-ci-centos-9-scenario001-standalone/93b1333/logs/undercloud/var/log/containers/gnocchi/app.log

2022-06-15 21:45:49,096 [17] WARNING py.warnings: /usr/lib/python3.9/site-packages/gnocchi/indexer/sqlalchemy.py:482: 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)
  resource_type = session.query(ResourceType).get(name)