potiuk commented on a change in pull request #17057:
URL: https://github.com/apache/airflow/pull/17057#discussion_r671871903
##########
File path: airflow/kubernetes/kubernetes_helper_functions.py
##########
@@ -37,7 +37,7 @@ def _strip_unsafe_kubernetes_special_chars(string: str) ->
str:
:param string: The requested Pod name
:return: Pod name stripped of any unsafe characters
"""
- return ''.join(ch.lower() for ch in list(string) if ch.isalnum())
+ return ''.join(ch.lower() for ch in list(string) if
ch.isalnum()).encode('ascii', 'ignore').decode()
Review comment:
I see no problem whatsoever with adding a proven dependency that does a
good job and has rather straightforward and expected dependencies - especially
if it can save not only us but also our current and future users from even
seeing similar errors.
From the `product` point of view, if we can get such proven solution that
saves us headeaches in the future is the right way. The case where POD has
Chinese-only characters mentioned by @uranusjr WILL eventually happen, and when
it will, we will have to do it anyway, so why not doing it now :).
```
unicode-slugify==0.1.3
- six [required: Any, installed: 1.16.0]
- unidecode [required: Any, installed: 1.2.0]
```
--
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]