Merge lp:~matsubara/launchpad/bug-606184-pageid-for-collections into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gary Poster |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11467 |
Proposed branch: | lp:~matsubara/launchpad/bug-606184-pageid-for-collections |
Merge into: | lp:launchpad |
Diff against target: |
93 lines (+50/-2) 2 files modified
lib/canonical/launchpad/webapp/servers.py (+18/-1) lib/canonical/launchpad/webapp/tests/test_pageid.py (+32/-1) |
To merge this branch: | bzr merge lp:~matsubara/launchpad/bug-606184-pageid-for-collections |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gary Poster (community) | Approve | ||
Review via email: mp+33801@code.launchpad.net |
Commit message
Fixes bug 606184 by including the origin page resource in the page id for ICollectionResource views.
Description of the change
== Summary ==
This branch fixes bug 606184 by including the origin page resource in the page
id for ICollectionResource views.
== Proposed fix ==
When the page id is generated for API requests, the code inspects if the view
is a ICollectionReso
it as the collection identifier to the page id.
== Pre-implementation notes ==
I had a pre-imp with Gary. Initially Gary suggested that this could be
accomplished with adapters and I tried that route but got stuck. Then we
agreed to change the implementation to be simpler so I could move this forward.
== Implementation details ==
The origin page resource comes from ICollectionReso
that as the identifier for the given collection and added that as part of the
page id. That way when engineers are analysing such OOPS summaries they'll be
able to easily see if the OOPS is in their domain or not, as requested in
the bug report.
== Tests ==
bin/test -tt test_pageid
== Demo and Q/A ==
Once the code lands on staging, it's enough to check a staging oops summary
and see if the "scopedcollecti
additional information about the origin page resource.
== Lint ==
No lint left over in the two files modified by this branch.
merge-conditional
Cool, thank you.
My only comment is that I'd like to see more of a comment explaining what is going on. things to explain: what is a collection_ identifier? How do you use it to relate a page id to actual code, if you are trying to debug an OOPS? Extra credit: what code is responsible for generating the collection_ identifier?
Please answer at least the first two questions, and also add the information to the page ids section of https:/ /dev.launchpad. net/Foundations /Webservice