Archive for the ‘Tech’ Category

Creating a static version of a JIRA

Saturday, May 24th, 2008

I’m finally getting near the end of my every now and then hacking at a static version of a JIRA.

The basic story is that I want to turn off the computer that is running in my attic doing nothing but hosting a JIRA. The slicehost I pay for isn’t a great place to try and squeeze in the memory hungry JIRA/JVM combination, and as the project has mostly moved to Google Code it seemed like a good idea to get the JIRA gone too. Google Code doesn’t have any simple methods for uploading the data (basically you get to do HTTP and have no control over dates etc), so I decided to dump JIRA as XML, and XSLT a nice look to it. Maybe one day I can migrate it to Google Code or elsewhere, but I doubt it matters.

Pulling the XML down is easy - in fact I don’t even implement that. I assume you have used the IssueNavigator in JIRA to get a dump of all your issues as RSS. That’s right - probably will make a big JIRA explode. Ah well. I also pull down attachments for you. Just not the audit history.

Then I use XSLT (stunning architecture eh?) to put together a simple static site that shows users, issues, projects and versions (couldn’t be bothered with components though I should add them some day). The nice part here is that as I have the xml, I can restyle and make it better if I ever want to. It will support the project and issue URLs out of the box, while version and user urls will require a mod_rewrite rule, however no one goes directly to those links anyway.

Here’s the site:

http://www.osjava.org/issues/

I need to redo it from the latest xml dump, and then maybe it will be done and that light hum from above can go quiet.

If you want the code to do this (you’ll have to modify it yourself as it’s got little hacks in for osjava specific bits) it’s public domain and available at:

https://svn.atlassian.com/svn/public/contrib/jira/jira-outlet/trunk/mig4jira/static

Quartz 1.6.1 RC1 out

Friday, May 9th, 2008

Just realized that I should have pointed out that James put out a Quartz 1.6.1 release candidate. I got involved with Quartz while at SourceLabs and have since kept a bit involved.

Anyway, consider yourself informed :)

Irritating REXML bug in Ruby 1.8.6

Wednesday, June 27th, 2007

If you’re using Ruby 1.8.6, try the following:

irb
require 'rexml/document'
REXML::Document.new("<foo x='&amp;'/>").to_s

In 1.8.5 I get an answer of "<foo x='&amp;'/>", in 1.8.6 it is "<foo x='&amp;amp;'/>, ie) entities are doubly escaped when they shouldn’t be.

Roller->WordPress

Thursday, June 21st, 2007

About 10 days ago the GoDaddy server we use to host our websites ($30 being cheaper than the $100 we used to pay and the $200+ that colocation would be around here) decided that they weren’t going to run Tomcat webapps anymore. They’ve always been crappy, but this time they took it to a new level with the Tomcat regularly falling over with an OutOfMemoryError before it’s had a chance to get comfortable.

Almost definitely GoDaddy’s fault btw rather than the JVM, Tomcat or Roller/JIRA - whatever Xen/VMWare style thing they run does not like Java. Running ‘java -version’ on the command line will get a not enough object heap error and when I tried to use a standard Tomcat install it could never get any memory. In the end I chose to use the one that GoDaddy supplied and it stood up somewhat happily for 6 months, then something must have changed and things died.

So, three options jump to mind. Number 1, complain to GoDaddy. I’ve read various complaints online concerning Java on GoDaddy machines and am really not in the mood for such things. I ought to send them an email, but haven’t yet. Number 2, go back to colocation. I’ve got two 1U servers sitting upstairs unused, but colocation is a pain. It means physically installing the machines, and as we live near downtown, that either means paying a lot or driving further away from downtown to find a good price. That means taking a morning or two off. Sucky. Number 3, ditch Java on the server. I was running a couple of Rollers and a JIRA. Migrating the JIRA to Code.Google has been a todo for a while, so I’ll just do that (at some point), which leaves the Rollers.

We’ve enjoyed using Roller, hopefully we will again. It has features that we’ll definitely miss; and I definitely feel safer using products that I’m confident are going to remain open source. We were using Moveable Type before moving to Roller, and the one I’ve chosen, WordPress, seems to be accused of a similar direction (Google for ‘wordpress security’).

Migrating is fun though, and it’s more fun than hassling support to get Java running again on a low-memory virtual system, or doing physical machine migration. So first up was choosing new software. Moveable Type was out - they haven’t released their return to open source version yet, and even if they did there’s a lack of trust issue to deal with there. Other Java blogs are out too. As are the free hosted services, we’re used to more control. The one that Carrie suggested via happy friends was WordPress. When this later matched with the one that coders on IRC were recommending, it was time to look at it.

Most important is data migration. I took a script from somewhere (and now can’t figure out where) that you setup as a template in Roller and executed. The idea being that it would dump your blog as wordpress.xml format; however that’s only for older Rollers (probably still JRoller) so I had to rewrite it as a JSP to get it to work on the newer Roller version. If not for the script, I suspect I would be migrating to a new physical box by now. It gave me the guts that even an evening of fighting with Velocity wasn’t enough to slow me down and make me want to drive out to Bothell with a 1U.

Next up - installing the software and importing the data. WordPress itself seemed nice and shiny, until my confused self wondered where the blogs were. Seems that it’s a uni-blog. Installing 3 or 4 seemed daft, but that was seeming to be my only hope before I wandered across WordPressMu - the software that runs wordpress.com. It looks like a big hack on top of WordPress, but I gave it a shot.

It has quirks. They turned various features off in the code. I turned one back on (in-browser theme editing). They support *.foo.domain.com, we want various different domains. This lead to some late night hacking of their login code to support the cookies. That might have been a deal-breaker usually, but we’d just finished getting the l&f right, moving to the real domains and setting up the rewrites when I discovered that we could no longer log in so rolling back was the alternative. After these changes, I’m not looking forward to the first upgrade.

I liked the feature whereby I can define the permalink structure. This lets me continue to use the Roller style url and maintain existing urls. That’ll also let us migrate back someday if I get the platform.

We’re going to miss Roller’s feature whereby comments would close after N days. I’m going to have to write a cron-job that hits the database for that I think - though always possible that one of the many plugins I hear of does that. That’s a negative of WPMu, not all plugins work.

I’ve a suspicion that spam will continue to be a problem. It’ll be interesting to see whether it’s better or worse than Roller.

License is of course an irritation. Less so for the server, but even the default theme is GPL. That sucks mightily as it might infect the themes we’re migrating as the default is the obvious example to base your new theme on. Fortunately I doubt very much that we would pull anything of value out of the theme when migrating to another server someday, instead we’ll continue to take the part we created, the theme customisations themselves.

I’m not sure how this’ll work out. It’s been an irritation to have to do this, but fun to play with something new(ish). Now I just need to avoid the other Roller committers lynching me :)

Captain Brazil

Wednesday, May 9th, 2007

Tim Ellison with Geir and his flag at JavaOne via my admittedly crappy phonecam.

JCK in JavaOne Keynote

Tuesday, May 8th, 2007

So the big question from Apache’s point of view with regard to JavaOne is whether we’re being listened to concerning the inability to properly license Harmony as Java(tm). Geir guessed right with his first guess, as far as I can interpret the statement was that they would sort out the TCK for open source Java (in the context of OpenJDK) via a series of steps etc etc usw usw.

I don’t think that Rich Green announced anything about it being open source per se, just that it would be useable by open source. Not that he defined whether ‘open source’ is Sun’s projects or the community.

More JIRA happiness

Thursday, April 19th, 2007

New versions of the Current User Status plugin (1.0.1) and the Release Status plugin (2.3) were released tonight. Both were bugfix releases based on user feedback. I know, it should have been 2.2.1.

I also released the Improved HTML plugin. It’s not very snazzy, but it was something I needed as the default JIRA ones didn’t quite do what I wanted.

Which was to have a message for anonymous users that didn’t get in the face of logged in users on the Struts JIRA. Yes - all 6 of my plugins (8 portlets in total) are now deployed into the Struts JIRA install for your bug viewing pleasure. If that continues to go well, my next aim will be to replace the main ASF JIRA with something very similar to the Struts one.

New JIRA plugin (Current User Status 1.0)

Tuesday, April 10th, 2007

I know, I know. Five days and no releases, you were all getting worried. Sadly tax season used up some time. Thankfully that’s (nearly) all done with, so here’s the new Current User Status plugin.

New JIRA plugin (ProjectList Plugin 1.0)

Thursday, April 5th, 2007

Energy hit me tonight and I took the proof of concept projectlist portlet I had and got the HTML and JavaScript all nicely squared off (pending bug reports).

It’s a portlet designed to stop JIRAs like Apache’s and Codehaus’s from being a huge optical overload. I’m not sure it will get a user to their next step more slowly or more quickly, but it does open up screen real estate for other pieces of information. Here’s how it looks once a few hidden bits have been unhidden:

I’ll work on getting these to an Apache JIRA near you once I do a bugfix release of all of the other plugins. In the meantime you can play with them on the osjava.org JIRA.

Download from the project page.

FilterList 1.0.2 released

Wednesday, March 28th, 2007

Unless I get seized by some creative muse, this is probably the last JIRA bit for a little while as I’ve nothing left unreleased and only a couple of minor wishlist items in my head currently. Time to think of a new plugin I think.

Anyway, I’ve released 1.0.2 of the FilterList plugin. As I said in a previous post, this is the oldest of my plugins at a stunning 5 weeks or so of age. It’s had 6 releases during that time, 3 of them public. 1.0.2 is a second minor bugfix release with a bug found by a user (clicking on Go when nothing is selected), a switch from a HTML submit button to an image and an i18n improvement that I noticed. Enjoy.

For more info, here’s the website.