You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/23 19:55:00 UTC

[GitHub] [airflow] wc-s opened a new pull request #18481: 18400 chart custom pod annotations

wc-s opened a new pull request #18481:
URL: https://github.com/apache/airflow/pull/18481


   <!--
   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 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/
   -->
   
   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](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+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 [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


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



[GitHub] [airflow] jedcunningham commented on a change in pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on a change in pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#discussion_r715212990



##########
File path: chart/templates/scheduler/scheduler-deployment.yaml
##########
@@ -85,6 +85,9 @@ spec:
         {{- if .Values.airflowPodAnnotations }}
         {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
         {{- end }}
+        {{- if .Values.scheduler.podAnnotations }}

Review comment:
       I feel like this should just be `.Values.scheduler.annotations`. Thoughts?




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



[GitHub] [airflow] boring-cyborg[bot] commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-927151714


   Awesome work, congrats on your first merged pull request!
   


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



[GitHub] [airflow] jedcunningham closed pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham closed pull request #18481:
URL: https://github.com/apache/airflow/pull/18481


   


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



[GitHub] [airflow] potiuk commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-927088506


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


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



[GitHub] [airflow] potiuk commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-927151670


   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


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



[GitHub] [airflow] jedcunningham commented on a change in pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on a change in pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#discussion_r715270959



##########
File path: chart/templates/scheduler/scheduler-deployment.yaml
##########
@@ -85,6 +85,9 @@ spec:
         {{- if .Values.airflowPodAnnotations }}
         {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
         {{- end }}
+        {{- if .Values.scheduler.podAnnotations }}

Review comment:
       Interesting, I never picked up on the reasoning in the example chart, makes sense, TIL. Thanks πŸ‘




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



[GitHub] [airflow] wc-s edited a comment on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s edited a comment on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-926898543


   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.


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



[GitHub] [airflow] jedcunningham commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-926873639


   Giving CI another shot...


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



[GitHub] [airflow] github-actions[bot] commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-926853869


   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.


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



[GitHub] [airflow] potiuk closed pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #18481:
URL: https://github.com/apache/airflow/pull/18481


   


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



[GitHub] [airflow] jedcunningham commented on a change in pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on a change in pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#discussion_r715272702



##########
File path: chart/tests/test_annotations.py
##########
@@ -19,20 +19,7 @@
 
 from tests.helm_template_generator import render_chart
 
-# Values for each service mapped to the 'example'
-# key annotation
-CUSTOM_ANNOTATION_VALUES = (
-    CUSTOM_SCHEDULER_ANNOTATION,
-    CUSTOM_WEBSERVER_ANNOTATION,
-    CUSTOM_WORKER_ANNOTATION,
-    CUSTOM_CLEANUP_ANNOTATION,
-    CUSTOM_FLOWER_ANNOTATION,
-    CUSTOM_PGBOUNCER_ANNOTATION,
-    CUSTOM_STATSD_ANNOTATION,
-    CUSTOM_CREATE_USER_JOB_ANNOTATION,
-    CUSTOM_MIGRATE_DATABASE_JOB_ANNOTATION,
-    CUSTOM_REDIS_ANNOTATION,
-) = (
+COMPONENTS_SUPPORTING_CUSTOM_SERVICEACCOUNT_ANNOTATIONS = (

Review comment:
       If we are only going to use these for asserting counts, I'm not sure it's worth enumerating them. A simple `assert len(x) == 11` seems cleaner?

##########
File path: chart/tests/test_annotations.py
##########
@@ -134,5 +138,114 @@ def test_service_account_annotations(self):
 
         self.assertCountEqual(
             list_of_annotation_values_in_objects,
-            CUSTOM_ANNOTATION_VALUES,
+            COMPONENTS_SUPPORTING_CUSTOM_SERVICEACCOUNT_ANNOTATIONS,
         )
+
+    def test_per_component_custom_annotations(self):
+        release_name = "RELEASE_NAME"
+
+        k8s_objects = render_chart(
+            name=release_name,
+            values={
+                "scheduler": {
+                    "podAnnotations": {
+                        "example": "scheduler",
+                    },
+                },
+                "webserver": {
+                    "podAnnotations": {
+                        "example": "webserver",
+                    },
+                },
+                "workers": {
+                    "podAnnotations": {
+                        "example": "worker",
+                    },
+                },
+                "flower": {
+                    "podAnnotations": {
+                        "example": "flower",
+                    },
+                },
+                "airflowVersion": "2.2.0",  # Needed for triggerer to be enabled.
+                "triggerer": {
+                    "podAnnotations": {
+                        "example": "triggerer",
+                    },
+                },
+            },
+            show_only=[
+                "templates/scheduler/scheduler-deployment.yaml",
+                "templates/workers/worker-deployment.yaml",
+                "templates/webserver/webserver-deployment.yaml",
+                "templates/flower/flower-deployment.yaml",
+                "templates/triggerer/triggerer-deployment.yaml",
+            ],
+        )
+
+        # The test relies on the convention that the Deployment name
+        # is always `{ Release.Name }-<component_name>`.
+        obj_by_component_name = {
+            obj["metadata"]["name"].replace(release_name + "-", ""): obj for obj in k8s_objects
+        }
+
+        self.assertCountEqual(obj_by_component_name, COMPONENTS_SUPPORTING_CUSTOM_POD_ANNOTATIONS)
+
+        for component_name, obj in obj_by_component_name.items():
+            self.assertIn("example", obj["spec"]["template"]["metadata"]["annotations"])
+            self.assertEqual(component_name, obj["spec"]["template"]["metadata"]["annotations"]["example"])

Review comment:
       ```suggestion
               assert "example" in obj["spec"]["template"]["metadata"]["annotations"]
               assert component_name == obj["spec"]["template"]["metadata"]["annotations"]["example"]
   ```
   
   Minor, but we prefer plain asserts.




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



[GitHub] [airflow] potiuk merged pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #18481:
URL: https://github.com/apache/airflow/pull/18481


   


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



[GitHub] [airflow] jedcunningham closed pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham closed pull request #18481:
URL: https://github.com/apache/airflow/pull/18481


   


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



[GitHub] [airflow] wc-s commented on a change in pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s commented on a change in pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#discussion_r715215273



##########
File path: chart/templates/scheduler/scheduler-deployment.yaml
##########
@@ -85,6 +85,9 @@ spec:
         {{- if .Values.airflowPodAnnotations }}
         {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
         {{- end }}
+        {{- if .Values.scheduler.podAnnotations }}

Review comment:
       While I prefer `podAnnotations`, I absolutely do not mind one way or another, and can change them all if you'd like.
   
   The reason I prefer `podAnnotations` are:
   - I'd like to stick with helm's default chart's conventions (the example chart you'd get by doing `helm create test-chart`, and in their chart they have:
   ```
     template:
       metadata:
         {{- with .Values.podAnnotations }}
         annotations:
           {{- toYaml . | nindent 8 }}
         {{- end }}
   ```
   - I think the reason helm's default chart went with podAnnotations, is to make it clear it is not eg. the annotation of the `Deployment` object, an approach with which I agree




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



[GitHub] [airflow] jedcunningham commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-926914454


   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.


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



[GitHub] [airflow] wc-s commented on a change in pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s commented on a change in pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#discussion_r715458487



##########
File path: chart/tests/test_annotations.py
##########
@@ -19,20 +19,7 @@
 
 from tests.helm_template_generator import render_chart
 
-# Values for each service mapped to the 'example'
-# key annotation
-CUSTOM_ANNOTATION_VALUES = (
-    CUSTOM_SCHEDULER_ANNOTATION,
-    CUSTOM_WEBSERVER_ANNOTATION,
-    CUSTOM_WORKER_ANNOTATION,
-    CUSTOM_CLEANUP_ANNOTATION,
-    CUSTOM_FLOWER_ANNOTATION,
-    CUSTOM_PGBOUNCER_ANNOTATION,
-    CUSTOM_STATSD_ANNOTATION,
-    CUSTOM_CREATE_USER_JOB_ANNOTATION,
-    CUSTOM_MIGRATE_DATABASE_JOB_ANNOTATION,
-    CUSTOM_REDIS_ANNOTATION,
-) = (
+COMPONENTS_SUPPORTING_CUSTOM_SERVICEACCOUNT_ANNOTATIONS = (

Review comment:
       I actually agree, and I was just trying to conform to the existing test's convention here haha. I'll refactor it for both the old and the new test here.




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



[GitHub] [airflow] wc-s commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-926898543


   Thanks for the review.
   
   What's up with the pipeline? Seems like flakiness to me, and it happens to your 1.20 docs-only change as well.


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



[GitHub] [airflow] boring-cyborg[bot] commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-926109294


   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]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) 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](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) 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](https://www.apache.org/foundation/policies/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]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
   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
   


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



[GitHub] [airflow] wc-s commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-927124484


   Are we ok with merging this, given that the temperamental test is luckily in a passing state? πŸ˜† 


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



[GitHub] [airflow] wc-s commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-927112360


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


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



[GitHub] [airflow] potiuk commented on pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#issuecomment-927088651


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


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



[GitHub] [airflow] wc-s commented on a change in pull request #18481: 18400 chart custom pod annotations

Posted by GitBox <gi...@apache.org>.
wc-s commented on a change in pull request #18481:
URL: https://github.com/apache/airflow/pull/18481#discussion_r715458676



##########
File path: chart/tests/test_annotations.py
##########
@@ -134,5 +138,114 @@ def test_service_account_annotations(self):
 
         self.assertCountEqual(
             list_of_annotation_values_in_objects,
-            CUSTOM_ANNOTATION_VALUES,
+            COMPONENTS_SUPPORTING_CUSTOM_SERVICEACCOUNT_ANNOTATIONS,
         )
+
+    def test_per_component_custom_annotations(self):
+        release_name = "RELEASE_NAME"
+
+        k8s_objects = render_chart(
+            name=release_name,
+            values={
+                "scheduler": {
+                    "podAnnotations": {
+                        "example": "scheduler",
+                    },
+                },
+                "webserver": {
+                    "podAnnotations": {
+                        "example": "webserver",
+                    },
+                },
+                "workers": {
+                    "podAnnotations": {
+                        "example": "worker",
+                    },
+                },
+                "flower": {
+                    "podAnnotations": {
+                        "example": "flower",
+                    },
+                },
+                "airflowVersion": "2.2.0",  # Needed for triggerer to be enabled.
+                "triggerer": {
+                    "podAnnotations": {
+                        "example": "triggerer",
+                    },
+                },
+            },
+            show_only=[
+                "templates/scheduler/scheduler-deployment.yaml",
+                "templates/workers/worker-deployment.yaml",
+                "templates/webserver/webserver-deployment.yaml",
+                "templates/flower/flower-deployment.yaml",
+                "templates/triggerer/triggerer-deployment.yaml",
+            ],
+        )
+
+        # The test relies on the convention that the Deployment name
+        # is always `{ Release.Name }-<component_name>`.
+        obj_by_component_name = {
+            obj["metadata"]["name"].replace(release_name + "-", ""): obj for obj in k8s_objects
+        }
+
+        self.assertCountEqual(obj_by_component_name, COMPONENTS_SUPPORTING_CUSTOM_POD_ANNOTATIONS)
+
+        for component_name, obj in obj_by_component_name.items():
+            self.assertIn("example", obj["spec"]["template"]["metadata"]["annotations"])
+            self.assertEqual(component_name, obj["spec"]["template"]["metadata"]["annotations"]["example"])

Review comment:
       Sounds good, and me too. Will change.




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