forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Invalid name when trimmed
pod_id
ends with hyphen in ``Kube…
…rnetesPodOperator`` (apache#15443) When a pod name is more than `MAX_LABEL_LEN` (63 characters), it is trimmed to 63 chars https://github.com/apache/airflow/blob/8711f90ab820ed420ef317b931e933a2062c891f/airflow/kubernetes/pod_generator.py#L470-L472 and we add a safe UUID to the `pod_id` joined by a dot `.`. However the regex for Kubernetes name does not allow `-` followed by a `.`. Valid Regex: ``` ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ ``` This commit strips any hypens at the end of the trimmed `pod_id`. (cherry picked from commit 130f9e3)
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters