Skip to content

Comments

Improve task_id to pod name conversion#27524

Merged
dstandish merged 1 commit intoapache:mainfrom
astronomer:improve-task-id-to-pod-name
Nov 7, 2022
Merged

Improve task_id to pod name conversion#27524
dstandish merged 1 commit intoapache:mainfrom
astronomer:improve-task-id-to-pod-name

Conversation

@dstandish
Copy link
Contributor

There are a few rules for pod names that we have to handle. See here: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.

One rule is must start and end with alphanumeric. Another is only alphanum, dot, -, and lowercase. Finally, no more than 253 chars.

I added tests for the new behavior but also some incidental (perhaps surprising) other behavior namely the way that adding random suffix actually truncates the given pod name substantially.

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes (k8s) provider related issues area:providers labels Nov 6, 2022
@eladkal
Copy link
Contributor

eladkal commented Nov 7, 2022

failures :(

@dstandish dstandish force-pushed the improve-task-id-to-pod-name branch from c77b558 to 4481c90 Compare November 7, 2022 21:01
There are a few rules for pod names that we have to handle.  See here: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.

One rule is must start and end with alphanumeric.  Another is only alphanum, dot, -, and lowercase.  Finally, no more than 253 chars.

I added tests for the new behavior but also some incidental (perhaps surprising) other behavior namely the way that adding random suffix actually truncates the given pod name substantially.
@dstandish dstandish force-pushed the improve-task-id-to-pod-name branch from 4481c90 to 3c9ede0 Compare November 7, 2022 21:27
@dstandish dstandish merged commit eee3df4 into apache:main Nov 7, 2022
@dstandish dstandish deleted the improve-task-id-to-pod-name branch November 7, 2022 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants