nondeterministic ordering of entry points from ExtensionManager
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
stevedore |
Expired
|
Undecided
|
Unassigned |
Bug Description
I don't know if this is something to be fixed or maybe just the subject of a "best practice" doc for using stevedore+
The issue came up in a glance_store bug [0] where oslo.config generator appeared to be changing the ordering of some config options from run to run (it was changing the order of the driver options). Turned out that glance_store was calling ExtensionManager to get a list of entry points and using that to gather the options. If the list is sorted, the problem goes away [1].
I'm bringing it up here, because it was hard to track down. All the relevant data structures in Stevedore are ordered; I think the nondeterminism is coming from pkg_resources, maybe [2]. I don't know whether it makes sense for Stevedore to sort the list [3] or not. (I'm starting to think not, but after typing all this, I'm going to submit and let you decide.)
[0] https:/
[1] https:/
[2] https:/
[3] https:/
Yes, the pkg_resources does not guarantee that plugins are loaded in a particular order. Sorting at the application layer is the correct solution. I suppose we could do that in stevedore, though. How big of an issue is this?