beacon-biosignals / julia_pod

k8s native julia development
MIT License
10 stars 3 forks source link

long branch names can cause pod creation failure because names must be #50

Closed kleinschmidt closed 2 years ago

kleinschmidt commented 2 years ago

When launching julia_pod from a branch whose name is rather long (e.g., my-very-long-branch-name-which-is-far-too-long), job creation fails with the following error message:

my-very-long-branch-name-which-is-far-too-longGenerating julia_pod/driver-my-very-long-branch-name-which-is-far-too-long-mon22h37m10-67af0e.yaml
The Job "my-very-long-branch-name-which-is-far-too-long-mon22h37m10-67af0e" is invalid: spec.template.labels: Invalid value: "my-very-long-branch-name-which-is-far-too-long-mon22h37m10-67af0e": must be no more than 63 characters
ERROR: LoadError: failed process: Process(`julia_pod --driver-yaml-template=julia_pod/driver.yaml.template`, ProcessExited(1)) [1]

we should truncate long branch names to ensure that the generated RUNID variable is a valid job/pod name.

kleinschmidt commented 2 years ago

It looks liek teh timestamp + random ID takes up 19 characters, so we should truncate teh branch name to something like 40 to be safe

kleinschmidt commented 2 years ago

Fixed by #51