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

18400 chart custom pod annotations #18481

Merged
merged 3 commits into from
Sep 25, 2021

Conversation

wc-s
Copy link
Contributor

@wc-s wc-s commented Sep 23, 2021

closes: #18400

The change allows adding different custom pod annotations to the different airflow components (whereas the current chart can only add the same set of custom pod annotations to all airflow components).

Some notes:

  • The per-component pod annotations take precedence over the global pod annotations injected via .Values.airflowPodAnnotations
  • I've only added it to components that already currently support airflowPodAnnotations, which excludes redis etc. I don't know why we have airflowPodAnnotations in some components but not in others, but I want to just continue to convention to keep things clean.
  • Added annotations test for triggerer as well.
  • Added 2 new test cases, one to test the basic functionality, and one to test the precedence. There are some copy-paste between the two tests but I think there is no need for further abstraction or code-reuse because YAGNI.
  • Also refactored the existing ServiceAccount annotations test to make it IMO simpler and more readable.

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

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Sep 23, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 23, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@wc-s wc-s force-pushed the 18400-chart-custom-pod-annotations branch from ed855a5 to 82969b5 Compare September 24, 2021 00:10
chart/tests/test_annotations.py Outdated Show resolved Hide resolved
chart/tests/test_annotations.py Outdated Show resolved Hide resolved
@wc-s wc-s force-pushed the 18400-chart-custom-pod-annotations branch from b9041bd to 75c04f6 Compare September 24, 2021 16:51
@wc-s wc-s force-pushed the 18400-chart-custom-pod-annotations branch from 75c04f6 to 6b9861e Compare September 24, 2021 16:54
@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 Sep 24, 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.

@jedcunningham
Copy link
Member

Giving CI another shot...

@wc-s
Copy link
Contributor Author

wc-s commented Sep 24, 2021

Thanks for the review.

What's up with the pipeline? Seems like flakiness to me, and the helm test failure happens to your 1.20 docs-only change as well.

@jedcunningham
Copy link
Member

Yeah sorry, it's been particularly painful the last few days unfortunately. I'll try again now, and I can run the full suite locally if that still doesn't do it.

@potiuk
Copy link
Member

potiuk commented Sep 25, 2021

Yeah. I hope (🤞 ) We finally fixed all the "major" flakiness problems - so the last error here is the real failing test :)

@potiuk potiuk closed this Sep 25, 2021
@potiuk potiuk reopened this Sep 25, 2021
@potiuk
Copy link
Member

potiuk commented Sep 25, 2021

Close/reopen to rebuild. the Helm Chart might however still hang (and that might be a general problem) - let's see

@wc-s
Copy link
Contributor Author

wc-s commented Sep 25, 2021

The helm chart unit test passes!

(I do think it's general flakiness rather than real test failures.. don't know enough about the CI tests to know why, maybe because of the parallel execution.)

@wc-s
Copy link
Contributor Author

wc-s commented Sep 25, 2021

Are we ok with merging this, given that the temperamental test is luckily in a passing state? 😆

@potiuk
Copy link
Member

potiuk commented Sep 25, 2021

Well. I would not say lucky. We are really just about to reach the state of "back to green" on main. I think there is one very intermittent issue currently that I know about :D

@potiuk potiuk merged commit 2f44f0b into apache:main Sep 25, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 25, 2021

Awesome work, congrats on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm chart: allow each component to have different custom pod annotations
3 participants