You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "insomnes (via GitHub)" <gi...@apache.org> on 2025/02/05 12:11:27 UTC
[PR] More meaningful name for `@task.kubernetes` pods [airflow]
insomnes opened a new pull request, #46462:
URL: https://github.com/apache/airflow/pull/46462
…ration
- generate specific pod name base by provided python callable
- drop uuid usage by default (random is controlled by `random_name_suffix` arg)
- add specific pod naming tests for decorator flow
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
Use name based on python callable in `@task.kubernetes` pod name generation
- generate specific pod name base by provided python callable
- drop uuid usage with no name (random is controlled by `random_name_suffix` arg, there is no need for extra UUID usage)
- add specific pod naming tests for decorator flow because decorator distinguishes between `name=None` and no `name` argument provided
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "insomnes (via GitHub)" <gi...@apache.org>.
insomnes commented on code in PR #46462:
URL: https://github.com/apache/airflow/pull/46462#discussion_r1943372773
##########
airflow/decorators/__init__.pyi:
##########
@@ -588,7 +588,7 @@ class TaskDecoratorCollection:
:param name: Name of the pod to run. This will be used (plus a random
suffix if *random_name_suffix* is *True*) to generate a pod ID
(DNS-1123 subdomain, containing only ``[a-z0-9.-]``). Defaults to
Review Comment:
I am sorry, but I don't get it.
What part of doc string should be updated or what should I add here? I believe current change is covered, what am I missing?
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2638308394
Looks good imo, but tests are failing now
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "insomnes (via GitHub)" <gi...@apache.org>.
insomnes commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2640915009
Holy moly I am so sorry for this mess, and I am really sorry for the ping for the whole repo I will close this one and apply my changes to the new structure, that would be easier. I am sorry for bothering you all
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2640902777
still conflicts to solve :(
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2640940351
No worries :)
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on code in PR #46462:
URL: https://github.com/apache/airflow/pull/46462#discussion_r1943338315
##########
airflow/decorators/__init__.pyi:
##########
@@ -588,7 +588,7 @@ class TaskDecoratorCollection:
:param name: Name of the pod to run. This will be used (plus a random
suffix if *random_name_suffix* is *True*) to generate a pod ID
(DNS-1123 subdomain, containing only ``[a-z0-9.-]``). Defaults to
Review Comment:
This docstring will need to be further updated, right?
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "insomnes (via GitHub)" <gi...@apache.org>.
insomnes commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2637551641
> What will happen if two Dag runs are triggered at the same time, and two `TaskInstance`s are created from the same task simultaneously?
If `random_name_suffix` arg is set (as default) they would have two different names by separate random suffixes the suffixes generated during `execute` calls in KPO by `build_pod_request_obj` method.
If user has disabled name randomization by `random_name_suffix=False` -- that's more on user side to ensure name uniqueness.
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on code in PR #46462:
URL: https://github.com/apache/airflow/pull/46462#discussion_r1943338315
##########
airflow/decorators/__init__.pyi:
##########
@@ -588,7 +588,7 @@ class TaskDecoratorCollection:
:param name: Name of the pod to run. This will be used (plus a random
suffix if *random_name_suffix* is *True*) to generate a pod ID
(DNS-1123 subdomain, containing only ``[a-z0-9.-]``). Defaults to
Review Comment:
This docstring will need to be further updated, right?
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "insomnes (via GitHub)" <gi...@apache.org>.
insomnes commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2639428307
The problem is on the CI side with k8s cluster tests and not in the code, will wait a bit and retry by rebasing the branch. My last attempt failed to set the environment, and previous failures were about failing jobs.
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2640804876
Yeah... Sorry :) . It was finaly green, so I merged it. But I think in this case git will properly fix stuff when you rebase - automatically
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "insomnes (via GitHub)" <gi...@apache.org>.
insomnes closed pull request #46462: More meaningful name for `@task.kubernetes` pods
URL: https://github.com/apache/airflow/pull/46462
--
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
Re: [PR] More meaningful name for `@task.kubernetes` pods [airflow]
Posted by "insomnes (via GitHub)" <gi...@apache.org>.
insomnes commented on PR #46462:
URL: https://github.com/apache/airflow/pull/46462#issuecomment-2640589866
Oh, now there is conflict after the provider move to a new structure. Will check it a bit later today
--
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