|
Rollover Compare Update
Rollover Compare is an internal utility that helps improve code quality by identifying differences between a file that exists in the most recent two years and having the developer review and acknowledge that the difference is acceptable or update the code to match.
We are continuing another round of review and task creation to get our code base to pass Rollover Compare since our transition to GIT, so please watch for any task assignments and download or build the latest Rollover Compare (still in TFS $\Nau\Tools\Nau.Tools.RolloverCompare) to review and process any resolutions.
GIT Integration
The utility has recently been refactored to use GIT for source control interactions, but as far as any noticeable impact, you should still see the same results in almost all cases. Pending changes checkbox still works the same, etc…
The main consideration is that you set your GIT branch context before running the utility.
You can either do that from a command prompt:
cd \repos\EASYsuite
git checkout
or in Visual Studio ‘Check Out’ the branch you want to run Rollover Compare against.
When running Rollover Compare, confirm you are in the branch you expected.
One other difference that you may see is edits to the \RolloverCompare\YYYY text files, where TFS was sometimes inconsistent in adding/checking out the file(s) so they were not always in pending changes. With GIT, it appears more consistent in tracking any changes to your repository file share made from any source, so you will see those pending changes show up in Visual Studio pending changes. There may be changes not relevant to your specific tasks, so work to only resolve differences specific to your task.
Performance Improvements
The utility is now multi-threaded, taking advantage of up to 8 workers using the ConcurrentQueue pattern. ConcurrentQueue is a class that we have used in a few other areas. The main benefit of this class is that it will guarantee that up to X(max specified) workers are running, so if any exceptions occur and a thread is no longer active or available, it will still manage and maintain up to the max workers specified.
When running single threaded a full diff on a branch was running about 15 – 20 minutes.
When running multi-threaded it is running in about 4 – 6 minutes.
Configuration
One configuration change is to remove the Oracle password from the config file in source control and network copies, so if you copy the utility from the network share, you can update your local config file.
Future Enhancements
We do not have any specific enhancements planned for Rollover Compare, but if you have any suggestions for improvements, please let someone on the IT Product or IT Technology Team know.
Some ideas that have been discussed:
- Alert user if they are not running as admin.
- This would save time from the user running a compare and having it fail at the end trying to write out to the log file.
- Reduce or eliminate reliance on an Oracle connection.
- The Oracle connection is only used to get a list of current schemas, so the comparer is able to manage those string matches with specific processing. We could look at adding this list to a config file and having it updated as schema changes, then we wouldn’t have to deal with the connection at all.
- Compare by list of commits.
- With the TFS integration, we had the capability to provide a list of shelvesets to the utility and it would process those similar to pending changes only. This feature has not been carried forward to make use of commits. If there is a need for this, please let us know.
- GIT -blame
- There may be some GIT features that we can utilize, possibly GIT -blame to identify the commits a difference may have occurred on, though reviewing history is generally fairly quick to identify the change that caused the difference.
|