Work around TFS SDK defect when re-creating an older workspace #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It appears Visual Studio Team Services may have changed, in the last few months, the value of what the TFS SDK for Java maps to the
ownerName
attribute in theCache/VersionControl.config
file. Previously, it appears the VSTS account e-mail address was stored (one of theOwnerAlias
values) and now it's a GUID.Whatever the cause for this change, it means deleting a workspace that was created when
ownerName
wasn't a GUID will succeed in completing the operation on the server but the corresponding entry will not be removed from the cache (because it's looking for a workspace with anownerName
being a GUID), which will cause the subsequent workspace re-creation to succeed in completing the operation on the server, but fail when attempting to update the cache, saying there are two workspaces with the same name.The defect was reproduced with a fairly complicated JUnit test, which is attached as TeamFoundationServerScmIntegrationTest.java.txt Said test was submitted to the appropriate team for consideration.
This defect was causing failures of the Jenkins TFS plugin's functional tests on my Jenkins cluster. Just pushing this branch to GitHub triggered a build, which saw all its functional tests now pass.
Mission accomplished!