-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KubernetesExecutor should default to template image if used #19484
Conversation
a123a9d
to
684a5a1
Compare
Currently, the user must specify image and tag in airflow.cfg, even when they are using a pod template file. If the pod template file specifies an image and tag, the user should not be forced to also specify this in airflow.cfg.
684a5a1
to
98e4a1a
Compare
class TestPodGenerator(unittest.TestCase): | ||
def setUp(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
converting to pytest is required when combining pytest params and unittest.mock
@@ -45,7 +45,10 @@ def __init__(self): | |||
|
|||
self.worker_container_repository = conf.get(self.kubernetes_section, 'worker_container_repository') | |||
self.worker_container_tag = conf.get(self.kubernetes_section, 'worker_container_tag') | |||
self.kube_image = f'{self.worker_container_repository}:{self.worker_container_tag}' | |||
if self.worker_container_repository and self.worker_container_tag: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could probably loosen this to allow user to specify image only (and not tag) but this is the current behavior. currently if either is not specified it won't work unless specified in executor_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You beat me to it, I found this on Friday :)
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
looks like the one failure is unrelated |
Currently, the user must specify image and tag in airflow.cfg, even when they are using a pod template file. If the pod template file specifies an image and tag, the user should not be forced to also specify this in airflow.cfg. (cherry picked from commit d18e2b0)
Currently, the user must specify image and tag in airflow.cfg, even when they are using a pod template file. If the pod template file specifies an image and tag, the user should not be forced to also specify this in airflow.cfg.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.