1u0 commented on a change in pull request #8741: [FLINK-12752] Add Option to 
Pass Seed for JobID Hash for StandaloneJobClusterEntrypoint
URL: https://github.com/apache/flink/pull/8741#discussion_r297691058
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_kubernetes_embedded_job.sh
 ##########
 @@ -64,14 +64,14 @@ fi
 
 eval $(minikube docker-env)
 cd "$DOCKER_MODULE_DIR"
-./build.sh --from-local-dist --job-jar 
${FLINK_DIR}/examples/batch/WordCount.jar --image-name ${FLINK_IMAGE_NAME}
+./build.sh --from-local-dist --job-artifacts 
${FLINK_DIR}/examples/batch/WordCount.jar --image-name ${FLINK_IMAGE_NAME}
 cd "$END_TO_END_DIR"
 
 
-kubectl create -f ${KUBERNETES_MODULE_DIR}/job-cluster-service.yaml
-envsubst '${FLINK_IMAGE_NAME} ${FLINK_JOB} ${FLINK_JOB_PARALLELISM} 
${FLINK_JOB_ARGUMENTS}' < ${CONTAINER_SCRIPTS}/job-cluster-job.yaml.template | 
kubectl create -f -
-envsubst '${FLINK_IMAGE_NAME} ${FLINK_JOB_PARALLELISM}' < 
${CONTAINER_SCRIPTS}/task-manager-deployment.yaml.template | kubectl create -f -
-kubectl wait --for=condition=complete job/flink-job-cluster --timeout=1h
-kubectl cp `kubectl get pods | awk '/task-manager/ {print 
$1}'`:/cache/${OUTPUT_FILE} ${OUTPUT_VOLUME}/${OUTPUT_FILE}
+envsubst '${FLINK_APPLICATION_NAME}' < 
${KUBERNETES_MODULE_DIR}/job-cluster-service.yaml.template | kubectl apply -f -
+envsubst '${FLINK_APPLICATION_NAME} ${FLINK_IMAGE_NAME} ${FLINK_JOB} 
${FLINK_JOB_PARALLELISM} ${FLINK_JOB_ARGUMENTS}' < 
${KUBERNETES_MODULE_DIR}/job-cluster-job.yaml.template | kubectl apply -f -
+envsubst '${FLINK_APPLICATION_NAME} ${FLINK_IMAGE_NAME} 
${FLINK_JOB_PARALLELISM}' < 
${KUBERNETES_MODULE_DIR}/task-manager-deployment.yaml.template | kubectl apply 
-f -
 
 Review comment:
   `kubectl apply` may create or **update existing** resources.
   
   This test assumes that it creates resources anew. I find the version with 
`kubectl create` more stricter - it should be more error-proof if you are 
running the same tests in parallel (for example on dev machine) or if there is 
left-over or conflict with other runs.
   
   Also, the old template had image pull policy `Never`, but here I'm +1 to 
have one template source and 🤞 that the test uses correct docker image.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to