Bugzilla API 0.5 Released

I noticed I forgot to blog this…

Version 0.5 of the Bugzilla REST API has been released.

Note: versions 0.4.1 and below have a security issue[0] which could, under some circumstances, allow one user to impersonate another. If you are specifically using these versions (rather than the “latest” version) please update your client software to use version 0.5.

New In 0.5:

  • Performance instrumentation. I have added code which records how long requests take, so I can see whether the bottlenecks are, if any. If you are having performance issues with the API, please file bugs and tell me what is slow!
  • JSONP support. Use Accept: application/javascript and pass a callback=myfunction parameter, and you will get JSONP served as application/javascript.

Compatibility Notes:

  • The range of content types that the API can return is now restricted
    to:

    • YAML-HTML (for browsing) – text/html
    • JSON – application/json
    • JSONP – application/javascript
    • XML (utterly unfrozen!) – application/xml
  • The deprecated “count=1” parameter to bug searches to get a count has been removed.

File bugs | Feedback and discussion

[0] This bug will be opened in a few days.

Community Size, and Bug Quality

I’ve just finished watching Diederik van Liere’s fascinating presentation (Ogg video, 20 mins), linked to by Mark, about his work with bugzilla.mozilla.org data. Download the full slide deck – you’ll need it to follow along with my comments, which should be of interest to the community-minded.

Slides 9 and 10, the community dynamics slides, are worrying. Diederik explains the decline in the size of the community as “increased product maturity”, but I’m not sure that’s true. If it were, we would expect to see the number of people entering the community decreasing. However, that number has stayed roughly constant, with peaks surrounding a release as we reach out to beta testers, and as new users report bugs. It’s the number of people leaving which seems to be increasing. Fewer people are hanging around once they get here. And I don’t know why.

Slide 11, about what the final resolutions ended up being of bugs filed in each year, is fascinating. It would be really interesting to see that graphed at a greater granularity.

We have made significant progress in reducing the percentage of duplicate bugs filed. People complain about Bugzilla’s search, but the percentage was a flat 25% from 2002-2004, and it’s now a flat 13% – basically half what it was. Also, from a low of 34% of bugs filed being FIXED, we are now up at 56%.

There are no doubt lots of factors involved in this effect, including the reduction in the size of the community mentioned in the earlier slides. I’m really interested in working out what we might have done which has improved the situation. I have an utterly open mind on this. here are some significant events I can think of which may be relevant:

Can anyone else think of other events or software deployments which may be relevant? I’m happy to do the research to find out when they happened.

From The Wind

It’s not possible to search Bugzilla for bugs where a particular flag has been set with no requestee. This means that people sometimes request e.g. review “from the wind” (as bugbot puts it) and no-one notices, so their patch sits there for ages, unloved.

Here is a Greasemonkey userscript which adds a “From the Wind” button at the bottom of buglist pages on bugzilla.mozilla.org. Clicking that button (after a few seconds) trims the list down to only those bugs where “review” (on an attachment) or “approval” has been requested from the wind. (It does this by fetching the bug data from the API and doing the check itself.)

So if you search for all bugs in the relevant component or product with “review?”, and then click the button, it’ll trim that list down to all bugs with “review?” and no requestee.

Why not take a moment to do this in a product or component for which you have review responsibilities?

Why didn’t I use Jetpack? Because at the moment (Firefox 3.6b4, Jetpack 0.7) the authoring experience is really not good. The API documentation doesn’t even mention that it uses jQuery (which led to me thinking for a long time that it was missing huge chunks of function), the Bespin code window is way too small and non-resizable, using Ctrl-X/C/V cut-copy-paste scrolls the page to the top, errors appear in the Firebug on the Jetpack page rather than the web page itself, you have to keep clicking “Try out this code” and “clear” on the Firebug on both pages, and I can’t see how to step through the code using the debugger.

Bugzilla API 0.4 Released

Version 0.4 of the Bugzilla REST API has been released. New in this version:

  • New /count call – get fast bug counts, either singly or in 1D, 2D or 3D tables. Great for stats.

Compatibility Notes:

  • The “count=1” parameter to bug searches to get a count is now deprecated, and will be removed in a future release. Use the above API call instead.
  • The Configuration object’s “groups” hash will soon change to be keyed by ID rather than name (and so the “id” field has disappeared, to be replaced by a “name” field). Tracking bug.

File bugs | Give feedback.

Bugzilla API 0.3 Released

Version 0.3 of the Bugzilla REST API has been released. New in this version:

  • name=value search for arbitrary fields; e.g “&cf_mycustomfield=somevalue”
  • All timestamps are now in UTC, ISO 8601 format
  • Support for OPTIONS
  • Access-Control-Allow-Origin header now on all responses (permits cross-site requests)
  • Support for downloading bug data for multiple bugs, in full, in a single request (see docs for search to find out how)
  • Text searches now default to “contains_all” (as substrings, space-sep)
  • Initial support for decent error codes – however, don’t rely on them not changing!

Compatibility Notes:

  • Note that the timestamps format change is backwardly-incompatible.
  • All API capabilities now work against bugzilla.mozilla.org, now that it’s been upgraded and patched.
  • An advance warning: in the next release, the Configuration object’s “groups” hash will change to be keyed by ID rather than name (and so also the “id” field will disappear to be replaced by a “name” field).

File bugs | Feedback and discussion.

Bugzilla API 0.2 Released

Version 0.2 of the Bugzilla REST API has been released. New in this version:

  • Read/write support for flags, groups, custom fields and comment privacy
  • Access to all aspects of Bugzilla’s configuration with a new /configuration call
  • Even more high-quality and comprehensive documentation
  • Better logging so I can debug problems

Note that these new capabilities will not be available on the copy of the API pointed at bugzilla.mozilla.org until the upgrade :-( But in the mean time, you can test them on the staging server. Although that seems very slow at the moment.

I consider this the first version of the API with which you should be able to write a capable Bugzilla client of some sort. Let me know if you find stuff missing which would be required for this usage.

Lastly, there is now a Bugzilla component for you to file bugs in :-)

Bugzilla 500,000 Bug Sweepstake

It’s that time again! :-) The bugzilla.mozilla.org bug database will soon hit another major milestone and, as is traditional, I’m running a sweepstake on exactly when that will be.

So please email me using this link, filling in the date and time you think bug 500,000 will be filed. As the link suggests, your entry should be on the first line of your email, and formatted as follows:

2009-08-07 06:54:32 bugzilla-id@example.com

All times are in ZST (‘Zilla Standard Time, a.k.a. Pacific Time, as displayed in Bugzilla timestamps), and the email address must be your Bugzilla ID. If you prefer to be contacted on a different address, add that as well, on the end of the same line in brackets. We have ample graphs and charts (requires editbugs) to help you with your assessment.

This is a Mozilla community event. To keep it that way, entrants must have a Bugzilla account on bugzilla.mozilla.org created before the end of September 2008, and which has done something useful in the past six months. I’ll check those who are closest, and keep discarding entries until I find one which meets these criteria. Therefore, there’s no point posting this to Slashdot or any other non-Mozilla-focussed news source.

The judge’s decision is final, and any funny business regarding the filing of bugs on or around the 500,000 mark will be frowned upon. The closing date for entries is midday ZST on Monday 10th November 2008.

The winner and two runners-up will get some Mozilla or Firefox merchandise. We currently plan to give the winner a Firefox backpack. 2nd and 3rd will get their choice of t-shirt from the Mozilla store.

Bugmail Extension for Thunderbird

Dear lazyweb,

It would be great to have an extension for Thunderbird to help with bugmail.

For example, I often come to a bugmail and want to know what the current state of the bug is. Obviously, some info like the bug number and the title are already available from the mail. But it would be very cool if there was an extension which got the record for the bug from Bugzilla in real time then added a bar at the top of the mail which said e.g.:

Firefox / General | RESOLVED FIXED | Assignee: gerv@mozilla.org

or something like that. I often look at older bugmail and ask myself “Did I sort this out?” If the bug is now RESOLVED, I can say “yes, I did” and delete the mail without having to load the bug, switch to my browser, view it, see it’s RESOLVED, switch back and delete the mail.

Can someone write one, please? :-)

Persistent Client-Side Bug Sorting

Jesse’s bugsort.user.js Greasemonkey script for client-side buglist sorting in Bugzilla is a great idea. It saves a lot of time. However, if you try and use Bugzilla’s Next/Previous feature to move through the newly-sorted bugs, you’ll find that it doesn’t work. The bugs come out in the original order. That’s because it doesn’t update the cookie that Bugzilla uses to store the list in sorted order.

Here is a version that does.

Spammers, Attachments, Bugzilla, Security, IE, Grrr

Spammers have started attaching copies of their pills ‘n’ porn ‘n’ pump ‘n’ dump pages to Bugzillas, and using the resulting attachment URLs in spam, to get around domain blacklists. The versions attached have an obfuscated JS redirect in them which takes the user to the main spammer site. Example.

How do we combat this while giving the least inconvenience to legitimate users?

We can distinguish genuine users from “unknowns” by saying that anyone with any sort of permission bit (e.g. canconfirm, editbugs) is a genuine user. But that doesn’t help the first-time bug filer. A ban on uploading attachments for them is very intrusive – they may have a screenshot or logfile or something they want to include.

The obvious fix is to say “OK, if you upload an attachment with any MIME type rendered by the browser which can contain script, we’ll switch the type to text/plain; then a triager can come and put it back if they agree the upload is genuine.” Neat and simple.

However, that founders because of IE’s words-fail-me content sniffing, which will happily render HTML served as text/plain, because it thinks it knows better than you. Grr. Snarl.

Not-as-good plan B is to invent our own MIME types, application/x-bugzilla-upload-text and
application/x-bugzilla-upload-binary, which was set on all uploads from non-permissioned people by default. When actually serving the content, we’d detect IE and serve Content-Disposition: attachment (to force download), and for anyone else we’d use text/plain or application/octet-stream, as appropriate.

Anyone got any better ideas?

Bugzilla 400,000 Bug Sweepstake

It’s that time again! :-) The bugzilla.mozilla.org bug database will soon hit another major milestone and, as is traditional, I’m running a sweepstake on exactly when that will be.

So please email me using this link, filling in the date and time you think bug 400,000 will be filed. As the link suggests, your entry should be on the first line of your email, and formatted as follows:

2007-06-05 01:23:45 bugzilla-id@example.com

All times are in ZST (‘Zilla Standard Time, a.k.a. Pacific Time, as displayed in Bugzilla timestamps), and the email address must be your Bugzilla ID. If you prefer to be contacted on a different address, add that as well, on the end of the same line in brackets. We have ample graphs and charts (requires editbugs) to help you with your assessment.

This is a Mozilla community event. To keep it that way, entrants must have a Bugzilla account on bugzilla.mozilla.org created before the end of February 2007, and which has done something useful in the past six months. I’ll check those who are closest, and keep discarding entries until I find one which meets these criteria. Therefore, there’s no point posting this to Slashdot or any other non-Mozilla-focussed news source.

The judge’s decision is final, and any funny business regarding the filing of bugs on or around the 400,000 mark will be frowned upon. The closing date for entries is midday ZST on Monday 23rd April.

The winner and two runners-up will get some Mozilla or Firefox merchandise. Things may change, but we currently plan to give the winner a Firefox Fathead – a copy of the logo over a metre across to put on your wall, not currently available in the store. 2nd and 3rd will get a laptop bag, a fleece or something of that nature.

Google Summer Of Code 2007

The Mozilla project is again taking part in the Google Summer of Code.

New this year, in addition to the normal sorts of thing, we will be inviting proposals for Bugzilla-related projects, and also projects relating to improving or creating a new extension (for any Mozilla XUL-based application). We are glad to have the help of mozdev in reaching out to extension developers and finding mentors.

Learning from our experience last year, we now have a brainstorming page which is separate from the official list of projects which are approved and have mentors allocated and for which we will be inviting applications. Please place all ideas on the former page.

Roll on the summer!

Update: Students have only until 24th March to apply. And so we need things for them to apply to do! Get those ideas down ASAP.