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

cancai 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 d60734fbe [Imporve] Request.namesapce and request.clusterId dont't 
allow to be empty (#3782)
d60734fbe is described below

commit d60734fbee78173fe0d831a7f7830b5633f2b0a8
Author: Cancai Cai <[email protected]>
AuthorDate: Wed Jun 19 22:58:11 2024 +0800

    [Imporve] Request.namesapce and request.clusterId dont't allow to be empty 
(#3782)
    
    * [Imporve] Request.namesapce and request.clusterId dont't allow to be empty
    
    ---------
    
    Co-authored-by: VampireAchao <[email protected]>
---
 .../flink/packer/pipeline/impl/FlinkK8sApplicationBuildPipeline.scala  | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/streampark-flink/streampark-flink-packer/src/main/scala/org/apache/streampark/flink/packer/pipeline/impl/FlinkK8sApplicationBuildPipeline.scala
 
b/streampark-flink/streampark-flink-packer/src/main/scala/org/apache/streampark/flink/packer/pipeline/impl/FlinkK8sApplicationBuildPipeline.scala
index 8117b94a6..340ce8893 100644
--- 
a/streampark-flink/streampark-flink-packer/src/main/scala/org/apache/streampark/flink/packer/pipeline/impl/FlinkK8sApplicationBuildPipeline.scala
+++ 
b/streampark-flink/streampark-flink-packer/src/main/scala/org/apache/streampark/flink/packer/pipeline/impl/FlinkK8sApplicationBuildPipeline.scala
@@ -127,6 +127,9 @@ class FlinkK8sApplicationBuildPipeline(request: 
FlinkK8sApplicationBuildRequest)
     val dockerConf = request.dockerConfig
     val baseImageTag = request.flinkBaseImage.trim
     val pushImageTag = {
+      if (request.k8sNamespace.isEmpty || request.clusterId.isEmpty) {
+        throw new IllegalArgumentException("k8sNamespace or clusterId cannot 
be empty")
+      }
       val expectedImageTag = 
s"streampark-flinkjob-${request.k8sNamespace}-${request.clusterId}"
       compileTag(expectedImageTag, dockerConf.registerAddress, 
dockerConf.imageNamespace)
     }

Reply via email to