You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/12/22 04:59:52 UTC

[incubator-streampark] branch dev updated: [bug] Fixed the regular expression bug of flink on k8s cluster-id Validation (#2185)

This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new b0200ef16 [bug] Fixed the regular expression bug of flink on k8s cluster-id Validation (#2185)
b0200ef16 is described below

commit b0200ef16e31ab6ac72f0710986dccbdc7e3054e
Author: Gerry <33...@users.noreply.github.com>
AuthorDate: Thu Dec 22 12:59:46 2022 +0800

    [bug] Fixed the regular expression bug of flink on k8s cluster-id Validation (#2185)
    
    * [bug] Fixed the regular expression bug of flink on k8s cluster-id Validation
---
 .../streampark-console-webapp/src/locales/lang/en/flink/app.ts          | 2 +-
 .../streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts       | 2 +-
 .../src/views/flink/app/hooks/useCreateAndEditSchema.ts                 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
index 9bd8f1fa1..10340842d 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
@@ -217,7 +217,7 @@ export default {
     kubernetesNamespacePlaceholder: 'Please enter kubernetes Namespace, e.g: default',
     kubernetesClusterIdPlaceholder: 'Please enter Kubernetes clusterId',
     kubernetesClusterIdRequire:
-      "lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character",
+      "lower case alphanumeric characters, '-', and must start and end with an alphanumeric character,and no more than 45 characters",
     kubernetesClusterIdIsRequiredMessage: 'Kubernetes clusterId is required',
     flinkImagePlaceholder:
       'Please enter the tag of Flink base docker image, such as: flink:1.13.0-scala_2.11-java8',
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
index f4ee16e52..71ae22bed 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
@@ -211,7 +211,7 @@ export default {
     descriptionPlaceholder: '请输入此应用程序的描述',
     kubernetesNamespacePlaceholder: '请输入K8S命名空间, 如: default',
     kubernetesClusterIdPlaceholder: '请选择K8S ClusterId',
-    kubernetesClusterIdRequire: '小写字母、数字、“-”或“.”,并且必须以字母数字字符开头和结尾',
+    kubernetesClusterIdRequire: '小写字母、数字、“-”,并且必须以字母数字字符开头和结尾,并且不超过45个字符',
     kubernetesClusterIdIsRequiredMessage: 'K8S ClusterId必填',
     flinkImagePlaceholder: '请输入Flink基础docker镜像的标签,如:flink:1.13.0-scala_2.11-java8',
     flinkImageIsRequiredMessage: 'Flink基础docker镜像是必填的',
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
index 0aea86cf8..ab731b402 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
@@ -261,7 +261,7 @@ export const useCreateAndEditSchema = (
           {
             required: true,
             message: t('flink.app.addAppTips.kubernetesClusterIdRequire'),
-            pattern: /^[a-z0-9]([a-z0-9_\.]+)?[a-z0-9]$/,
+            pattern: /^(?=.{1,45}$)[a-z]([-a-z0-9]*[a-z0-9])$/,
           },
         ],
       },