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

Implement dry_run for KubernetesPodOperator #20573

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

dstandish
Copy link
Contributor

Calling task.dry_run() will print out the kubectl manifest for the pod that would be created (excluding labels that are derived from the task instance context).

tests/utils/test_helpers.py Outdated Show resolved Hide resolved
tests/utils/test_helpers.py Outdated Show resolved Hide resolved
airflow/utils/helpers.py Outdated Show resolved Hide resolved
@dstandish
Copy link
Contributor Author

updated

@dstandish
Copy link
Contributor Author

pod mutation hook call moved in #20596

@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.

@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
@potiuk
Copy link
Member

potiuk commented Dec 30, 2021

As discussed - adding a small howto in https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/operators.html would be great.

Calling task.dry_run() will print out the kubectl manifest for the pod that would be created (excluding labels that are derived from the task instance context).
@dstandish
Copy link
Contributor Author

As discussed - adding a small howto in https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/operators.html would be great.

done

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT!

@dstandish dstandish merged commit d56ff76 into apache:main Dec 30, 2021
@dstandish dstandish deleted the kpo-dry-run branch December 30, 2021 22:21
@jedcunningham jedcunningham added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) 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.

None yet

5 participants