[openstack-dev] oslo.db 1.5.0 requirements.txt requires testresources/testscenarios

Matt Riedemann mriedem at linux.vnet.ibm.com
Fri Mar 6 20:28:07 UTC 2015


I filed this as a bug:

https://bugs.launchpad.net/oslo.db/+bug/1429233

To hopefully summarize, the new provision stuff in oslo.db requires 
testresources and the provision stuff is a public interface for other 
projects to hook in DB testing (a fixture).

This moved testscenarios out of test-requirements into requirements.txt 
and also added testresources to requirements.txt.

The main problem I have with this is it's essentially test code in a 
non-test path and as a packager that builds and has to get legal 
clearance on runtime dependencies based on requirements.txt, I'd 
normally have to package and ship testresources/testscenarios now to use 
oslo.db >= 1.5.0, otherwise stevedore will be unhappy at startup when 
there are missing requirements.

I could workaround this in my packaging by removing the test* entries 
from requirements.txt (which is probably what I'll have to do in the 
short term), but this still seems like an issue that needs to be fixed 
because now all projects that require oslo.db at runtime will also have 
testresources/testscenarios in their runtime import path, and that 
grosses me out.

I don't want to bang the revert drum on the change that introduced this 
since it took several months to get merged.  I'm thinking more long-term 
though, that this kind of thing should live in a separate proejct, e.g. 
oslo.db.fixtures, something like that, so oslo.db can require that in 
test-requirements.txt and so can any other project, e.g. nova, that's 
using those fixtures for it's DB testing.  That's obviously not 
something that's going to happen in Kilo though at this point since 
we're coming up on dependency freeze.

I'm bringing this to the mailing list to get more attention to the 
topic.  There is also a spec in oslo for defining external library 
requirements [1] with some discussion happening there.

[1] https://review.openstack.org/#/c/157135/

-- 

Thanks,

Matt Riedemann




More information about the OpenStack-dev mailing list