prefer brackets for stateful if expressions. Can either do

    if (failed.size > 0) { resubmitFailedStages() }

or

    if (failed.size > 0) {
      resubmitFailedStages()
    }