You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/17 09:34:00 UTC

[GitHub] [airflow] dstandish opened a new pull request, #27737: Allow hyphens in pod id used by k8s executor

dstandish opened a new pull request, #27737:
URL: https://github.com/apache/airflow/pull/27737

   Makes things more readable.  E.g. my-dag-my-task instead of mydagmytask.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #27737: Allow hyphens in pod id used by k8s executor

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #27737:
URL: https://github.com/apache/airflow/pull/27737#issuecomment-1319398342

   Test failing


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] o-nikolas commented on a diff in pull request #27737: Allow hyphens in pod id used by k8s executor

Posted by GitBox <gi...@apache.org>.
o-nikolas commented on code in PR #27737:
URL: https://github.com/apache/airflow/pull/27737#discussion_r1026994356


##########
airflow/kubernetes/kubernetes_helper_functions.py:
##########
@@ -26,22 +26,7 @@
 log = logging.getLogger(__name__)
 
 
-def _strip_unsafe_kubernetes_special_chars(string: str) -> str:
-    """
-    Kubernetes only supports lowercase alphanumeric characters, "-" and "." in
-    the pod name.
-    However, there are special rules about how "-" and "." can be used so let's

Review Comment:
   Mostly for my own curiosity/learning: What are the special rules? Do they no longer cause us issues? Did they ever cause us issues?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish merged pull request #27737: Allow hyphens in pod id used by k8s executor

Posted by GitBox <gi...@apache.org>.
dstandish merged PR #27737:
URL: https://github.com/apache/airflow/pull/27737


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #27737: Allow hyphens in pod id used by k8s executor

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27737:
URL: https://github.com/apache/airflow/pull/27737#discussion_r1027031707


##########
airflow/kubernetes/kubernetes_helper_functions.py:
##########
@@ -26,22 +26,7 @@
 log = logging.getLogger(__name__)
 
 
-def _strip_unsafe_kubernetes_special_chars(string: str) -> str:
-    """
-    Kubernetes only supports lowercase alphanumeric characters, "-" and "." in
-    the pod name.
-    However, there are special rules about how "-" and "." can be used so let's

Review Comment:
   A pod name must start and end with an alphanumeric character, i.e. `[a-z0-9]`.   So you can't have a leading or trailing `-` or `.`.
   
   If you try to create a pod that violates this, you'll get this error:
   ```
   a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #27737: Allow hyphens in pod id used by k8s executor

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27737:
URL: https://github.com/apache/airflow/pull/27737#discussion_r1027031707


##########
airflow/kubernetes/kubernetes_helper_functions.py:
##########
@@ -26,22 +26,7 @@
 log = logging.getLogger(__name__)
 
 
-def _strip_unsafe_kubernetes_special_chars(string: str) -> str:
-    """
-    Kubernetes only supports lowercase alphanumeric characters, "-" and "." in
-    the pod name.
-    However, there are special rules about how "-" and "." can be used so let's

Review Comment:
   A pod name must start and end with an alphanumeric character, i.e. `[a-z0-9]`.   So you can't have a leading or trailing `-` or `.`.
   
   If you try to create a pod that violates this, you'll get this error:
   ```
   a lowercase RFC 1123 subdomain must consist of lower case
   alphanumeric characters, '-' or '.', and must start and end with
   an alphanumeric character (e.g. 'example.com', regex used for
   validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org