March 2007 - Posts
Here's a problem i faced a few days ago,
I was migrating a TFS which was supposedly upgraded to SP1 to a new TFS server.
Since the source data tier and application tier were in the SP1 version of the TFS, I installed a new TFS server and upgraded it to SP1.
After that I went through all the normal procedure of moving the database to the new server.
After I finished that stage I checked the team explorer to see that everything is working.
When i tried to open the source control explorer I got this error-
"TF53018: The application tier [SERVER] is attempting to connect to a data tier with an incompatible version."
The first thing I did at that stage was what I always do when I run into serious problems- I went for coffee.
The second was looking for answers in Google.
What I found was this post which mostly talked about the beta version of the SP1, but it gave me some pointers. Checking the database tables I found this value:
TfsVersionControl database -> tbl_Repository table -> Row 1 -> SchemaVersion: 8.50727.138.
I checked out the server assemblies. Looking at- Microsoft.TeamFoundation.VersionControl.Server.dll, I saw that the version number was 8.50727.762.
I found out that the inconsistency here was the result of a bad update to SP1 in the original TFS. The database where I took the data from was not updated entirely to the SP1 version and that's why I ran into this issue.
What solved the problem was updating the target TFS server again, after the migration, to the SP1. See this post about SP1 setup.
Following couple of points to have in mind when migrating Team Foundation Server to SP1 based on problems and solutions we encounter:
- The first step is to install the prerequisite (KB919156). Make sure that the installation is finished successfully, displaying the summary/finish window. What sometimes happens is that the installation fails and the installation form closes without any notice. When you'll check the databases you'll see that some of the databases are in SINGLE_USER mode. To continue the installation, change all the databases accept the STS_CONFIG_TFS (and probably the reporting services databases- I'm not sure if about them) to SINGLE_USER mode and start the KB installation again. (If you change the STS_CONFIG_TFS database to SINGLE_USER mode you get an error message indicating that you should re-install the WSS. Don't do that! ;) ). Another thing that could happen is that after the upgrade finishes, the KB installation won't be able to change the databases back to MULTI_USER mode and you would get a Retry option but the installation will not crash. What you should do is change the restrict access of the databases that are still in the SINGLE_USER to MULTI_USER manually. You might need to stop some of the SQL services to be able to change them. After a few refreshes and retries you will be done with the KB installation.
- Next step is the SP1 installation. Make sure you don't have the beta version. You might encounter the same syndrome during this upgrade as you did in the KB919156 upgrade. Make sure you get the last windows indicating a successful installation. Make sure the databases don't get stuck in SINGLE_USER mode or in MULTI_USER mode
- Last thing is to make sure that the databases were updated. You can use the repository table in the VersionControl database as some indication to the success of the upgrade.
Just in case you still run into some problems after the upgrade process, here's post provided by a colleague of mine which might help you.
CodePlex has a great new project focusing on Team System community education. The project, that can be found at http://www.codeplex.com/VSTSGuidance, contains abundance of helpful information.
The project contains video based tutorials, how-tos and an extensive links index for: articles, blogs, downloads, FAQs, forums, training, web casts and much more.
I really enjoyed the project and hope that it will keep growing and expend its knowledge base, which is now focusing a lot on Source Control issues.
And again about the famous issue of the TFS version control – Get latest version on check-out. I hear this question from many customers which migrate from VSS to TFS – "How can we configure TFS to get latest version on check-out, like in VSS?". And the answer is: "In v1 you can not do it". We already posted about it some time ago, you can also read about some reasons for this desision in this article and this discussion.
I wrote a little Add-In for VS2005 that performs silent GetLatest action when the user requests CheckOut. The Utility is configurable through the configuration menu which is located under the "Tools" menu of VS.
You can enable or disable the add-in action and configure the TFS server properties.
This is the Beta version and not yet fully tested, so use it carefully.
You can download it from here.
For 64bit systems download it from here.
And please report me for bugs…
Today we need to undo check-out of other user, because one of our developers has to make modifications to a locked file, and the developer who locked the file isn't available to unlock it.
How locked/checked-out file can be unlocked by other user?
- The person which unlocks this file(s) has to be with appropriate permissions: Having the Unlock other user's changes permission set to Allow is required to remove a lock held by another user.
File or folder can be set to allow users or group to Unlock other user's changes and Undo other user's changes. A user that is granted these permissions can perform the unlock or undo.
- After we found a granted user (The project administrator in our case) we used the TF.exe with the Undo command from a Visual Studio command prompt.
tf undo "$/MyProject/VersionX/Utils/file.cs" /WORKSPACE:MaorDev;Domain\User /server:MyServerName /recursive
Excute the command and relax. Your developers can back to work!
More details about TF undo command you can find here: http://msdn2.microsoft.com/en-us/library/c72skhw4(VS.80).aspx and about TFS permissions here: http://msdn2.microsoft.com/en-us/library/ms252587(VS.80).aspx
I installed today TFS SP1 on my customer’s production Team Foundation Server and after the installation (which was successful), all connections (even from the server machine) result an error.
The first one was 'Http 403 forbidden' from browsers, and also connection problem when trying to connect to TFS using Team Explorer.
You can find the workaround for this problem at section 6.9 of the TFS SP1 Known issues doc: http://msdn2.microsoft.com/en-us/teamsystem/aa948855.aspx .
This problem occurred cause during patching TFS SP1, Team Foundation Server configures IIS to not accept requests from remote connections.
The second problem was "TF30059 : Fatal error while initializing web service" after I tried to see Source Control.
I saw that TfsActivityLogging, TfsBuild, TfsIntegration, and TfsVersionControl databases were configured to single-user mode. I changed the mode back to multiple according to this manual: http://msdn2.microsoft.com/en-us/library/ms345598.aspx but I set multi, not single. The reason for this problem is that TFS SP1 leaving SQL server in single user mode and not alter the database back to multi user mode.
In VSS, we could perform a Share which created a pointer in one folder back to a file or folder in another. In this way, file changes checked-in to either location would show up in the other. There is not comparable feature in TFS, so what developers can do when they need to share resources in TFS?
We used the workspace power. The workspace “is your client side copy of the files and folders on the source control server”.
A workspace is unique to a machine and user, but can contain any number of mappings from the server to the local computer.
When creating and designing the workspace we knew that:
- A workspace can contain multiple server-to-local folder mappings.
- A single workspace can contain mappings for one or more Team Project.
Let's implement a solution based on the SCM tree of my post VSTS Source Control tree structure which support Concurrent development & Versions management .
- Our tree has several team projects:
- Shared - who contains 3rd party code/components and common code/infrastructure code between the development teams and a team project for every team.
- Development teams team projects – every team has its own team project. Every team project (except the general) is reachable only for its owner development team.
- Developer workspace: All developers’ workspaces mapped to:
- The teams’ project code - the depth of the mappings is equal for all developers in order to support relative paths and file references. We achieve in this design compilation of the code and unbroken references.
- Common code from the general Team Project in order to share code between teams.
Sequential development simply means that each step in the development lifecycle happens in sequential order—new feature development, followed by defect fixes, followed by a release. The obvious drawback is that new feature development must be stopped in order to fix defects.
Concurrent development shortens the overall development timeline by developing new features and fixing defects in parallel while working from a common code base.
Last week we implemented SCM project which support Concurrent development at one of our customers. How we did it? In a nutshell: branching!
- We created a baseline branch (name: MainLine).
- After development for the first release is complete, a feature freeze branch is created (name: Product 1.0).
- Feature development for the next major release continues in the MainLine branch while some developers fix defects in the Product 1.0 branch.
- Critical defect fixes for the release are made in the Product 1.0 branch and promoted to both the Product 1.0 and MainLine branches.
- After the product is released, the Product 1.0 branch was configured as read-only and a snapshot branch called Final Release 1.0.0 was configured to ensure the released code is captured.
A feature branch named FeatureX can also be created from MainLine. This process of branching and promoting changes continues for all minor and major releases. For example, a branch named Product 2.0 is created from MainLine when development on the next major release is complete.
The tree & Branching screenshot:
Last week we’ve finally released the newest member to our Team System tools list .The application deals with the synchronization of bug work item with Test Director defects.
One of our customers that is implementing a complete lifecycle in team system (Issue tracking, change management, requirement and testing) has an end customer, that unfortunately is not using TFS. The outcome is that the customer’s QA department is opening bugs in Team System and the people running the acceptance tests (end customer) open bugs for our customer in Test Director.
The synchronization solution consists of 3 main parts:
Synchronization engine – is responsible for translating a defect to a bug and vice versa.
Configuration layer – manages the work item/defect dictionary. Enables the correlation between fields and values.
Sync interfaces - we’ve implemented two wrappers, one is addressing Team System and the other is addressing Test Director. We chose this architecture knowing that in the very near future we’ll have to apply the solution to Quality Center. When the times comes all we’ll have to do is replace one wrapper.
Screen shots of the application:
The Reporting Services enables us to create custom reports for our BI needs.
One aspect of creating such a report is sometimes using a built-in sub-report, nested in a Table or Matrix object inside our main report.
This sub-report (which is actually another RDL file) creates a problem when trying to export all the report (main and sub) to Excel and display all its data properly:
When we try to view the sub-report data in Excel we see a message: "Subreports within table/matrix are ignored".
This problem occurs due to a technological limitation, not solved yet by Microsoft, disabling Excel from rendering correctly this structure (see this post).
You can easily solve this problem yourself simply by using a List object instead of a table or a matrix:
Use the list to contain your sub-report and when you export your report to Excel it will be displayed correctly.
The meeting will take place this Monday (the 13th) on the usual time and location - Dekel hall, Microsoft offices in Raanana on 17:30.
I'm attaching the meeting's presentation, the demos will available next week for download as well.
This month's meeting is about Visual Studio for Tester, we will start with a methodological discussion about the tester role and delve into extensive implementations.
The lecture is a joint effort of Guy Kolbis from SRL and Ariel Gur-Arie from MCD.
See you there,
I was a bit surprised recently analyzing load test results. We ran a simple load test, consisting of a single web test with 3 requests. Test ran for 10 minutes under constant load of 5 users. After test completion we tried to compare test results with actual work done by server. We found some inconsistency in the result numbers.
In summary you can see 160 Total Tests and 483 Total Request. This already looking odd. Just to remind you we have 3 requests per test, 160*3 = 480 (???).
To investigate this issue little further, we add Request Plugin and Web Test Pluguin to our test.
In PreWebTest event we logged 164 tests, in PostWebTest, we logged 160 tests. It appears that Total Tests number in Summary take in account only completed test. There were actually 4 more tests started, but have not enough time to complete all requests.
RequestPlugins results were even more interesting. We logged 486 requests in PreRequest event and 486 responses in PostRequest event. The same number of requests (486) was logged in IIS log. How about 483 Requests reported in summary??? Apparently Total Requests number count all requests that were completed, pass validation (successfully or not) and logged in local test results store. 6 additional request were completed and passed validation, but were not logged in time.
Load test summary numbers looks inconsistent in my opinion. I think it caused by misleading definition of counters. There is no direct relation between Total Tests and Total Requests. Just to make it clear, there is no bug in counters values. It is form of presentation that makes it unclear.
If you need to count actual requests number (as we did), you can not rely on numbers in summary. To solve this you can use test plugins or perform iteration based load test.
Can Team System be installed on a 64-bit platform? Answer:
TFS can't be installed on a 64-bit platform since it requires the application-tier to be run on a 32-bit platform.
Explanation and Scenarios: Application-tier setup on a 64-bit system scenario was not tested sufficiently by Microsoft in RTM timeline (see this post
). That is why this scenario is blocked in the current TFS setup and officially is unsupported (If you try to install TFS Application-tier on a 64-bit operating system with SQL Server 2005, setup does not detect the SQL Server services and blocks the installation). Installation choices available today are:
- Single server setup: Can be performed on a 32-bit platform only.
- Double server setup:
- Data-tier can be installed on a 64-bit system; Application-tier can be installed on a 32-bit system.
- Both data-tier and application-tier can be installed on 32-bit systems only.
- Build Server can be installed on a 64-bit system.
- TFS Proxy can be installed on a 32-bit system only.
- Team system client (Team Explorer) can be installed on a 64-bit platform.
Choice between Single server and Dual server installation should be based on expected capacity (see TFS installation guide
After a lot of questions and promises, I finally found some time to complete Outlook2007 version of TFS Addin.
Some new features in this version:
- Attachments now transmitted from email to created work item
- Search field accept free text to be found in Work Item title
- Configuration stored now in local user file instead of registry which allow to use addin with low credentials
This is a first (definitely non commercial) release. Please let us know about any issues you can encounter. Any suggestions are more then welcome (as always).
Download available from here