You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "georgew5656 (via GitHub)" <gi...@apache.org> on 2023/05/17 14:45:33 UTC

[GitHub] [druid] georgew5656 commented on a diff in pull request #14282: Fix labels

georgew5656 commented on code in PR #14282:
URL: https://github.com/apache/druid/pull/14282#discussion_r1196636898


##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/common/K8sTaskId.java:
##########
@@ -41,8 +38,7 @@ public K8sTaskId(String taskId)
   {
     this.originalTaskId = taskId;
     // replace all the ": - . _" to "", try to reduce the length of pod name and meet pod naming specifications 64 characters.
-    this.k8sTaskId = StringUtils.left(RegExUtils.replaceAll(taskId, "[^a-zA-Z0-9\\\\s]", "")
-                                                .toLowerCase(Locale.ENGLISH), 63);
+    this.k8sTaskId = KubernetesStringUtils.parseStringToK8sLabel(taskId);

Review Comment:
   it wouldn't be a concern with labels, but this is also what we name the job so there may be some concern there



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org