Skip to content

Commit

Permalink
generate a random jobName in case job.hash is null
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Aguilera <[email protected]>
  • Loading branch information
jagedn committed Aug 28, 2024
1 parent 885c620 commit 22b62e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ class NomadTaskHandler extends TaskHandler implements FusionAwareTask {
def builder = createBashWrapper(task)
builder.build()

this.jobName = NomadHelper.sanitizeName(task.hash?.toString() + "-" + task.name)
def hash = task.hash?.toString() ?: UUID.randomUUID().toString()
this.jobName = NomadHelper.sanitizeName(hash + "-" + task.name)

final taskLauncher = getSubmitCommand(task)
final taskEnv = getEnv(task)
Expand Down

0 comments on commit 22b62e5

Please sign in to comment.