protected List<StageWrapper> afterBuild(UpgradeContext upgradeContext,
      List<StageWrapper> stageWrappers) {

    if (CollectionUtils.isEmpty(stageWrappers)) {
      return stageWrappers;
    }

    // we only want to insert the auto skip summary if the group is skippable
    // and the upgrade context says to auto skip failures
    final boolean autoSkipFailures;
    if (m_grouping instanceof ServiceCheckGrouping) {
      autoSkipFailures = upgradeContext.isServiceCheckFailureAutoSkipped();
    } else {
      autoSkipFailures = upgradeContext.isComponentFailureAutoSkipped();
    }

    if (m_grouping.supportsAutoSkipOnFailure && m_grouping.skippable && autoSkipFailures) {
      ServerActionTask skippedFailedCheck = new ServerActionTask();
      skippedFailedCheck.implClass = AutoSkipFailedSummaryAction.class.getName();
      skippedFailedCheck.summary = AUTO_SKIPPED_TASK_SUMMARY;
      skippedFailedCheck.messages.add(AUTO_SKIPPED_MESSAGE);

      TaskWrapper skippedFailedTaskWrapper = new TaskWrapper(null, null,
          Collections.emptySet(), skippedFailedCheck);

      StageWrapper skippedFailedStageWrapper = new StageWrapper(
          StageWrapper.Type.SERVER_SIDE_ACTION, "Verifying Skipped Failures",
          skippedFailedTaskWrapper);

      stageWrappers.add(skippedFailedStageWrapper);
    }

    return stageWrappers;
  }
Performs any post-processing that needs to be performed on the list of
stage wrappers.

@param upgradeContext
         the upgrade context (not {@code null}).
@param stageWrappers
         the list of stage wrappers created by
         {@link #build(UpgradeContext, List)}.
@return the post-processed list of stage wrappers (never {@code null})
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/orchestrate/StageWrapperBuilder.java