Jeffwan commented on a change in pull request #27347: [SPARK-30626][K8S] Add 
SPARK_APPLICATION_ID into driver pod env
URL: https://github.com/apache/spark/pull/27347#discussion_r370436375
 
 

 ##########
 File path: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ##########
 @@ -93,15 +93,16 @@ class BasicDriverFeatureStepSuite extends SparkFunSuite {
       assert(envs(v) === v)
     }
     assert(envs(ENV_SPARK_USER) === Utils.getCurrentUserName())
-
-    assert(configuredPod.pod.getSpec().getImagePullSecrets.asScala ===
-      TEST_IMAGE_PULL_SECRET_OBJECTS)
+    assert(envs(ENV_APPLICATION_ID) === kubernetesConf.appId)
 
     assert(configuredPod.container.getEnv.asScala.exists(envVar =>
       envVar.getName.equals(ENV_DRIVER_BIND_ADDRESS) &&
         envVar.getValueFrom.getFieldRef.getApiVersion.equals("v1") &&
         envVar.getValueFrom.getFieldRef.getFieldPath.equals("status.podIP")))
 
+    assert(configuredPod.pod.getSpec().getImagePullSecrets.asScala ===
+      TEST_IMAGE_PULL_SECRET_OBJECTS)
 
 Review comment:
   Oh. I can definitely do that. I notice this line was placed between 
container env setups. Move this line give all env setup code together. Does it 
make sense? Or you want to minimize code change? 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to