Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Re-execute Promotion Fails SVN Tag If Exists
-
We have a number of steps in our deployment step. The first of which is to get the source and TAG it. This moves the files into the /tag/ folder in the the repository.
The problem we keep facing is if something after the tagging has completed fails (backup failed, unit test failed, etc...), we can not re-execute the promotion as it fails on the tagging step as the tag already exists.
Error Message:
SharpSvn.SvnFileSystemException: Path 'tags/v1.130720003' already exists at Inedo.BuildMaster.Windows.ServiceApplication.SlimPlanActionExecuter.ExecuteRemoteCommand(RemoteActionBase action, RemoteCommandEventArgs e) at Inedo.BuildMaster.Windows.ServiceApplication.SlimPlanActionExecuter.TryExecuteRemoteCommand(RemoteActionBase action, RemoteCommandEventArgs e)Is there a way to "Retag" and overwrite?
Or delete the current tag first?
-
Few options...
-
Use the Re-execution predicate to only have the action group run on the first execution
-
set errors to warn
-
set resume on error
-
do a Svn Client Command to delete the branch
-
don't re-execute in first environment
The last is usually easiest / what we recommend.
-
-
Thanks for the quick reply!
We would like to go the custom route. Now when we execute the statement we are getting:
Executing command svn rm http://<REMOVED>/tags/v1.130720003
An unhandled exception occurred while executing this action: System.InvalidCastException: Unable to cast object of type 'Inedo.BuildMasterExtensions.Subversion.Subversion15Provider' to type 'Inedo.BuildMaster.Extensibility.Providers.SourceControl.IClientCommandProvider'. at Inedo.BuildMaster.Extensibility.Actions.SourceControl.ExecuteClientCommandAction.Execute() at Inedo.BuildMaster.Extensibility.Actions.ProviderBasedAction`1.Execute(IActionCancellationToken cancellationToken) at Inedo.BuildMaster.Extensibility.Actions.ActionBase.Execute(IActionCancellationToken cancellationToken, ExecutionContext context, ExtensionConfigurerBase extensionConfigurer, Boolean resumeNextOnError, Boolean logErrorsAsWarnings)
-
hi Glen, did you update to the latest Subversion extension? This looks like behavior from an older version that didn't have client command support..,
-
Hi Alex,
Hope you had a good weekend.
We had version 3.4 which I have now upgraded to version v3.5.5.0 however, we are still getting the same error.Some info that may be useful:
- We do not have SVN on the server executing the command
- I have tried multiple configurations
-
Command dropdown: "other"
svn rm http://<domain>/svn/<path_to_solution>/tags/v%RELNO%.%BLDNO% -m "Tag rebuilt by Buildmaster ReExecution"
(i have tried this with "svn" at the beginning and without) -
Command dropdown: "delete"
Arguments: http://<domain>/svn/<path_to_solution>/tags/v%RELNO%.%BLDNO% -m "Tag rebuilt by Buildmaster ReExecution"
I have manually executed the first command on the SVN server and it worked.
Otherwise when buildmaster executes it I am getting the exact same error as before. Perhaps email me directly and I can send you any information you may need to debug.
-
The v3.5 SVN extension definitely has IClientCommandProvider support so that error indicates the extension wasn't completely updated.
Did you manually install the extension? If so, make sure to restart both the BuildMaster service and the web application (Admin > Diagnostics > Control the BuildMaster Service/Website) to ensure that the extension is loaded properly. Even if was downloaded automatically from the gallery, it's worth restarting anyway just to be sure.
-
Hey Tod,
Thanks for the response.
I download the bmx file directly from your website about 5 hours ago. Initially in the extensions section it still showed the old version. We actually restarted the server which then reflected the new version.Is there some log I can look into which might hold some clues?
-
There's no real logs for that sort of thing other than the deployment ones.
Can you stop & restart the BuildMaster service, and attempt to run the client command action again. Also, can you verify that if you get an error, it's actually the same error?
As a sanity check, I just checked inside the newest Subversion.dll downloaded from our website and it implements the IClientCommandProvider interface, so if that error comes back again something else is going on here.
-
Hey Tod,
Sorry about the confusion, the error was indeed different. I think we got a bit cross eyed while trying to figure all this out.
The setup that we had to use in the end was rather awkward. Buildmaster seems to add quotations around the arguments section.
We had the following setup:
Command: delete http://<path_to_repo>
Argument: -m "ReExecution by Buildmaster"When looking at the logs, it was converting that to:
delete http://<path_to_repo> " -m "ReExecution by Buildmaster"" --non-inteactive etc...
Notice the double quotations.So we ended up having to jimmy it a bit and it is now working with:
Command: delete http://<path_to_repo> -m
Argument: ReExecution by BuildmasterSo I guess we can scratch this one of the list.
Hopefully can present to the boss soon and get some budget for this.