Summary: this section provides an explanation of the Versions section for a given Application.

Introduction

The Versions section provides a mechanism to manage successive Versions for the current Application. Among the options available are:

  • Edit
  • Mark as complete
  • Accept
  • Set as current version
  • Reject
  • Purge
  • Delete
  • A Version specifies the source code of an Application at a given moment in time. New Versions are created when the Application's source code changes and you want to measure these changes.
  • If you are using the rapid delivery mode without version history (see AIP Console - Delivery Modes) then only one single version will be listed in this screen. In this mode, versions are not retained. The Add Version button is therefore replaced with the Process button

Access the option

Move to the Console screen if you are not already there:

Locate the Application and click it to access the Application - Overview page:

Click the Versions icon in the left panel to access the Application - Versions page:

Version management screen

Depending on the delivery mode in use (see AIP Console - Delivery Modes), either the Add version or the Process button will be displayed:

  • Add version (standard delivery mode with version history) > Click to create a new version - i.e. if you have new source code to analyze.
  • Process (rapid delivery mode without version history) > Click to perform the next available action.
Name

Name of the version. The default name will be set to: Version-YYYY-MM-DDTHH-MM-SS unless changed manually when creating the version. The version that will be used for analysis and snapshot actions (i.e. the "current version") is also flagged with a green icon:

Clicking the version name will show the version details screen.

Status

Displays the current status of the Version:

DeliveringThe version has been created and Console is processing the uploaded source code ZIP file. When in this state, the version is "locked" and no other actions can be performed until the actions are complete.
Delivered

The source code ZIP file has been successfully uploaded and an initial scan has been performed to determine the content of the ZIP file. When a version is in this state the version needs to be validated (i.e. the source code in the ZIP file) and then either accepted or rejected it according to what has been delivered.

Not DeliveredThe version has been rejected (Reject action has been selected). When a Version has been rejected this means that the delivery contains issues and cannot be analyzed in its current form. The only course of action is to delete the version and create a new one that does not contain the same issues.
Accepted

The version has been accepted - this means that it is "ready for analysis" and one of the following actions has been run:

  • The Accept action has been run to accept the version - however the version will not be used for any analysis and snapshot actions until the Set as current version action is run.
  • The Set as current version action (which also includes the Accept action) has been run to set the version as the "current version" that will be used for analysis and snapshot actions - in technical terms delivered source code is copied into a special "deployment" folder from where it will be analyzed. The version will also be flagged with a green icon to indicate it is the "current version":


Analysis ongoingAn analysis or an analysis + snapshot are currently ongoing using this version. When in this state, the version is "locked" and no other actions can be performed until the actions are complete.
Analysis doneAn analysis has been successfully completed using this version.
Analysis failedAn analysis has been run using this version, but this ended in failure.
Snapshot doneA snapshot (which includes an analysis) has been generated using this version.
PurgedThe Purge action has been run on the version - see below.
ValidatedThe version has been marked as complete (i.e. all analyses/snapshots of this version are now done) and it is now in read-only mode.
DateDate the version was created.
Based On

Indicates whether the version is based on the previous version - i.e. whether the option Same configuration as previous version was ticked when creating the version meaning that identical settings (options, extensions, modules, etc) were used for the current and previous versions:

Click to enlarge

Enables you to edit the version. This will take you back to the Add version wizard, where you can run through all options and make any changes you require:

Click to enlarge

This option does NOT perform a source code rescan of either the uploaded ZIP or the source code stored in the source folder location (see Administration Center - Settings - Source Folder Location). Therefore changes to source code will not be detected. If you need to change the source code, you should consider performing a rescan, i.e. the following process:

  • adding a new version
  • choosing the Same configuration as previous version option
  • updating the ZIP file or the code in the source folder location

Enables you to mark the version as complete - in other words all analyses/snapshots using this version are now fully completed and a new version is being used for analyses/snapshots. This action is only available when at least one snapshot has been run for the version and will make the version read-only. The action cannot be reversed!

Provides various menu options:

Accept versionThis action is available when the version has a Delivered status. It will mark the version as Accepted - this means that it is "ready for analysis", however, this does not mark the version as the current version to be used in the next analysis/snapshot (the Set as current version version action does this).
Set as current version version

This action is available when the version has a Delivered or Accepted status. It performs the Accept and Set as current version actions in one go.

In addition to the Accept action, the Set as current version action will set the version as the version that will be used for analysis and snapshot actions (i.e. it is now the "current version") - in technical terms delivered source code is copied into a special "deployment" folder from where it will be analyzed. The version will also be flagged with a green icon to indicate it is the "current version":

The status of the version will be Accepted following the completion of this action - in other words, if the Accept action has already been run, then there is no change in the status.

Reject versionThis action is available when the version has any status. It will mark the version as Not Delivered. A version should be rejected when it contains errors, for example incomplete source code or erroneous exclusion settings that may cause incorrect analysis results. When rejected, the version can no longer be worked with (it will be in read-only mode) and the only other option available will be to delete it. The action cannot be reversed!
Purge version

This action is available when at least one snapshot has been run AND when the version is not the current version (i.e. the green icon is not visible). Purging a version will:

  • delete the delivered source code
  • delete the associated configuration files

The aim of this option is to free up disk space on the target Node. The version will be marked as Purged. When purged, the version can no longer be worked with (it will be in read-only mode) and the only other option available will be to delete it. The action cannot be reversed!

Delete version

This action will fully delete the version - all source code and configuration files will be removed and the version will no longer be visible in Console. The action cannot be reversed!

Note that from v .1.22, it is possible to delete all versions, even if a version has been used as the basis for a new version (the "Same configuration as previous version" option was ticked when delivering a new version). Previously versions that were a basis for a new version could not be deleted.

Version details screen

Clicking a version in the Version management screen, or clicking the  icon will display the Version details screen - this screen provides information about the version, primarily enabling the version to be validated and then "accepted" or "set as current version":

Version Report

Click to enlarge

The version report is generated when the source code ZIP file is uploaded during the creation of the version and its aim is to help you validate the version. You can download the results displayed in this section in XML format:

Full details of information provided in Version Report
  • folderPath: The path of the source folder
  • generationDate: The date the report was generated
  • totalDuration: Time taken to generate the package
  • releaseInfo: The version of Delivery Report
  • Application: details about the Application
    • applicationName: The name provided for the Application
    • applicationGuid: ID assigned to the Application
    • Version: details about the Version
      • versionName: The name of the Version
      • applicationGuid: ID assigned to the Version
      • FileLanguages: details about the files that will be considered
        • FileLanguage: The files in the selected source path are identified according to their language and represented in chronological order with respect to language Id
          • languageId: The ID used to identify the language
          • extensions: The file extensions considered
          • total: Total number of files for the language
          • added: No. of files added in the current version compared with previous
          • removed: No. of files removed in the current version compared with previous
          • modified: No. of files modified in the current version compared with previous
          • totalSize: Total size of the files
          • addedSize: Size of the added files compared with previous version
          • removedSize: Size of the removed files compared with previous version
          • modifiedSize: Size of the modified files compared with previous version
          • loc: Lines of count of the projects
          • notInProjects: The files not included in the project
          • Extension: Information about the file extensions discovered.

            • extensionId: The file extensions discovered
            • total: Total number of files of the particular extension that have been discovered

            • added: No. of files added in the current version compared with previous
            • removed: No. of files removed in the current version compared with previous
            • modified: No. of files modified in the current version compared with previous

            • totalSize: Total size of the discovered files

            • addedSize: Size of the added discovered files compared with previous version

            • removedSize: Size of the removed discovered files compared with previous version

            • modifiedSize: Size of the modified discovered files compared with previous version

            • loc: Lines of count of the discovered files
            • notInProjects: The files that are not included in the project

          • Framework: Information about the discovered frameworks

            • frameworkId: The frameworks used in the source code

            • version: Framework version.
          • Projects: The projects identified in the current version
            • Project: Information about the project
              • projectType: The type of project discovered
              • discovererName: The name of the discoverer that identified the project
              • total: Total number of projects that have been discovered

              • added: No. of projects added in the current version compared with previous
              • removed: No. of projects removed in the current version compared with previous
              • modified: No. of projects modified in the current version compared with previous

          • Alerts: Alerts generated in the current version
            • Alert: information about the alert
            • id: alert ID
            • total: total number of alerts of the particular ID
          • Log Messages: Log messages generated in the current version
            • id: log message ID
            • total: total number of log messages of the particular ID
              • parameter: the name of the parameter
                • id: parameter ID
                • value: value of the particular parameter

There are two distinct sections:

Alerts

The Alerts section lists any alerts that occurred during the creation of the version and the upload of the source code ZIP - i.e the contents of the ZIP file are scanned and any issues are reported:

Click the + icon to expand the alert message:

Alerts come in various different types (non-exhaustive list):

Undefined variableA variable has been discovered in the source code in the source package. Console cannot detect a value for this variable and therefore an alert has been created.
Missing projectA reference to a project, library file, folder or resource has been discovered in the source code package. Console cannot detect this specific item anywhere in the source code package and therefore an alert has been created.
Missing library file
Missing folder
Missing resource
Please note that if you exclude a folder and subsequently Console finds a reference to the excluded folder, then an Alert will be generated.  If you absolutely need to exclude the folder and want to avoid an alert, you can exclude the folder contents only using a specific Regular Expression:

For example, you have a subfolder entitled "unittests" that you must exclude, however, other code references this folder and as such an Alert will be generated during the source code scan when the version is created. Use forward slashes around the folder name in your Regular Expression to force Console to ignore the contents of the folder but keep the folder itself:

/unittests/

Handling alerts

Alerts generally indicate that the source code is incomplete, that there is a configuration issue or simply that there is something wrong in the source code. If these alerts are not dealt with and the Version is accepted, then there is a risk that the source code analysis will be erroneous or may not even complete. It is up to you to manage these alerts:

  • some can be easily fixed by:
    • altering the source code package configuration (for example the root folder may be incorrect)
    • by including the missing items in the source code ZIP file
  • some may be more difficult to fix and you may need to alter your original source code

File Extensions

This section displays a list of files that have been discovered during the creation of the version when the source code ZIP file is scanned. These are the files that will included for analysis:

File extensionDisplays the file extensions discovered by Console.
Added filesThe number of files with the specific extension that are "new" in the current version in comparison to a previous version (this will always be 0 for new versions).

Unchanged files

These columns display the number of files with the specific extension that have either been modified or are unchanged in the current version in comparison to a previous version (this will always be 0 for new versions).

Console compares the sizes (not the checksum) of files in the current version with those in the previous version - a file is therefore only marked as Modified when its size has changed between the two versions. In some rare cases when a file has actually changed in the current version, but its size is identical to the size in the previous version, it will be marked as Unchanged.

Modified files
Removed filesThe number of files with the specific extension that are no longer present in the current version in comparison to a previous version.
Total filesDisplays the total number of files with the specific extension that have been discovered in the current version.
Total size(bytes)The total size (in bytes) of all the files with the specific extension that have been discovered, in the current version.

Technical information about version delivery failures

Sometimes a source code delivery fails (or is cancelled manually). When this occurs, and depending on the reason for the failure, the version itself may be deleted. Below is a list of events that may cause a version delivery and information explaining whether the version is deleted or not:

EventVersion deletedVersion retained

If anything fails in the "Prepare new version" step or the delivery is stopped manually

(tick)(error)
If anything fails in the "Create/attach package" steps or the delivery is stopped manually(error)(tick)
If anything fails in the "Delivering version" step or the delivery is stopped manually(error)(tick)
Delivery strategy configuration(tick) (if the condition is satisfied)(error)
When a version is deleted, logs are also deleted.