want non-storm way to get feature rules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Won't Fix
|
Low
|
Unassigned |
Bug Description
It would be useful if there was a way for code running in the Launchpad dc to find out about the current feature rules, without opening a database connection.
* this might be faster than setting up storm and a database connection: less code to load and less IO to do
* can be used on machines that don't have or need privileges to connect to the database
* may abstract them from database changes or outages
* the lookup can be done asynchronously from Twisted (or other non-blocking) code
* the lookup can be more easily done from non-Python code
One way would be to have a URL accessible only within the DC that presents all the rules in machine-readable form (json, tab-delimited text, whatever's easy to parse.)
Perhaps yagni.
description: | updated |
Changed in launchpad: | |
status: | Triaged → Won't Fix |
Robert has another idea:
On feature flags... I'd suggest an xmlrpc/API for evaluating flags.
evaluating flags requires DB access for group membership of a user and
potentially other things like time limited trials, access to opt-in
features and so forth.
The exact API would need to take a user, possibly feature names, and
return a list of the rules whose scopes need to be locally resolved.
Whether this is json or not is immaterial to me - at least for this
patch, the feature evaluating code would load once.
It would be very interesting to do this though, because we could phase
this in per-user.