|Summer of Code Archive||Inspirated Code|
|Report Guidelines||Ubuntu Wiki|
|Original Proposal||Ubuntu Wiki|
During the course of my SoC work on Launchpad I have been following a simple procedure for developing API calls:
- Find a similar functionality which is already implemented upstream.
- Log PostgreSQL queries while using that functionality and then analyze the queries made along with database schemas to devise a plan for implementing the new feature.
As documented in my previous report, I had to implement a property/method for exporting “Source Packages” a “Team” was subscribed to. Going through the chores listed above, I ended up with a query for structural subscriptions table which joined teams and source packages. The method worked perfectly. That is, until I reopened the interface definition today and searched for my changes. I landed on something that looked similar and then realized that the method was already there in Launchpad, just not exported yet.
That condensed my work to just a few lines as I discarded my own changes and their unit tests and exported the method that was already present upstream. Lesson learned: Search your project thoroughly before starting the coding phase in case you’re duplicating someone else’s efforts.
The method for getting bug subscriptions for a team had this comment on top:
# XXX: Tom Berger 2008-04-14 bug=191799: # The implementation of these functions # is no longer appropriate, since it now relies on subscriptions, # rather than package bug supervisors. def getBugSubscriberPackages(self):
I’m not sure if a merge proposal for exporting this operation would be accepted since the implementation is “no longer appropriate”. Will discuss this with Bryce in detail tonight.
- Patch: Exported
Person.getBugSubscriberPackages()as read only operation.
The process of returning a collection of source packages created a circular import dependency which broke down the process of WADL resource generation. Again, going around Launchpad code revealed that this could be fixed by just returning a generic
Interface and then patching it later on in
Actions for the Following Report
Searching for bug attachments in source packages is already possible using my bugs-findAttachment branch. In case
Person.getBugSubscriberPackages() is considered okay, I have all the Launchpad pieces in place now for doing this in Arsenal: “Search for text in all bug attachments for packages this team is subscribed to”. Really looking forward to having a bit more “freedom” with the codebase than I had with Launchpad.