Jump to content

Code Reviews in cloud/distributed


Jani Kärkkäinen
 Share

Recommended Posts

We've been looking for options to integrate Code Reviews to our development process. As we've been using PlasticSCM quite a while now, the logical method would be to use the internal Code Review system that's already been implemented to PlasticSCM.

However, we've been hitting a wall with this. The single biggest problem of using the built-in code review is that we use PlasticSCM as a distributed SCM, and none of our programmers connect straight to the Cloud Repository. Now, as I understand the code review process in PlasticSCM, it'd look a bit like this:

1. Select a branch you are ready to merge
2. Create a new code review for that branch
3. Some other programmer regularly checks code reviews, and sees there is a new code review present
4. This programmer then proceeds to review the code, comments and requests changes and clarifications accordingly
5. Now the original programmer checks the code reviews, and processes new comments and acts accordingly
6. Once everyone is satisfied, the code review is marked as Reviewed, and the merge can go on ahead

Now, suppose Programmer A has created a code review on their local workspace, that needs to be addressed by Programmer B. Programmer B now subsequently checks their Code Review tab, and they find nothing. It seems the information hasn't moved at all. As far as I know, the code review information is moved between servers with metadata. However, you cannot push only a metadata change to some other server, thus the only way to move the information about the code review would be to also make a file change that you could push.

So now, we have a few additional steps:
2a. Touch a file to change it and check-in to local
2b. Sync repositories
 

The other way we could make this work is to have a workspace that connects straight to the cloud, and only use code reviews on that workspace. This however creates a lot of possibilities for confusion, and it's not the direction we want to go.

So the question remains: How to either a) automatically or semi-automatically send code review data to the cloud server and back to local or b) change the code reviews window to actually access the cloud repository's code reviews while everything else is connected to local or c) streamline the sharing of code review information between distributed local servers some other way to prevent the need for creating a small change and a useless commit just to send a code-review comment?

Link to comment
Share on other sites

Hi Jani,

 

I'm afraid Code Review replication is not supported, so it won't be fully functional in your setup.

But, don't panic, as there are some options.

First, to send the metadata without needing to create a new changeset, you can right-click on the branch, then "push/pull" and then push the branch. This way, all the metadata should be sent. The other option is to work directly against cloud, but it is not what you want. You can still perform code reviews, however, you won't be able to change the status when checkin in, you won't be able to see the comments GUID. 

I think this stands for questions a and c.

 

For question b, you can create a code review directly to cloud without needing to create a new workspace. Just go to the repositories view, right click the desired repo, view branches, and then new code review for the desired branch. As I have said, this way you can create code reviews, but replication is still not supported, so you will be able to get it, but not to submit the status change directly.

Tell me if I haven't been clear, or if there is anything else I can help you with.

 

Best regards,

Héber.

 

Link to comment
Share on other sites

Thanks!

The ability to push and pull metadata changes, even if only for one specific branch, might actually be the thing we'd need for our workflow to be at least somewhat workable. We can then communicate the needed for review branches with other methods, such as issue tracking.

PS. Integration with HacknPlan would be dope!

Link to comment
Share on other sites

  • 1 year later...

I found this page while searching for a solution to the exact same problem.

TL;DR:  As far as I can tell, code reviews in Plastic are pretty broken. 

Specifically:

1. There's no way that I can see to do a code review that is blocking for a commit, or that is a gating function for merging from one branch to another.  

2. It's not even clear how to communicate/distribute a code review to the cloud even if done after the fact to someone else's commit.  After doing a code review on a branch (or a changeset) there are no clear options for how to propagate that to the cloud so that other people can see it. 

3. On the Code Review dialogue, it's not even clear what actually *ends* the code review.  After adding a bunch of comments, I am left with a bunch of things in "pending" status and no clear way to get those to the cloud repo for visibility on someone else's machine.     

The fact that this functionality comes after an apparent rewrite of the whole code review system in 2019 is mind-boggling to me.  I read a Plastic blog post on code reviews in which the author opined about how "we're not Git".  Code reviews (Pull requests) are an area that works quite well in Git, even if they have some eccentricities.   

But unless you're just purposefully trying not to be like Git, it seems you can't avoid that one of two basic functionalities is needed.  Either: 

1. The developer submits their code requesting a code review and pushes it, but it is in some kind of "pending" state, not an actual commit (similar to shelving).  It remains in that state until a code review occurs and all code review issues are addressed.

OR -

2. The developer submits their code and it is fully submitted and pushed.  However, to merge from their branch into certain other select branches requires a code review.  That is, the code review is not gating a commit/push, but it is gating on merging.  (This is the Git model)  

At this point we're still trying to figure out how to even get CRs distributed throughout our system.  However, it is clear enough at this point that whatever we do will be far enough from a normal workflow that it may not be useful at all.  We will look into whether there are any add-ons in Plastic that make code reviews practical, or whether we can use an external tool in a way that integrates well with Plastic.  Barring that we will likely look at switching away from Plastic.  It's unfortunate because there are so many other features that Plastic has that we like.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...