Purpose (problem description)

This page explains the case when the violation status changed between snapshots while the source code is UNCHANGED.


Observed in CAST AIP

 

Release

Yes/No

8.3.x(tick)
Observed on RDBMS

RDBMS

Yes/No

CSS(tick)

Step by Step scenario

  1. Compute at least 2 snapshots
  2. Launch CED
  3. Read violation status
Action Plan
  1. Read the violation status, for more information about the violation status refer to Violation List

    1. If the violation status is Added
      1. Read the object status of the violated object (refer to the screenshot in the purpose) for more information about the object status refer to Violation List
      2. If the object status is Added, then CED indicates that the object is part of current snapshot but not the previous snapshot, lets check that at data level, for this run the following on the central schema:

        SELECT dss.object_id, 
               dss.object_full_name, 
               info.snapshot_id, 
               snap.snapshot_name 
        FROM   <central_schema_name>.dss_objects dss 
               JOIN <central_schema_name>.dss_object_info info 
                 ON dss.object_id = info.object_id 
               JOIN <central_schema_name>.dss_snapshots snap 
                 ON snap.snapshot_id = info.snapshot_id 
        WHERE  dss.object_full_name = <full name of the missing object> 
               AND snap.snapshot_name in (Snapshot list)

        Query result sample:

        408;"support.PARTICIPATING_JEE.BUSINESS_TYPE.DESCRIPTION";8; "Computed on 201709011538"

        Interpretation:

        The query returns the id of the object, the full name of the object, the snapshot from where the object is present 
        1. If the object is present in the 2 snapshots then CED should not show the status ad Added but as Unchanged, this can occur if the object is considered as an Added/Deleted object, in order to investigate this refer to CAST Engineering Dashboard - Object - Incorrect Object Status - Same object seen as added deleted

        2. Else if the object is present in the current snapshot and missing in the previous snapshot, then this explain why the violation is flagged as Added. If there was no object to violate then there was no violation. In order to investigate the root cause of the missing object refer to CAST Engineering Dashboard - Object - Missing objects

      3. If the object status is Unchanged, then the object exist in the current snapshot and previous snapshot and the source code of the object have not changed between the 2 runs. Though the object itself is unchanged, the reason could be :
        → some links (with other objects) added/removed in the current analysis to this object or some added/deleted objects due to which the object would violate the Quality Rule in the current analysis. This depends on the definition of the quality rule, which will usually contain keywords like ‘indirect’, ‘inheritance ’ or ‘depth level’.
        → a functional change in the QR, if you have used two different CAST Versions.

        In order to investigate this, you need to validate if the object should be violated for both the current and the previous snapshots. For this refer to the description of the quality rule that the object violates
        1. In case violation is correctly missing from previous snapshot and correctly added in current snapshot then this is the expected behavior

        2. In case violation was incorrectly missing from previous snapshot and correctly added in current snapshot then this is an issue of missing violation for the previous snapshot, so ‘For No violation’ in CAST Engineering Dashboard - Violations - False violation or no violation  for the previous snapshot
        3. In case violation was correctly missing from previous snapshot and incorrectly added in current snapshot then this is an issue of false violation for the current snapshot, so follow ‘For False violation’ in CAST Engineering Dashboard - Violations - False violation or no violation  for the current snapshot
        4. In case violation was incorrectly missing from previous snapshot and incorrectly added in current snapshot then this is an issue of missing violation for the previous snapshot AND a false violation in current snapshot. In this case you would have to follow ‘For No violation’ for previous snapshot and ‘For False violation’ for current snapshot in page CAST Engineering Dashboard - Violations - False violation or no violation
      4. If the object status is Updated, then the object exist in the current snapshot and previous snapshot but the source code of the object has changed between the 2 runs, in this case maybe the change made in the source code has led to the violation. You need to validate if the object should be violated in the current run but not in the previous run by referring to the description of the quality rule that the object violates
        1. In case violation is correctly missing from previous snapshot and correctly added in current snapshot then this is the expected behavior
        2. In case violation was incorrectly missing from previous snapshot and correctly added in current snapshot then this is an issue of missing violation for the previous snapshot, so ‘For No violation’ in  CAST Engineering Dashboard - Violations - False violation or no violation for the previous snapshot
        3. In case violation was correctly missing from previous snapshot and incorrectly added in current snapshot then this is an issue of false violation for the current snapshot, so follow ‘For False violation’ in  CAST Engineering Dashboard - Violations - False violation or no violation for the current snapshot
        4. In case violation was incorrectly missing from previous snapshot and incorrectly added in current snapshot then this is an issue of missing violation for the previous snapshot AND a false violation in current snapshot. In this case you would have to follow ‘For No violation’ for previous snapshot and ‘For False violation’ for current snapshot in page CAST Engineering Dashboard - Violations - False violation or no violation
      5. If the object status is Deleted, then certainly the issue occurred at computing the object Status, because a Deleted mean an in-existing object so it cannot be violated! this can occur if the object is considered as an Added/Deleted object, in order to investigate this refer to CAST Engineering Dashboard - Object - Incorrect Object Status - Same object seen as added deleted
    2. Else If the violation status is Updated
      1. Read the object status of the violated object
        1. If the object status is Unchanged, then read the status of the associated value under Violation detail:
          Figure 2
          1. If one or several of the associated values have the status new or deleted, then this explains the reason of this behavior. You now need to confirm whether it's normal that the status of the associated values is deleted new. Now we need to check the associated values status validity
            1. Check if the objects in the associated values list are External or generated, for that refer to SQL Queries - CAST Knowledge Base - Queries on objects - How to check if objects are internal or external or generated from the application.
              1. If the objects are external or generated then the status are nit valid, in fact the objects should not be part of the central schema in the first place, this is an issue that you can face if you are using an AIP version lower then 8.3.6 and you have deleted a snapshot. There is no workaround to avoid the behavior in the current snapshot, the only solution is to delete all snapshots and recompute theme, however if you want to remove a snapshot without getting this behavior in future snapshots you need to install the following on the central schema - dss_purge_snapshot.sql
              2. Else If the objects are not external or generated, we need to find out how the associated value is calculated and validate if it is calculated properly. There is no generic way to find out that, this depends to the Quality rule in question, for example, in the quality rule "Avoid cyclical calls and inheritances between packages", the associated values are the packages involved in the cyclical call, so if one package has the status Deleted it means that the package was part of the cyclical call in the previous run but not in the curent run, this can be a normal behavior if the package was deleted physically from the source code, but it can be an issue of missing link between the deleted package and the other packages, it can also be an issue of missing object if the package is not analyzed in the current run, in this case we need to investigate the issue by referring to CMS Snapshot Analysis - Run Analyzer
        2. If the object status is Added
          Since the violation is updated this means that the object was part of the analysis in the previous run, so it cannot be an added object, this can occur if the object is considered as an Added/Deleted object, in order to investigate this refer to CAST Engineering Dashboard - Object - Incorrect Object Status - Same object seen as added deleted
        3. If the object status is Updated
          Since the violation is updated this means that the object was part of the analysis in the previous run but there is an update made to the object due to which the violation status is Updated. Check if the violation is valid in both the runs. If the violation is valid then there is no bug.
    3. Else If the violation status is Unchanged
      1. Read the object status of the violated object
        1. If the object status is Unchanged then it explains why the violation status is Unchanged
        2. If the object status is Added or Updated then either the violation status is wrong or the object status is wrong. Check if the status of the object status is correct by executing the query - SQL Queries - CAST Central Base - Queries on Objects - How to get the object status .
          1. If the object status is not correct then follow the page - CAST Engineering Dashboard - Object - Incorrect Object Status 
          2. Else if the object status is correct then the violation status is wrong contact CAST Technical Support with the following Relevant input 
    4. If the above steps do not solve your issue contact CAST Technical Support. with the following Relevant input

 

Notes/comments


Related Pages