public StackId getSourceStack() {
    RepositoryVersionEntity repo = m_sourceRepositoryMap.values().iterator().next();
    return repo.getStackId();
  }
Gets the single source stack for the upgrade depending on the
direction.  By definition, ALL the source stacks, despite the versions, should have
the same stack.  The target stacks may be different from the source, but all the target
stacks must also be the same.
<p/>

@return the source stack for this upgrade (never {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/orchestrate/UpgradeContext.java