HwangDongJun commented on code in PR #58187:
URL: https://github.com/apache/spark/pull/58187#discussion_r4310460466
##########
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/submit/ClientSuite.scala:
##########
@@ -221,14 +306,216 @@ class ClientSuite extends SparkFunSuite with
BeforeAndAfter {
assert(secrets.nonEmpty)
assert(configMaps.nonEmpty)
val configMap = configMaps.head
- assert(configMap.getMetadata.getName ===
- KubernetesClientUtils.configMapNameDriver)
+ // SPARK-38079: configMapNameDriver is a `def` -- see its own comment --
so this cannot
+ // compare against a freshly-generated name (that call would return a
different one); it
+ // can only check the name has the shape configMapNameDriver is documented
to produce.
+ assert(configMap.getMetadata.getName.matches("spark-drv-\\S+-conf-map"))
Review Comment:
`configMapNameDriver` is a `val` again, so the tests assert exact equality:
the created config map's name equals the name of the volume the pod mounts
(`mountedConfigMapName`), in the three places you listed. The `SPARK_CONF_DIR`
test compares the whole pod against `fullExpectedPod(expectedKeyToPaths)`, so
the `items` are checked. Dropping the last entry in `buildKeyToPathObjects`
fails two tests.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]