@Experimental(feature = ExperimentalFeature.PATCH_UPGRADES, comment="This is wrong")
  public StackId getStackIdFromVersions(Map<String, RepositoryVersionEntity> version) {
    return version.values().iterator().next().getStackId();
  }
Getting stackId from the set of versions. Is is possible until we upgrading components on the same stack.

Note: Function should be modified for cross-stack upgrade.

@param version {@link Set} of services repository versions
@return
{@link StackId} based on provided versions
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/orchestrate/UpgradeContext.java