Have you tried Malevich? Share your experiences here!

Coordinator
Jan 26, 2009 at 4:19 AM
What went well? What did not go well? What should be improved?
Developer
Apr 2, 2009 at 11:26 AM
Its a fantastic tool to improve code reviews.

I was able to install successfully and initiate the reviews. There were two issues that I faced.

1. Sending mail through either smtp or exchange did not work.
2. There was some confusion around the diff tool. I was trying to build from UnixUtilsSrc. But realised that the binaries were already available.

Now that I got my first version up and running will evangelize this tool to improve the code review effectiveness.

Thanks

Venkatesh
Coordinator
Apr 2, 2009 at 11:28 PM
Hi, Venkatesh,

ReviewNotifier has a test mode (testsetup command like) that tests mailing functionality. This should help you troubleshoot the issue. The security settings are most likely to blame - make sure you have entering them correctly, that Exchange/SMTP server recognizes this user, and if you're using send on behalf account, that the account that you use to run the service in fact has permission to send on behalf of that user. Also, if you find that testsetup can send email but the scheduled task doesn't, make sure that the scheduled task runs under the account that was used to configure the mailer.

If none of these works, send me a mail and maybe we can arrange a debug session...

-S
Developer
Apr 29, 2009 at 2:19 PM
Strangely the 0.9 MSI did not work for me on any of the 3 computers I tried it on, all WS2008/SQL2008/iis7. The error message was: Could not locate default SQL Server instance. Manually installing it from TeamExplorer went smoothly and I'm happily using it now! Very useful tool!
Apr 30, 2009 at 1:55 AM

I'm trying the installer, but it continues to fail at a certain point. The last from the log is pasted below. I have a Hyper-V machine, so I'm doing this on a brand-new VM with Win2k8, IIS, and SQL2008 installed. Everything upto this point succeeds.

Running USE [CodeReview];IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is
_default=1 AND name = N'PRIMARY') ALTER DATABASE [CodeReview] MODIFY FILEGROUP [
PRIMARY] DEFAULT
  Deploying the metadata:
An unexpected failure occurred: Object reference not set to an instance of an ob
ject.

  Running the post-deployment script.
System.Data.SqlClient.SqlException: Cannot find the object 'AddChangeList', beca
use it does not exist or you do not have permission.
Cannot find the object 'AddComment', because it does not exist or you do not hav
e permission.
Cannot find the object 'AddFile', because it does not exist or you do not have p
ermission.
Cannot find the object 'AddReview', because it does not exist or you do not have
 permission.
Cannot find the object 'AddReviewer', because it does not exist or you do not ha
ve permission.
Cannot find the object 'AddReviewRequest', because it does not exist or you do n
ot have permission.
Cannot find the object 'AddVersion', because it does not exist or you do not hav
e permission.
Cannot find the object 'DeleteChangeList', because it does not exist or you do n
ot have permission.
Cannot find the object 'DeleteComment', because it does not exist or you do not
have permission.
Cannot find the object 'RemoveFile', because it does not exist or you do not hav
e permission.
Cannot find the object 'SetUserContext', because it does not exist or you do not
 have permission.
Cannot find the object 'SubmitChangeList', because it does not exist or you do n
ot have permission.
Cannot find the object 'SubmitReview', because it does not exist or you do not h
ave permission.
Cannot find the object 'ChangeFile', because it does not exist or you do not hav
e permission.
Cannot find the object 'ChangeList', because it does not exist or you do not hav
e permission.
Cannot find the object 'Comment', because it does not exist or you do not have p
ermission.
Cannot find the object 'FileVersion', because it does not exist or you do not ha
ve permission.
Cannot find the object 'MailChangeList', because it does not exist or you do not
 have permission.
Cannot find the object 'MailReview', because it does not exist or you do not hav
e permission.
Cannot find the object 'Review', because it does not exist or you do not have pe
rmission.
Cannot find the object 'Reviewer', because it does not exist or you do not have
permission.
Cannot find the object 'SourceControl', because it does not exist or you do not
have permission.
Cannot find the object 'UserContext', because it does not exist or you do not ha
ve permission.
Invalid object name 'dbo.SourceControl'.
Changed database context to 'master'.
Changed database context to 'CodeReview'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName,
Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res
ult, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Installer.Program.InstallDatabase(InstallParameters installParams)
Could not backup database.
Press any key to exit...

Apr 30, 2009 at 2:37 AM
I looked through the Installer source, and attempted to recreate the command at the first point of failure:

C:\Program Files (x86)\Malevich Project\Malevich Code Review System>redistr\Deploy\vsdbcmd.exe /a:Deploy /cs:"Data Source=PMECR;Integrated Security=true" /model:"C:\Program Files (x86)\Malevich Project\Malevich Code Review System\$(TargetFileName)" /dd:+ /p:TargetDatabase=CodeReview
An unexpected failure occurred: Object reference not set to an instance of an object.

Matches what I see in the console (pasted above). Any ideas for why vsdbcmd.exe might produce this error? Is there a log on the filesystem somewhere?
Coordinator
Apr 30, 2009 at 3:11 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 30, 2009 at 3:13 AM
It looks like this is due to a bug in vsdbcmd. Resolution (for now) is to add the following registry entry (just run this from an admin CMD prompt):
reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0

More data is here:
http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/32725cf6-74c1-4b5a-9057-b909ae8a2517

I have also created a bug so that installer would do it on its own.
Coordinator
Apr 30, 2009 at 8:23 AM
Both problems (anpro's and ergosum's) are now fixed, and the new bits (0.9.1) pushed.

Thank you for reporting the bugs!
Apr 30, 2009 at 7:02 PM
Thanks Sergey.

One suggestion: The default font for the site (not the codereader) is ugly and distracting. I made a minor tweak to the ReviewStyle.css to set the font-family in body and it made a huge difference in readability and perception.

body
{
    font-family: Arial,Helvetica,sans-serif;
    font-size: 80%;
}

 

Aug 8, 2009 at 1:17 AM

Sergey,

Thanks for Malevich! Our team decided to use it for our code reviews and it's defenitely better than old "windiff -lo" way.

I installed the system twice. The first one was a "test mode", on my dev machine with Windows Vista, SQL Server Express 2008 and VS 2008. It went without any major issues, even though I'm a complete dummy in database servers, ASP.NET, IIS and C#. That was cool!

The second time we decided to do everything "seriously". Malevich was hosted on a lab machine with Windows 2003 SP1. We decided that the database will be on a dedicated SQL server with SQL Server 2005, supported and backed up by a lab team. With this setup I ran into a few issues, so now I know databases, ASP.NET and C# much better.

1. Using lab-supported server for the database meant we were no longer in full control over it.  

a. When database was deployed, the script produced some errors due to the lack of permissions (probably because of the attempt to grant user permissions or create database files). After that I had to manually check that all tables and stored procedures had been added to the database.

b. Lab folks chose a different name for the database, not "CodeReview". I thought it would be possible to change the name of the database in the code, but it turned out that it would be easier just to ask the lab team to rename the database :-).

2. Impersonation just didn't work. All requests to the database from the site returned error complaining on 'NT AUTHORITY\ANONYMOUS LOGON'. I couldn't find the root cause, but probably that was because of the settings in our ActiveDirectory. The bottom line is that impersonation doesn't necessary work over network, and it's better to avoid it. To workaround this issue, I disabled impersonation and granted database logon rights to the account of site-hosting machine. The next step was to update stored procedures 'AddComment', 'AddReview' and 'SetUserContext' to accept user name (dbo.GetCurrentUserAlias was returning hosting machine name now, which obviously was not what we wanted). After that everything worked fine.