Summary: this page describes how Console automatically detects missing packages in the new source code, when working in rescan mode (i.e. delivering a new Version - Vn+1).
The path matching feature has been removed in Console ≥ 2.10 and the popup will no longer be triggered. This change means that for each new scan a brand new "version" is now created, instead of a "clone version" action. In turn this means that any customization set at Analysis Unit level will be lost and will need to be re-configured.
Introduction
When delivering a new version of the source code for your Application (i.e. version Vn+1), the default "out of the box" behaviour within Console will be to warn you when a package that was present in the previous source code delivery can no longer be found in the new source code delivery:
The main aim of this feature is to prevent unwanted "noise" in the analysis results, for example, a large number of added/removed objects/violations due to the change in paths of identical source code packages. In the real world, between successive versions of an application, source code paths do change (items may be moved) and items maybe deleted. This feature offers the possibility to either:
- delete the missing "package", i.e. the path to the package really does not exist in the new source code delivery (marked as 1 in the image above). If you choose to delete the missing item, you should be aware that analysis results may be impacted - i.e. deleted objects/violations will be recorded
- or define the new location for the "package" if the related files have been moved to a new location, i.e. the path really has changed. In this case, added/removed violations/objects can be avoided (marked as 2 in the image above)
The end result is to ensure that the structure of the Deploy folder in the new version will match what was present in the previous version.
The feature will function when a new version is created and new source code is uploaded. Specifically for Console 1.x, the following also needs to be true:
- and the option Same configuration as previous version is enabled
- and the Finish button is clicked - if a change is detected, the popup will be displayed immediately on clicking Finish.
Click to enlarge
What triggers the popup?
The popup will be triggered essentially when Console:
- detects source code that is very similar between the two deliveries but is located under different paths
- detects that a source code package that was present in the previous delivery is no longer present in the new delivery
When new source code is delivered, this new delivery is checked against existing the source code delivered in the previous version, package by package. Take the following example:
V1 contains:
- One File System Package (e.g. Java source code)
- v1/java/sources/src/Foo.java
- v1/java/sources/src/Bar.java
- One Database Extraction Package (e.g. uaxdirectory/castextraction extractions)
- v1/db/extraction/db.uadirectory
V2 contains:
- One File System Package (e.g. Java source code)
- v2/java/src/Foo.java
- v2/java/src/Bar.java
- One Database Extraction Package (e.g. uaxdirectory/castextraction extractions)
- v2/db/extr/db.uaxextraction
When V2 is delivered, Console will try to find the path to both packages by going through all the files in the new delivery and attempting to find the same file structure:
- For the File System Package, if Console finds at least a 50% match of the files, then it will check the path to the package in the new delivery
- For the Database Extraction Package the same process is actioned, however Console will look for the parent folder of the extraction file and expects a 100% match of the files. The database schemas in the extraction are also checked.
In the above example the path matching popup will be triggered since the contents of the delivery match, but the structure is different.
- This feature does not detect differences in specific files - i.e. if a file is no longer present in the new source code, this will not trigger the warning.
- In ≥ 2.5 when using the Workflow - Application onboarding with Fast Scan, database packages and packages resulting from a CAST extractor are NOT checked even when the path matching option is enabled. You must therefore ensure that you define the structure of your source code to exactly match the previous version to avoid failure during the copy and attach package step.
Disabling the feature
If you need to disable the path matching feature, follow the instructions below.
If you disable the path matching option, you must ensure that you define the structure of your source code to exactly match the previous version to avoid failure during the copy and attach package step.
Edit the .properties file
Edit the following file with a text editor:
1.x %PROGRAMDATA%\CAST\AipConsole\AipConsole\aipConsole.properties ≥ 2.5 Enterprise mode: %PROGRAMDATA%\CAST\AIP-Node\application-default.yml Standalone mode: %PROGRAMDATA%\CAST\AIP-Console-Standalone\application-standalone.yml
≥ 2.5 Enterprise mode:
- This configuration is present by default in the
%PROGRAMDATA%\CAST\AIP-Node\application.yml
file, however, you should always edit theapplication-default.yml
for customization purposes since it overrides the content ofapplication.yml
and the file is never overwritten during an upgrade of the Node. - The configuration is managed on a "per-Node" basis, therefore if you want to disable the path matching option for all your Nodes, you must repeat the process described below on all Nodes.
Console ≥ 2.5 Enterprise mode
Copy the following into the file - the line enabled: false
disables the path matching option (repeat on all Nodes where you want to disable path matching):
# ================ # enable this option to have path check when cloning a version # ---------------- package: path: check: enabled: false
Restart the Node service to ensure the changes are taken into account.
Console ≥ 2.5 Standalone mode
Locate the following lines in the file:
# ================ # enable this option to have path check when cloning a version # ---------------- package: path: check: enabled: true
Change the line enabled: false
to enabled: false
:
# ================ # enable this option to have path check when cloning a version # ---------------- package: path: check: enabled: false
Restart the Console Standalone service to ensure the changes are taken into account.
Console 1.x
Locate the following lines in the file:
# ================ # enable this option to have path check from console when rescan(feature in beta) # ---------------- enable.package.path.check=true
Change the option to false:
# ================ # enable this option to have path check from console when rescan(feature in beta) # ---------------- enable.package.path.check=false
Restart Console to ensure the changes are taken into account.