hehuiyuan edited a comment on issue #24188: [SPARK-27258][K8S]Add the prefix 'spark-' for resourceNamePrefix that starts with number URL: https://github.com/apache/spark/pull/24188#issuecomment-476452548 > I'm not sure what your last comment means. This looks even more complex and the code is still incorrect. Example: what about an ID that starts with "Foo"? it isn't allowed by that regex but isn't detected by this code. This should be a 2 line change. --------------------------------------------------------------------- The last comment means that is the another way used to resolve the PR . In this PR, if the first character of resourceNamePrefix is digit, it will change the value of resourceNamePrefix to add a extra prefix "spark-" for Driver Pod and Service. However, the last comment means : if the first character of resourceNamePrefix is digit, we do not change the value of resourceNamePrefix. We can use the variable of shorterServiceName provided by the source code. If resourceNamePrefix satisfies `preferredServiceName.length <= MAX_SERVICE_NAME_LENGTH && !isNumber(preferredServiceName.charAt(0)`,we use resourceNamePrefix. If these two conditions are not met,we use shorterServiceName. The code in the last comment hasn't been submitted yet. I would like to ask you some advice.Is this better than the way in the PR?
---------------------------------------------------------------- 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]
