Inspirated

 
 

June 14, 2010

Summer of Code Progress: Searching bug attachments for team subscriptions

Filed under: Blog — krkhan @ 5:39 pm

Related Links

Summer of Code Archive Inspirated Code
Report Guidelines Ubuntu Wiki
Original Proposal Ubuntu Wiki

Time Spent

15 hours.

Highlights

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.

Concerns

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.

Waiting Items

None.

Stalled Items

None.

Accomplishments

  • Patch: Exported Person.getBugSubscriberPackages() as read only operation.

Minor Tasks

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 lib/canonical/launchpad/interfaces/_schema_circular_imports.py.

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.

Tags: , , , , , , , ,

1 Comment

  1. OOPs ! That is something not relating to my field. But I shall recommend my friend to visit this blog, That relates to her.

    Comment by Vinnie — June 14, 2010 @ 6:20 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.