Merge lp:~mars/launchpad/add-profiling-feature-flag into lp:launchpad
Proposed by
Māris Fogels
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~mars/launchpad/add-profiling-feature-flag | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~mars/launchpad/feature-flag-fixture | ||||
Diff against target: |
408 lines (+88/-51) 3 files modified
lib/canonical/launchpad/doc/profiling.txt (+21/-5) lib/lp/services/profile/profile.py (+13/-2) lib/lp/services/profile/tests.py (+54/-44) |
||||
To merge this branch: | bzr merge lp:~mars/launchpad/add-profiling-feature-flag | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Launchpad code reviewers | Pending | ||
Review via email: mp+39179@code.launchpad.net |
Description of the change
Hi,
This branch changes our profiling code to use feature flags instead of config values. The code takes advantage of the new FeatureFixture, added in the prerequisite branch, to do the heavy lifting. Later we will be able to turn profiling on and off from the Launchpad UI.
To post a comment you must log in.
Unmerged revisions
- 11598. By Māris Fogels
-
Typo
- 11597. By Māris Fogels
-
Better comments
- 11596. By Māris Fogels
-
Merged feature-
flag-fixture into add-profiling- feature- flag. - 11595. By Māris Fogels
-
Merged feature-
flag-fixture into add-profiling- feature- flag. - 11594. By Māris Fogels
-
Merged feature-
flag-fixture into add-profiling- feature- flag. - 11593. By Māris Fogels
-
Merged in Graham's fixes for the feature flags helper setting None values. Added a test to verify the fix.
- 11592. By Māris Fogels
-
Merge from devel
Hi, we still need a config setting to control profiling because we do
not ever want it on in prod.
Here's what I think we need, for clarity:
C - config
F - flags
- on prod
C - allow_profiling False: no profiling, no how, no way
- no devel
C - allow_profiling true: profiling anytime
- on staging
C - allow_profiling True:
F - profiling on request by developers [use a team scope to id the developer]
F - profiling of all requests [use the default scope to turn it on
for all requests]
That is, the check for 'should we profile' is: allow_profiling and getFeatureFlag( 'profile' ) == 'on'
config.
-Rob