I've been working on an automated service to do our internal builds. It is a simple custom build web service that gets the source from Vault first via API and then executes the tasks in turn.
The version of Vault I am using is v4.1.2. I am having concurrency problems: the web service sets a label first and then gets the source into a local subdirectory using:
Code: Select all
GetOperations.ProcessCommandGetLabelToLocationOutsideWorkingFolder(vaultFolderPath, labelName, Nothing, getOptions, localFolderPath)
Code: Select all
VaultClientOperationsLib.GetLatestVersionFailedException: Exception of type 'VaultClientOperationsLib.GetLatestVersionFailedException' was thrown.
at VaultClientOperationsLib.ClientInstance.ProcessGetFileRequests(GetFileInfo[] infos, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, Boolean updateHiddenFilesOnly, String ancestorFullPath, Boolean flat, String ancestorDiskPath, OverwritePrompt PromptData, Boolean isLabelGet, String currentPathToLabelItem, Int64 labelID, Boolean isRetry, Boolean isGetByDisplayVersion)
at VaultClientOperationsLib.ClientInstance.GetByLabelToNonWorkingFolder_GetData(VaultClientFile[] files, Boolean overwrite, MakeWritableType makeWritable, SetFileTimeType setFileTime, String ancestorFullPath, String ancestorDiskPath, OverwritePrompt PromptData, Int64 labelID, String currentPathToLabelItem, String labelSubItemPath, Boolean isLabelGetForSingleFile)
at VaultClientOperationsLib.ClientInstance.GetByLabelToNonWorkingFolder_GetData(VaultClientFolder folder, Boolean recursive, Boolean overwrite, MakeWritableType makeWritable, SetFileTimeType setFileTime, String destinationDiskPath, OverwritePrompt PromptData, Int64 labelID, String currentPathToLabelItem, String labelSubItemPath)
at VaultClientIntegrationLib.GetOperations.performLabelGet(String objectPath, String label, String labelSubItem, String labelWorkingFolder, String destPath, GetOptions go)
at VaultClientIntegrationLib.GetOperations.ProcessCommandGetLabelToLocationOutsideWorkingFolder(String objectPath, String label, String labelSubItem, GetOptions getOptions, String destPath)
Code: Select all
If (Not ServerOperations.isConnected) Then
ServerOperations.client.LoginOptions.URL = ...
ServerOperations.client.LoginOptions.User = ...
ServerOperations.client.LoginOptions.Password = ...
ServerOperations.client.LoginOptions.Repository = ...
ServerOperations.Login(VaultConnection.AccessLevelType.Client, true, true)
End If
How else can I do it? How would you recommend handling Vault connections generally? Maintain a pool and allocate to each thread? What is the most optimal way to do it for me (performance etc)?
Also, what do "bAllowAuto", "bSaveSession" parameters mean in the call to Login? What are their defaults (in Login())? Also, can you explain what VaultConnection.AccessLevelType options mean, especially when used in a web service?
Thanks a lot.