@Override
  public UpgradeCheckResult perform(UpgradeCheckRequest request)
      throws AmbariException {
    UpgradeCheckResult result = new UpgradeCheckResult(this);

    Cluster cluster = clustersProvider.get().getCluster(request.getClusterName());

    Set<String> versions = new HashSet<>();
    Set<String> failures = new HashSet<>();
    Set<String> failedVersions = new HashSet<>();

    Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
    for (Entry<String, DesiredConfig> configEntry : desiredConfigs.entrySet()) {
      String configType = configEntry.getKey();
      DesiredConfig desiredConfig = configEntry.getValue();
      final Config config = cluster.getConfig(configType, desiredConfig.getTag());

      Map<String, String> properties = config.getProperties();
      for (Entry<String, String> property : properties.entrySet()) {

        // !!! this code is already iterating every config property, so an extra loop for the small-ish
        // numbers of repository versions won't add that much more overhead
        for (String version : versions) {
          Pattern searchPattern = getHardcodeSearchPattern(version);
          if (stringContainsVersionHardcode(property.getValue(), searchPattern)) {
            failedVersions.add(version);
            failures.add(String.format("%s/%s found a hardcoded value %s",
              configType, property.getKey(), version));
          }
        }
      }
    }

    if (failures.size() > 0) {
      result.setStatus(UpgradeCheckStatus.WARNING);
      String failReason = getFailReason(result, request);

      result.setFailReason(String.format(failReason, StringUtils.join(failedVersions, ',')));
      result.setFailedOn(new LinkedHashSet<>(failures));

    } else {
      result.setStatus(UpgradeCheckStatus.PASS);
    }

    return result;
  }
Checks for properties that contain hardcoded CURRENT hdp version string.
Presence of such properties usually means that some paths are hardcoded to
point to concrete version of HDP, instead of pointing to current symlink.
That is a potential problem when doing stack update.
ambari-server/src/main/java/org/apache/ambari/server/checks/HardcodedStackVersionPropertiesCheck.java