Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around TFS SDK defect when re-creating an older workspace #80

Merged
merged 2 commits into from
Jun 16, 2016

Conversation

olivierdagenais
Copy link
Member

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 the Cache/VersionControl.config file. Previously, it appears the VSTS account e-mail address was stored (one of the OwnerAlias 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 an ownerName 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!

Oli Dagenais added 2 commits June 13, 2016 23:06
This will be needed to work around a defect in the TFS SDK for Java.
It appears @ownername in VersionControl.config used to be one of the
OwnerAlias values and then it switched to using a GUID.
This situation prevented the re-creation of a workspace after
its deletion, something Jenkins builds do all the time.
@olivierdagenais olivierdagenais merged commit c57d532 into master Jun 16, 2016
@olivierdagenais olivierdagenais deleted the delete_and_recreate_older_workspace branch June 16, 2016 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant