def shouldStopWaiting()

in magenta-lib/src/main/scala/magenta/tasks/ChangeSetTasks.scala [334:357]


  def shouldStopWaiting(
      changeSetType: ChangeSetType,
      status: String,
      statusReason: String,
      changes: Iterable[Change],
      reporter: DeployReporter
  ): Boolean = {
    Try(valueOf(status)) match {
      case Success(CREATE_COMPLETE) => true
      // special case an empty change list when the status reason is no updates
      case Success(FAILED)
          if changes.isEmpty && isNoOpStatusReason(statusReason) =>
        reporter.info(
          s"Couldn't create change set as the stack is already up to date"
        )
        true
      case Success(FAILED) => reporter.fail(statusReason)
      case Success(CREATE_IN_PROGRESS | CREATE_PENDING) =>
        reporter.verbose(status)
        false
      case _ =>
        reporter.fail(s"Unexpected change set status $status")
    }
  }