Skip to content
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

Move pod_mutation_hook call from PodManager to KubernetesPodOperator #20596

Merged
merged 2 commits into from
Dec 30, 2021

Conversation

dstandish
Copy link
Contributor

Previously, in KubernetesPodOperator, the invocation of the pod mutation hook occurred
within the call to PodManager.run_pod_async. So, run_pod_async would not quite run
the pod you asked it to run, but would mutate it first.

With this change, run_pod_async runs exactly the pod you request, and the pod returned
by build_pod_request_obj is actually the pod you request.

Previously, in KubernetesPodOperator, the invocation of the pod mutation hook occurred
within the call to PodManager.run_pod_async.  So, `run_pod_async` would not quite run
the pod you asked it to run, but would mutate it first.

With this change, `run_pod_async` runs exactly the pod you request, and the pod returned
by `build_pod_request_obj` is actually the pod you request.
@dstandish dstandish force-pushed the build-pod-obj-call-mutation-hook branch from dc59857 to eea190c Compare December 30, 2021 21:26
@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Dec 30, 2021
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@dstandish dstandish merged commit e634175 into apache:main Dec 30, 2021
@dstandish dstandish deleted the build-pod-obj-call-mutation-hook branch December 30, 2021 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants