0

Karma for code reviews

Published by Matthew Revell September 17, 2008 in Code, Cool new stuff

The guys in the Launchpad-Bazaar integration team added code review to Launchpad earlier this year.

Now, when you take part in a code review it’ll count towards your Launchpad karma!

If you’re new to code review, take a look at my previous post.


0

Launchpad offline 22.00 – 23.59 UTC 17th September 2008

Published by Matthew Revell September 15, 2008 in Notifications

We’re releasing Launchpad 2.1.9 on Wednesday (17th September). During the roll-out of the new code, we need to take Launchpad offline for a short while. We allow a window of two hours.

Going offline: 22.00 UTC 17th September 2008
Expected back before: 23.59 UTC 17th September 2008

Keep reading this blog for the 2.1.9 release announcement!


0

Last week in Launchpad’s web API

Published by Leonard Richardson September 8, 2008 in API, General

Barry Warsaw, Francis Lacoste, and I gave an IRC chat about the Launchpad web service as part of Ubuntu Developer Week. There’s a transcript available in case you missed it.

The big news from last week is that we finally have the API documentation being generated whenever a new version of Launchpad is deployed. Whatever server your script is running against, the /+apidoc URL will contain the reference documentation for that version of Launchpad. launchpad.net’s documentation will change when we do an official release of Launchpad, and edge.launchpad.net’s and staging.launchpad.net’s will be updated much more often, as our changes get pushed out to those servers.

But there’s more! I also added support to launchpadlib for access to the binary files hosted by Launchpad: mugshots, bug attachments, and so on. This is everything described in the reference doc as “a file resource.” If you upgrade launchpadlib, you can now access these files with a Pythonic file object interface.

The server side of this has been in place since we launched the web service, so in theory you could have been messing with uploaded files this whole time by writing a custom-built client. But only recently did I update the hacking document that makes it easy to see how to do this.

Finally, Edwin, Brad, and I have continued working on exporting the Launchpad registry. Of note are three new hosted-file resources: a project’s brand, logo, and icon. Project groups also have more of their fields published.

This week: more things published through the registry, hopefully some progress on bugs as well.


0

This week in Launchpad’s web API

Published by Leonard Richardson August 29, 2008 in API, Cool new stuff

Last week the Launchpad web service didn’t change, because the source tree was frozen pending a Launchpad release. But this week we landed the branches we wrote last week, as well as some new ones.

The biggest change this week is client-side caching. Update your copy of launchpadlib to revision 17 and change your scripts to pass a directory name into the Launchpad constructor. That directory will be used as a cache.


>>> cachedir = "/home/me/.launchpadlib/cache/"
>>> launchpad = Launchpad(credentials, STAGING_SERVICE_ROOT, cachedir)

Without the cache, it takes several seconds just to start up launchpadlib. Every time you create a Launchpad object, the library has to download information about how Launchpad
works. With the cache in place, launchpadlib will download that information once and reuse it for every Launchpad object you create. The cache will also store the bugs, people, and other objects you retrieve as you use launchpadlib. The more often you use the same Launchpad objects, the more time the cache will save you. When we change Launchpad, launchpadlib will notice and will download the documents that have changed.

Second, Edwin Grubbs continued his work on publishing the Launchpad registry. launchpad.projects is now open for business. You can get basic information about Launchpad projects, their milestones and branches.

>>> bzr = launchpad.projects['bzr']
>>> bzr.title
u'Bazaar Version Control System'
>>> bzr.programming_language
u'Python'
>>> [milestone.name for milestone in bzr.all_milestones]
[u'0.9a', u'1.3.1rc1', u'1.4rc2', u'1.5', u'1.6', ...]

Finally, I’ve given launchpadlib some code that uses the client-side cache to avoid the “lost update problem.” This happens when two people modify the same object without coordinating, and the second one unknowingly overwrites the first person’s changes. If you use launchpadlib to make a change and it turns out someone else has changed the same object, you’ll get a chance to look at the new version of the object and see if your changes are still relevant.

One thing we haven’t done yet is gotten the API HTML reference to be regenerated whenever we change the web service. I planned to work on this yesterday, but instead spent the day fixing bugs. I’m working on it now and we should have it up early next week.

Next week we’ll see also more of the Launchpad registry exposed, and some long-awaited aspects of Launchpad’s bug tracker. And on Tuesday, Barry Warsaw and I will be talking about Launchpad’s web service API as part of Ubuntu Developer Week. That’s at 1900 UTC, in #ubuntu-classroom on irc.freenode.net.


0

Launchpad 2.1.8: Bugzilla and Trac plugins now available, plus karma for commits

Published by Matthew Revell August 21, 2008 in Releases

We in the Launchpad team are proud to announce the 21st August 2008 release of Launchpad 2.1.8!

This release brings two items of good news for anyone who commits code to branches registered in Launchpad:

To subscribe to your own branch commits feed, visit your code overview page and click the feed icon in your browser’s address bar.

There’s more about karma for commits in our blog post.

Bugzilla and Trac plugin beta now open

Sharing the same bug report and comment history between communities is one of Launchpad’s most useful features.

With the beta of our new plugins for Bugzilla and Trac now open, projects who run their own external bug trackers can now also share bug comment histories with Launchpad.

Graham Binns from the Launchpad Bugs team blogs about how to take part in the beta, if you run a Bugzilla or Trac instance.

Regular updates on the Launchpad API beta

If you’re following the beta of the Launchpad API, you can now get regular updates on what’s new from Leonard Richardson, one of the Launchpad team working on the API.

Leonard’s posts are in the Launchad News blog’s API category.

Full details of Launchpad 2.1.8

Full details of the features and bug fixes that went into this release are on the Launchpad 2.1.8 milestone page.

If you come across any bugs in Launchpad, please report them.

We’ll be releasing Launchpad 2.1.9 on the 17th September.

In the mean time, join us each Thursday at 18.00 UTC in #launchpad-meeting on Freenode for the Launchpad team meeting and also any time on the launchpad-users mailing list.


0

Bugzilla and Trac plugins now in beta

Published by Graham Binns August 20, 2008 in Bug Tracking, Cool new stuff

A few weeks ago, Matt announced the new Launchpad plugins for Bugzilla and Trac.

The plugins allow bidirectional communication between Launchpad and the remote bug trackers that have them installed. Obviously, we need to test the plugins – and that’s where we need your help.

If you know of any Trac or Bugzilla instances whose administrators might be interested in installing the requisite Launchpad plugin – or indeed if you run such a bug tracker yourself – you can find details on how to install the plugins and what you need to do to get Launchpad to work with your bugtracker on the Launchpad Help wiki:

So, what will installing the plugins do? Well, initially, installing one of the plugins will mean that:

Once we’re happy that the plugins are working correctly we can use them to add some even cooler functionality to Launchpad:

The Bugzilla plugin is licensed under the Mozilla Public License and the Trac plugin is licensed under GPLv2.

If you’ve got any questions, don’t hesitate to contact us by email at feedback@launchpad.net.


1

Karma for commits!

Published by Matthew Revell in Code, Cool new stuff

While in some parts they take their pay in Warcraft gold, round here we’re karma fiends!

To feed the habit, Tim in Launchpad’s Code Hosting team has provided another way of earning karma: making commits to any Bazaar branch that’s registered to a project in Launchpad.

We’re backdating the karma for commits but, as with all karma the older the action is the less it’ll count towards your karma score; really old actions don’t count at all. Also, +junk branches don’t count towards karma at all.


0

Terms of Use Update

Published by Joey Stanford August 19, 2008 in Notifications

Hi,

Today we have updated the Launchpad Terms of Use. Specifically, the section on Automated Querying was updated and extended to reflect the addition of our Public APIs. Please take a moment to inspect the changes.

Thanks,

Joey Stanford


0

Launchpad offline 00.00 – 02.00 UTC 21st August 2008

Published by Matthew Revell in Notifications

This week we’re releasing Launchpad 2.1.8! During code roll-outs we allow a down-time window of a couple of hours. This week, we’re making the release in the early hours UTC of Thursday 21st.

Going offline: 00.00 UTC 21st August 2008
Expected back before: 02.00 UTC 21st August 2008

I’m sorry for the inconvenience this down-time will cause. I’ll post details of what’s new in 2.1.8 here after we’ve made the release.


0

This week in Launchpad’s web API

Published by Leonard Richardson August 15, 2008 in API, Cool new stuff, General

Now that the Launchpad web service API has entered beta, I’ll be posting an update every week about the improvements we make to it. This way you’ll always know what’s going on, and you’ll see when something you want to do becomes possible.

Web service improvements

This week I made one major change to the web service itself. There’s now a special top-level resource that’s an alias to “you” on Launchpad. This is a nice convenience when you’re writing scripts for yourself, but it’s practically essential if other people are going to be running your program.

Here’s how to get a reference to the person who’s running the script, using launchpadlib, our Python interface to the web service.

>>> me = launchpad.me
>>> print me.name
leonardr

If you’re not using launchpadlib, GET the service root at https://api.staging.launchpad.net/beta/, and you’ll see the URL to this resource as ‘me_link’. When you GET that URL you’ll be redirected to your own user account.

launchpadlib improvements

I spent most of my time working on launchpadlib. Apart from some bugfixes and performance improvements that you won’t even notice, I made three big improvements.

Introspection

Previously, to see what capabilities a launchpadlib object had, you had to check the reference documentation. (That documentation is two weeks out of date, by the way; we’ll be fixing that next week.) Now you can just call dir() on an object, and all of its Launchpad-derived attributes and methods will show up in the list. If you only want to see the Launchpad attributes or methods and not all the internal launchpadlib stuff, you can check lp_attributes or lp_operations. This code shows what you can do with a launchpadlib person object:

>>> me.lp_attributes
['self_link', 'resource_type_link', 'longitude', ... 'homepage_content']

>>> me.lp_operations
['addMember', ... 'setLocation']

Slices

The second new feature is the ability to slice Launchpad collections as though they were Python lists. Here’s some code that gets the 10 most recently filed bugs in Launchpad.

>>> recent_bugs = launchpad.bugs[:10]
>>> [bug.id for bug in recent_bugs]
[258042, 258041, 258040, 258039, 258038, 258037, 258036, 258033, 258032, 258030]

Previously, the only way to do this was to iterate over launchpad.bugs and insert a break statement when you’d had enough, which was very awkward.

Loading from bookmarks

The third new feature is the ability to bookmark launchpadlib objects and go back to them later, the way you can bookmark web pages in your browser. Here’s launchpadlib code to acquire a bug.

>>> a_bug = launchpad.bugs[251497]
>>> print a_bug.title
Make it possible to instantiate a resource from a URL

I can play around with that bug all I want within a Python session, but if I exit the Python session the bug will disappear. If I want to get the bug back later, I’ll need to find it again from scratch. Unless I store the bug’s unique ID (also known as its URL).

>>> print str(a_bug)
https://api.staging.launchpad.net/beta/bugs/251497

At this point I can write that string to a file or database. Later on, a different process might come online and load the string back into memory. That process can get the bug object back by passing the bug’s URL into launchpad.load().

>>> a_bug = launchpad.load("https://api.staging.launchpad.net/beta/bugs/251497")
>>> print a_bug.title
Make it possible to instantiate a resource from a URL

Pretty simple stuff–people have been saving URLs and passing them around to each other for over fifteen years. The advantage of our web service’s design is that it gives you the same power in a scripted environment.

Upcoming work

Next week I plan to spend most of my time on behind-the-scenes performance improvements. You won’t notice anything if you use launchpadlib. If you’re writing your own client, you’ll know what I’m talking about when I say “ETag support.”

Meanwhile, Edwin Grubbs will be working to expose Launchpad’s project registry through the web service.

See you next week!


Previous Entries
Next Entries