mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Restrict k8s max job name length to 63 and shorten prefix
This commit is contained in:
@@ -211,7 +211,7 @@ class KubernetesJobRunner(AsynchronousJobRunner):
|
||||
def __produce_unique_k8s_job_name(self, galaxy_internal_job_id):
|
||||
# wrapper.get_id_tag() instead of job_id for compatibility with TaskWrappers.
|
||||
instance_id = self._galaxy_instance_id or ''
|
||||
return produce_unique_k8s_job_name(app_prefix='galaxy', instance_id=instance_id, job_id=galaxy_internal_job_id)
|
||||
return produce_unique_k8s_job_name(app_prefix='gxy', instance_id=instance_id, job_id=galaxy_internal_job_id)
|
||||
|
||||
def __get_k8s_job_spec(self, ajs):
|
||||
"""Creates the k8s Job spec. For a Job spec, the only requirement is to have a .spec.template.
|
||||
|
||||
@@ -57,7 +57,7 @@ def produce_unique_k8s_job_name(app_prefix=None, instance_id=None, job_id=None):
|
||||
if instance_id and len(instance_id) > 0:
|
||||
job_name += "%s-" % instance_id
|
||||
|
||||
return "{}{}-{}".format(job_name, job_id, uuid.uuid4())
|
||||
return "{}{}-{}".format(job_name, job_id, uuid.uuid4())[-63:]
|
||||
|
||||
|
||||
def pull_policy(params):
|
||||
|
||||
Reference in New Issue
Block a user