Page tree
Skip to end of metadata
Go to start of metadata

Summary: this page describes how AIP Console automatically detects missing packages in the source code ZIP file, when working in rescan mode (i.e. delivering a new Version - Vn+1).

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 AIP 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:

  • 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 AIP 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, AIP 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 AIP 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 AIP 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.

Disabling the feature

If you need to disable the path matching feature, follow the instructions below:

Edit the .properties file

Edit the following file located on the AIP Console server with a text editor:

%PROGRAMDATA%\CAST\AipConsole\AipConsole\aipConsole.properties

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 AIP Console

Restart AIP Console to ensure the changes are taken into account:

  • If the AIP Console is installed as a Windows Service, restart the service
  • If the AIP Console is running only using the batch files, close the CMD window to stop the AIP Console, then restart it using the following file:
%PROGRAMFILES%\CAST\AipConsole\AipConsole\tools\runAIPConsole.bat
  • No labels