Merge lp://staging/~gary/launchpad/bug492314 into lp://staging/launchpad

Proposed by Gary Poster
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 13193
Proposed branch: lp://staging/~gary/launchpad/bug492314
Merge into: lp://staging/launchpad
Diff against target: 184 lines (+58/-18)
3 files modified
lib/canonical/launchpad/pagetests/standalone/xx-opstats.txt (+38/-16)
lib/canonical/launchpad/webapp/publication.py (+11/-1)
lib/canonical/launchpad/webapp/tests/test_haproxy.py (+9/-1)
To merge this branch: bzr merge lp://staging/~gary/launchpad/bug492314
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+63946@code.staging.launchpad.net

Commit message

[r=lifeless][bug=492314] Make it possible to see +opstats and +haproxy even if you are authenticated, thereby eliminating a couple of OOPS sources.

Description of the change

This change makes it possible to see +opstats and +haproxy even if you are authenticated. The only reason we care about this is because we do not want an oops: normally our robots poll these pages as unauthenticated requests.

This is the simplest possible change. I toyed with making a method on the request to consolidate the identification of special "no-db" requests, but decided simplicity was a good approach as long as there are no more than two instances of the same small check (see also LaunchpadDatabasePolicyFactory in lib/canonical/launchpad/webapp/dbpolicy.py). We can abstract more when we move to three such instances.

The critical bug to which this is linked only refers to +opstats; however, the newer +haproxy page has the same problem, so I fixed it as well.

lin is happy.

Thank you!

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.