This issue was resolved before the actual release of Code Insight 2023 R4. However, the issue's solution requires that customers migrating from a pre-2023 R4 release of Code Insight to 2023 R4 or later perform an extra procedure to ensure that their custom reports successfully generate.
The following sections provide more information about the issue, its solution, and the additional procedure needed to migrate custom reports.
Issue with Custom Reports After the Tomcat Upgrade
Custom reports are scripted in the Python language. After the Tomcat upgrade, the generation of custom reports was failing because the Content-Type normally passed to the uploadReports API (called in the custom report scripts) was no longer compatible with the upgrade.
Furthermore, research indicated that the Content-Type should not be passed explicitly in the header for a multi-part form, as stated in the following quote from the maintainer of the Requests Library in Python: “You should NEVER set that header yourself. We set the header properly with the boundary. If you set that header, we won't and your server won't know what boundary to expect (since it is added to the header).” (Refer to multipart data POST using python requests: no multipart boundary was found - Stack Overflow.)
Based on this information, the solution for this issue was simply to remove the Content-Type from the header in each custom-report script so that its value was no longer passed to the uploadReports API in the script.
Impact of the Solution on Code Insight Versions
As a result of the solution, users who have migrated from a pre-2023 R4 version of Code Insight to 2023 R4 or later must perform an additional procedure to update their previously downloaded custom-report scripts to the latest version. (See the next section, Required Procedure for Updating Custom Report Scripts, for details.) If this procedure is not performed, attempts to generate custom reports will fail.
You do not have to perform this additional procedure under these circumstances:
If you are using Code Insight 2023 R3 or earlier. (Even if you perform the additional procedure, the custom reports will still generate successfully.)
If you are using Code Insight 2023 R4 or later and are installing the custom-report scripts for the first time
If you are migrating from a pre-2023 R4 version of Code Insight to 2023 R4 but did not copy the custom-report scripts from the previous release.
Procedure to Update Custom-Report Scripts Based on the Solution
Perform the following procedure to update your existing custom-report scripts after you have migrated from a pre-2023 R4 version of Code Insight to version 2023 R4 or later. If you do not perform this procedure, attempts to generate custom reports will fail.
Purpose of the Procedure
The procedure, which is performed from the Linux or Windows instance in which Code Insight is installed, pulls the latest code from Git that incorporates the solution described above.
Updating the Custom-Report Scripts
Use the following procedure to update the custom-report scripts migrated from a pre-2023 R4 version.
To update custom-report scripts:
In a command-line window, navigate to the following location where your custom-report scripts are installed in Code Insight: <codeInsight_installation_folder>/custom_report_scripts
Within a report folder, run the following command to pull the latest code from Git: git pull --recurse-submodules
Alternatively, run these two commands: git pull git submodule update --recursive
Repeat the previous step for each report folder.
After you perform this procedure, custom reports will generate successfully.
NOTE: You do not need to restart Tomcat to enable the updated scripts.