Tag Archives: EAP

Upsource EAP Preview – Repository Browser and Code Review From JetBrains

Written by William Roush on August 28, 2014 at 10:38 pm

This article is a bit out of date, JetBrains has made some changes that I need to review and update the relevant sections of this article.

Upsource is a new code browser and code review system by JetBrains, the guys behind popular development software like Resharper, IntelliJ IDEA and TeamCity.

Update: I’ve been talking with some of the developers, I’ve made notes around the article with things they’ve gotten back to me about.

Upsource Early Access Program

Upsource is currently available through it’s Early Access Program — Mind you everything you read here is about Upsource in it’s EAP state, I’ll be doing more reviews as the software evolves (JetBrains continuously adds awesome stuff to their software).

Requirements

Shame on me, didn’t check this at first. Threw it on a Linux machine with 2GB of memory, watched the entire system crash with out of memory exceptions. Oops.

The 8GB of RAM is a little steep, but it’s sitting on top of Java, so some memory hungry behavior is expected.

UpSource is a bit hungry resource wise.

Upsource is a bit hungry resource wise.

You may want to throw two CPU cores at it, startup was a bit slow, however once it was running the application was smooth.

Lets Get Started

So I unpack the zip file, install OpenJDK 7’s JRE, and fire up the services, Upsource is reported as online, but I’m met with a blank page while Java thrashes about. Very easy to set up though.

Project Management

Creating A Project

Creating a project is quite easy, give it a name, point it at your current repository sever, and away you go. No hang-ups here really.

Project Sprawl

At the current moment, for those of us working at places that have 40+ projects, it looks like there will just be a massive amount of horizontal sprawl going on, TeamCity had a similar issue until recently when project hierarchies were added, I’m sure this will end up in Upsource at some point.

This also includes the groups that are automatically created (“[project] Developers”, “[project] Observer”, and “[project] Project Admin”), these will be created for every repo you have, even though you’d likely have a ton of repos under one group schema.

Main Upsource UI

Main UpSource UI, showing projects and a news feed.

Main Upsource UI, showing projects and a news feed.

When logging in you view all available projects and your news feed. I really dig the news feed, showing all comments on your reviews and mentions for your user account. The main thing I don’t like is that getting to this page from a child project is annoying.

Project Status UI

Project overview UI is pretty straightforward.

Project overview UI is pretty straightforward.

The main project UI is pretty basic but gives you what you want, on the left side you see a handful of recent changesets with a nice visual tree. From here you can navigate to a commit to start a review, browse code in the repository or jump straight to analytics.

Analytics

This is one of those major extras I love with systems like Upsource and Crucible. This gives a very visual breakdown of who handles what commits, and who is handling what reviews.

Statistics for Redmine contributions pulled from Bitbucket

Statistics for Redmine contributions pulled from Bitbucket

The visualization is powerful, I’d like the ability to map multiple users together to a single user in Upsource (doable in Redmine, Crucible, etc.), please allow this setting to be global (a major problem that Crucible had the last time I used it).

 

Code Reviews

This is by far the biggest reason I was looking towards Upsource. Previously I’ve looked at using Crucible for our code review system, and like 90% of it, however there is a critical piece of functionality it lacks, and that is supporting a good UX workflow for post-commit review for multiple branches of code. Sadly Upsource also suffers from this problem (and straight up doesn’t support it, more on this later).

My Mercurial Workflow

Basic mercurial workflow I follow.

Basic mercurial workflow I follow.

The workflow process I follow is pretty straight forward, each bug or feature gets it’s own named branch on Mercurial, each branch is closed and merged onto a staging branch where things are tested, verified and reviewed, and once everything is approved onto default it goes to get tagged and released.

Where Upsource Fails To Support This Workflow

Update: This is planned to be fixed in the 1.0 release, I’ll see if the UI works well.

To create a review in Upsource you select a single commit and click “Create Review”, from here you can add more revisions using Upsource’s powerful search system.

There are a couple issues I have however, if I search for “branch:stage-1.1.0”, it will also apparently bring in any parent of the named branch “stage-1.1.0” which will include all previous commits, so I can’t easily just add all commits I see on the search page.

I can search for each invididual commit ID by searching for “id:[] OR id:[] OR id:[]” for every included changeset, however there is a problem with including changesets from different branches (more on that later).

I’d love for some powerful way to select all items between the default commit at the bottom of the workflow image above and the last staging commit, this would make the workflow a thousand times easier and would instantly have me sold.

Code Review UI

 

Inline review is pretty clean, single-line comments leaves a little to be desired.

Inline review is pretty clean, single-line comments leaves a little to be desired.

The UI is pretty clean, one feature I do miss from ReviewBoard is being able to make block comments. This allows you to choose a range of line numbers by clicking and dragging and putting a comment on them. This allows you to bring a developer’s attention to a block of code instead of an individual line.

Side-by-side diffs are available too.

Side-by-side diffs are available too.

Side-by-side diffs are nice, double clicking allows you to still add comments to the commit, this wasn’t immediately apparent and they should probably leverage the same edit icon on the inline code review diffs.

 

Additionally, I really did prefer the nice single file UI that Crucible has, I’ve worked with some changes that can span 10-15 files, and hundreds of lines of changes. When these are all crammed onto the same page your scroll bar can get really tiny (and some other ill effects in terms of browser performance can begin to happen). These aren’t often, but when refactoring old code bases it’s bound to happen.

Code Review Process

Unlike Crucible there isn’t a predefined process, which is unfortunate, every time you do a review you add individual users to the review and individual users as watchers.

Completed reviews show a green check box near the user's icon.

Completed reviews show a green check box near the user’s icon.

I do like that you complete reviews, which is better over ReviewBoard which only includes a “ship it” button, so no way to mark a review as completed but the code quality insufficient for production.

Reviewing Code From Multiple Branches

Update: This is planned to be fixed in the 1.0 release.

So when attempting to review code from multiple branches (say from my example of the resulting code from bug 1 and bug 2 to be pushed to live), you are greeted with this error:

No multi-branch review support.

No multi-branch review support.

So even if I was patient enough to select each individual changeset it won’t support it.

Repository Browser

Code Display

Code browser, limited language support.

Code browser, limited language support.

The code display is pretty straight forward, lets you browse through your repository, uses the same display as your inline diff UI, only thing I wish I had here was multiple language support (even if it was a framework that 3rd parties could write tools for).

File History

File history, what more is there to ask for?

File history, what more is there to ask for?

File history is pretty straight forward, I seriously can’t think of anything to ask for.

Code Annotation

Annotation works like blame in Git/Mercurial.

Annotation works like blame in Git/Mercurial.

Code annotation is pretty nice, shows you who and what changeset the last changes came from, much like blame in Git and Mercurial, but this UI is a bit nicer and will let you navigate straight to the related changeset.

Final Thoughts

Sadly Upsource doesn’t support the code review process I’d need to adopt it, however JetBrains is known to constantly improve their product line and I’m eager to see this product continue to evolve. If you don’t mind per-commit reviews (instead of batching reviews based on branching policies) then I’d recommend you keep an eye out for Upsource coming out.

Required Features Before I’d Use it

  • Support for batched reviews, based off the results of multiple branches coming together.

Tasty Features

  • Ability to define a more strict revival process (all reviews require approval from [x] people from team [a] and/or [y] people from team [b]), with the ability to automatically mark a review as complete with this objective is met.
  • Approval/rejection of a code review.
  • Single-file review process that isn’t just side-by-side.
  • A little more love for the side-by-side UI.

Bugs I Ran Into

  • Every once in awhile when refreshing a page, I was greeted with an authentication failure error, refreshing the page a few times would generally fix this.
  • Adding an empty repository will have pretty bad consequences and errors everywhere.

Curiosities

  • On every page you navigate around Upsource you are greeted “Loading Upsource” UI element while the page loads, as if they intended it to be a single page application but moved away from it. At least I don’t typically see this behavior in an application that has a bunch of individual pages. Update: The application is supposed to be a single page application! Found a bug that apparently is known but they’re gathering info on, will be providing info to JetBrains to fix.