Skip to content

Commit

Permalink
refactor volumes mount to not add extra colon that was previously req…
Browse files Browse the repository at this point in the history
…uired.
  • Loading branch information
dspeck1 committed Oct 19, 2023
1 parent c9d4ce4 commit e02263f
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.google.cloud.batch.v1.Runnable.Container
import com.google.cloud.batch.v1.{Environment,Runnable, Volume}
import cromwell.backend.google.batch.models.GcpBatchConfigurationAttributes.GcsTransferConfiguration
import cromwell.backend.google.batch.models.{BatchParameter, GcpBatchInput, GcpBatchOutput}
//import cromwell.backend.google.batch.runnable.RunnableLabels._
import cromwell.core.path.Path
import mouse.all.anySyntaxMouse

Expand Down Expand Up @@ -60,8 +59,14 @@ object RunnableBuilder {
def withVolumes(volumes: List[Volume]): Runnable.Builder = {
val formattedVolumes = volumes.map { volume =>
val mountPath = volume.getMountPath
val mountOptions = Option(volume.getMountOptionsList).map(_.asScala.toList).getOrElse(List.empty)
s"$mountPath:$mountPath:${mountOptions.mkString(",")}"

val mountOptions = Option(volume.getMountOptionsList)
.map(_.asScala)
.filter(_.nonEmpty)
.map(_.mkString(":", ",", ""))
.getOrElse("")

s"$mountPath:$mountPath$mountOptions"
}

builder.setContainer(
Expand Down

0 comments on commit e02263f

Please sign in to comment.