Using the Tracker Configuration Comparator
The goal of this page is to describe how to upgrade, validate and fix trackers after upgrading to codebeamer release 22.10 (GINA).
Background
During the tracker configuration upgrade in the 22.10 (GINA) release, an unlimited number of scenarios can happen to a tracker throughout its lifecycle. Since the upgrade process attempts to resolve every issue, certain differences can be identified between the tracker configurations and their previous version.
Environment Setup
To set up your environment, follow the below steps:
- Create a test environment of your production, and ensure it is stopped.
- Add the attached cb-trackerconfigcomparator.jar to the classpath.
- Edit the my-applicationContext.xml by adding the following bean definitions:
<bean id="trackerComparatorSqlSessionFactory" class="com.intland.codebeamer.persistence.util.ibatis.SqlSessionFactoryProvider" lazy-init="false">
<property name="dataSource" ref="dataSource" />
<property name="databaseProvider" ref="databaseProvider" />
<property name="sqlSessionFactoryBuilder" ref="cbSqlSessionFactoryBuilder" />
<property name="templateRenderer" ref="templateRenderer" />
<property name="configLocation" value="classpath:mybatis-config.xml"/>
<property name="mapperLocations">
<array>
<value>classpath*:com/intland/codebeamer/persistence/dao/sqlmap/TrackerConfigComparatorUpgrade.xml</value>
</array>
</property>
</bean>
<bean id="trackerComparatorSqlSession" class="org.mybatis.spring.SqlSessionTemplate" lazy-init="false" destroy-method="clearCache">
<constructor-arg index="0" ref="trackerComparatorSqlSessionFactory" />
</bean>
- Start codebeamer, and wait until it is up and running.
- Check whether the first part of the tracker configuration comparator has been executed:
- Check the upgrade statements table: select * from upgrade_statements where statement_id='TrackerConfigComparator-SaveTrackerConfigs'
- Check whether the tracker_configurations_temp table is exists. This table contains the tracker configurations which will be upgraded by codebeamer 22.10 (GINA).
- Upgrade to the latest codebeamer release 22.10 (GINA).
- Check the upgrade statements table: select * from upgrade_statements where statement_id='TrackerConfigComparator-CompareTrackerConfig'
- Check whether the tracker_configurations_temp table is exists. This table contains the tracker configurations before and after the upgrade, as well as the differences.
Read the Tracker Differences
After the upgrade, the tracker_configurations_temp contains the differences between the previous and the current tracker revision.
It is recommended to set up another test environment with the production version, check the differences and, if necessary, change the tracker configuration on the Tracker Configuration page. It is also advised to change the template tracker in order to solve this issue in all the children trackers too.
Rerun the Tracker Comparator
In order to rerun the tracker comparator, perform the following steps:
- Stop codebeamer.
- Run the following database statements:
- update tracker_configurations_temp set configuration_new = NULL, tracker_diff = NULL;
- delete from upgrade_statements where statement_id='TrackerConfigComparator-CompareTrackerConfig';
- Start codebeamer, and wait until it is up and running.
- Check the tracker_configurations_temp table again, and make changes according to the tracker differences.
- Repeat the steps until all the tracker differences are eliminated.
By noting all the changes and applying them in the production environment after upgrading to codebeamer release 22.10 (GINA), you can be sure all the trackers are in the same state as before.
After Upgrading to codebeamer 22.10 (GINA)
- Delete the tracker_configurations_temp by executing the following: drop table tracker_configurations_temp.
- Revert the modifications in the my-applicationContext.xml file.