MettleCI component throws 'UnknownAssetTypeException' error
Problem
Many MettleCI operations need to understand the state of the project they are working with. Any of these Workbench or CLI operations can encounter this issue, but the example given comes from MettleCI Workbench attempting a commit. In this scenario, when developers commit changes, they are failing for all developers across all projects.
The errors vary, but here are two examples of commit failures throwing a similar Asset related exception. The string called out as an unknown asset suffix can vary.
15-11-2023 08:17:45 Working Directory: /opt/dm/mci/working/thread-1/DatastageCommitWorker
15-11-2023 08:17:55 Cloning GIT repository...
15-11-2023 08:18:13 Connecting to dvadsthdn8265.hban.us/Info_11713_Test_Project
15-11-2023 08:18:13 An exception occurred during execution
com.datamigrators.mettle.exception.UnknownAssetTypeException:
"java:1164|WRITE: TLS12 alert(close_notify), length = 10" is an unknown asset suffix
at com.datamigrators.mettle.asset.AssetType.fromSuffix(AssetType.java:90)
at com.datamigrators.mettle.asset.Asset.<init>(Asset.java:35)
at com.datamigrators.mettle.infoserver.asset.DatastageProject.readAssets(DatastageProject.java:264)
<snip>
Or
15-11-2023 08:48:38 Working Directory: /opt/dm/mci/working/thread-1/DatastageCommitWorker
15-11-2023 08:48:48 Cloning GIT repository...
15-11-2023 08:49:06 Connecting to dvadsthdn8265.hban.us/Info_11713_Test_Project
15-11-2023 08:50:00 An exception occurred during execution
com.datamigrators.mettle.exception.UnknownAssetTypeException: "java:1164|duplex close of SSLSocket" is an unknown asset suffix
at com.datamigrators.mettle.asset.AssetType.fromSuffix(AssetType.java:90)
at com.datamigrators.mettle.asset.Asset.<init>(Asset.java:35)
at com.datamigrators.mettle.infoserver.asset.DatastageProject.readAssets(DatastageProject.java:264)
<snip>
These examples are not exhaustive, but all linked errors will include the readAssets text in the Java stack dump.
Cause
MettleCI uses the capabilities of the IBM istool command to determine project state for many operations, including commit, import, export, running compliance, and others. These operations expect to receive data from istool in particular formats, and in this case, the istool is (for some reason) producing output in an unexpected format.
Solution
Review (and possibly revert) any recent changes to the istool script. The most common example of a change that causes this issue is enabling debugging. In this case, the debug logging from istool will need to be either redirected to a separate log, disabled during CI/CD, or the istool debugging needs to be isolated from MettleCI. One possible way to do this isolation is to create a temporary copy of the istool script with debugging enabled that is used only for command line testing, leaving the original untouched.