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/02/01 17:24:34 UTC

[GitHub] [airflow] Junnplus opened a new pull request #14011: Add flower enabled

Junnplus opened a new pull request #14011:
URL: https://github.com/apache/airflow/pull/14011


   flower should be a optional component, not required.
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/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/master/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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] dstandish commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.
+  # If Ture, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flower app.

Review comment:
       ```suggestion
     # If True, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flower app.
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.
+  # If Ture, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flow ui.

Review comment:
       fixed.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] dstandish commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):

Review comment:
       given that airflow uses pytest shouldn't the class be named TestFlower?
   

##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},
+            show_only=["templates/flower/flower-deployment.yaml"],
+        )
+
+        assert "RELEASE-NAME-flower" == jmespath.search("metadata.name", docs[0])
+        assert "flower" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
+
     def test_should_create_flower_deployment_with_authorization(self):
         docs = render_chart(
             values={
                 "executor": "CeleryExecutor",
-                "flower": {"username": "flower", "password": "fl0w3r"},
+                "flower": {"enabled": True, "username": "flower", "password": "fl0w3r"},

Review comment:
       perhaps it makes sense to not specify "enabled" here, to test what happens by default

##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},

Review comment:
       you think it is worth parameterizing to confim that it is created if and only if enabled?

##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.
+  # If Ture, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flow ui.

Review comment:
       spelling

##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.

Review comment:
       i think you can chop this line because 472 already does a better job of explaining




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/README.md
##########
@@ -275,6 +275,7 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `webserver.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
 | `webserver.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
 | `webserver.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `flower.enabled`                                      | Enable flower                                                                                                | `false`                                           |

Review comment:
       This should be `True` by default. Most of the users would like to have flower when using Celery or CeleryKubernetes Executor




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},
+            show_only=["templates/flower/flower-deployment.yaml"],
+        )
+
+        assert "RELEASE-NAME-flower" == jmespath.search("metadata.name", docs[0])
+        assert "flower" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
+
     def test_should_create_flower_deployment_with_authorization(self):
         docs = render_chart(
             values={
                 "executor": "CeleryExecutor",
-                "flower": {"username": "flower", "password": "fl0w3r"},
+                "flower": {"enabled": True, "username": "flower", "password": "fl0w3r"},

Review comment:
       This test just test create flower with authorization, I will test separately without "enabled".




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #14011: Add flower enabled

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


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},
+            show_only=["templates/flower/flower-deployment.yaml"],
+        )
+
+        assert "RELEASE-NAME-flower" == jmespath.search("metadata.name", docs[0])
+        assert "flower" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
+
     def test_should_create_flower_deployment_with_authorization(self):
         docs = render_chart(
             values={
                 "executor": "CeleryExecutor",
-                "flower": {"username": "flower", "password": "fl0w3r"},
+                "flower": {"enabled": True, "username": "flower", "password": "fl0w3r"},

Review comment:
       This just test create flower with authorization, I will test separately without "enabled".




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/README.md
##########
@@ -275,6 +275,7 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `webserver.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
 | `webserver.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
 | `webserver.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `flower.enabled`                                      | Enable flower                                                                                                | `false`                                           |

Review comment:
       > Most of the users would like to have flower when using Celery or CeleryKubernetes Executor.
   
   You are right, but executor default is `KubernetesExecutor` in values




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #14011: Add flower enabled

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/539637438) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #14011: Add flower enabled

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/539637438) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/README.md
##########
@@ -275,6 +275,7 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `webserver.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
 | `webserver.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
 | `webserver.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `flower.enabled`                                      | Enable flower                                                                                                | `false`                                           |

Review comment:
       > Most of the users would like to have flower when using Celery or CeleryKubernetes Executor.
   
   You are right, but executor default is `KubernetesExecutor` in values, the installation of flower is redundant.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},
+            show_only=["templates/flower/flower-deployment.yaml"],
+        )
+
+        assert "RELEASE-NAME-flower" == jmespath.search("metadata.name", docs[0])
+        assert "flower" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
+
     def test_should_create_flower_deployment_with_authorization(self):
         docs = render_chart(
             values={
                 "executor": "CeleryExecutor",
-                "flower": {"username": "flower", "password": "fl0w3r"},
+                "flower": {"enabled": True, "username": "flower", "password": "fl0w3r"},

Review comment:
       This test just test create flower with authorization, I will test separately without "enabled".

##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):

Review comment:
       Your are right.

##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},
+            show_only=["templates/flower/flower-deployment.yaml"],
+        )
+
+        assert "RELEASE-NAME-flower" == jmespath.search("metadata.name", docs[0])
+        assert "flower" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
+
     def test_should_create_flower_deployment_with_authorization(self):
         docs = render_chart(
             values={
                 "executor": "CeleryExecutor",
-                "flower": {"username": "flower", "password": "fl0w3r"},
+                "flower": {"enabled": True, "username": "flower", "password": "fl0w3r"},

Review comment:
       This just test create flower with authorization, I will test separately without "enabled".




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/README.md
##########
@@ -275,6 +275,7 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `webserver.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
 | `webserver.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
 | `webserver.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `flower.enabled`                                      | Enable flower                                                                                                | `false`                                           |

Review comment:
       > Most of the users would like to have flower when using Celery or CeleryKubernetes Executor.
   
   You are right, but executor default is `KubernetesExecutor` in values, the installation of flower is redundant.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.
+  # If True, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flower app.
+  enabled: false

Review comment:
       ```suggestion
     enabled: true
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil merged pull request #14011: Add flower enabled

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


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Junnplus commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):

Review comment:
       Your are right.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] dstandish commented on a change in pull request #14011: Add flower enabled

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



##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):

Review comment:
       given that airflow uses pytest shouldn't the class be named TestFlower?
   

##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},
+            show_only=["templates/flower/flower-deployment.yaml"],
+        )
+
+        assert "RELEASE-NAME-flower" == jmespath.search("metadata.name", docs[0])
+        assert "flower" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
+
     def test_should_create_flower_deployment_with_authorization(self):
         docs = render_chart(
             values={
                 "executor": "CeleryExecutor",
-                "flower": {"username": "flower", "password": "fl0w3r"},
+                "flower": {"enabled": True, "username": "flower", "password": "fl0w3r"},

Review comment:
       perhaps it makes sense to not specify "enabled" here, to test what happens by default

##########
File path: chart/tests/test_flower.py
##########
@@ -22,12 +22,21 @@
 from tests.helm_template_generator import render_chart
 
 
-class FlowerAuthorizationTest(unittest.TestCase):
+class FlowerTest(unittest.TestCase):
+    def test_should_create_flower_by_celery_executor(self):
+        docs = render_chart(
+            values={"executor": "CeleryExecutor", "flower": {"enabled": True}},

Review comment:
       you think it is worth parameterizing to confim that it is created if and only if enabled?

##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.
+  # If Ture, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flow ui.

Review comment:
       spelling

##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.

Review comment:
       i think you can chop this line because 472 already does a better job of explaining




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #14011: Add flower enabled

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #14011:
URL: https://github.com/apache/airflow/pull/14011#discussion_r571779987



##########
File path: chart/values.yaml
##########
@@ -468,6 +468,9 @@ webserver:
 
 # Flower settings
 flower:
+  # Enable flower.
+  # If Ture, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flow ui.

Review comment:
       ```suggestion
     # If Ture, and using CeleryExecutor/CeleryKubernetesExecutor, will deploy flower app.
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org