Whenever a template generation is run, the generation contract is always reported as different even though it may not be.
Expected Behaviour
Only real changes in the generation contract should be reported as differences.
Possible Solution
The problem is in the logic that detects change by comparing the generated file to the current file in the CMDB. The first check performed is whether there is any generation contract currently present. If not, then a difference is forced.
However, with the moving of file naming into the engine, the actual generation contract filename in the CMDB is not known when the generation contract pass is run, so a fixed filename is used, and the generation contract has a step to rename it. This means at the time the generation contract is checked for differences, it uses the fixed name to check for an existing file and fails.
A possible solution would be to add difference detection /processing as a step in the generation contract rather than be implicit behaviour of createTemplate. Then the first step of the contract would be to check itself for differences using the correct filenames.
Current Behaviour
Whenever a template generation is run, the generation contract is always reported as different even though it may not be.
Expected Behaviour
Only real changes in the generation contract should be reported as differences.
Possible Solution
The problem is in the logic that detects change by comparing the generated file to the current file in the CMDB. The first check performed is whether there is any generation contract currently present. If not, then a difference is forced.
However, with the moving of file naming into the engine, the actual generation contract filename in the CMDB is not known when the generation contract pass is run, so a fixed filename is used, and the generation contract has a step to rename it. This means at the time the generation contract is checked for differences, it uses the fixed name to check for an existing file and fails.
A possible solution would be to add difference detection /processing as a step in the generation contract rather than be implicit behaviour of createTemplate. Then the first step of the contract would be to check itself for differences using the correct filenames.
Steps to Reproduce
Your Environment