Really bad logic in Vault's command-line client...

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
ReubenH
Posts: 3
Joined: Mon May 17, 2004 10:24 am

Really bad logic in Vault's command-line client...

Post by ReubenH » Mon Jun 07, 2004 5:45 am

We have a script that performs a GET of all product source code and builds everything. The script goes to the trouble of inspecting the XML returned by the Vault command-line client tool to check that the GET succeeded OK.

This morning I saw the script had failed, and looked at the stdout dump to find the reason why. Lo and behold the reason became clear once I saw Vault's XML.

Code: Select all

<vault>
  <!-- Too many errors were encountered downloading files. Some files may not have been updated -->
  <result success="yes"/>'
</vault>
What? "Success=Yes"? It tells me - in a *comment* bigod! - that there were 'too many errors', but then reports that 'success=yes' anyway?

What sort of sick mind am I dealing with here????

No. If there were download errors then 'success' != 'yes' ... that's why my script failed, since the files weren't there to be built! I wonder how many times, thanks to this silent method of error reporting, that my build just happened to work OK but used stale files from previous GETs. It sure would explain a few things we've seen since moving to Vault.

Bah!

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Jun 07, 2004 6:45 am

ReubenH:

I just inspected the CLC code. It looks like the GET command only returns a failure if the object that was requested is not present in the repository. The method does not check for errors within the actual transfer of files.

I've created a bug report for this item, as the entire GET process should report some sort of failue unless everything runs smoothly.

Thanks for the report.
Jeff Clausius
SourceGear

rmaines
Posts: 1
Joined: Mon Oct 03, 2005 11:48 am

Too many errors were encountered downloading files.

Post by rmaines » Mon Oct 03, 2005 11:54 am

We too are experiencing this problem on an intermittent basis using the Vault command line during our nightly build process. The Vault Client version on our build machine is 2.06 and we do not have Sharepoint Installed on our build machine, only IIS, Visual Studio and Vault Client. For now, the only way for us to handle these types of failues is to inspect the xml from Vault after each Get operation, which is extremely ineffecient since we're retrieving a large source tree. Have there been any updates to the Client which report this message as a failure instead of success="yes"??

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Oct 03, 2005 1:55 pm

This was fixed last year in Vault 3.0. Now, the GET command should return failures if anything wrong occurred during the get.
Linda Bauer
SourceGear
Technical Support Manager

Guest

Post by Guest » Mon Oct 03, 2005 2:05 pm

In order to upgrade the client from 2.06, is it true that we would also need to upgrade the Server?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Oct 04, 2005 3:38 pm

Yes. Vault 2.x clients cannot connect to a Vault 3.x server and 3.x clients cannot connect to a 2.x server.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply