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 2022/11/25 07:10:03 UTC

[GitHub] [airflow] Bowrna opened a new pull request, #27905: listener plugin example added

Bowrna opened a new pull request, #27905:
URL: https://github.com/apache/airflow/pull/27905

   related: #15353
   <!--
   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 an 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/
   -->
   
   ---
   **^ 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 changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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] kaxil commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
kaxil commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1337747325

   > If there is anything that I have to improve in this example, with regard to recent Airflow 2.5 release let me know. I will see if I can improve it further. @kaxil @potiuk
   
   We should add an example for DAG listener too if it doesn't exist -- can be a separate PR too.
   
   It was added in https://github.com/apache/airflow/commit/035315f5cf331a0fc5b1800f708e2f83fcfb2d7a#diff-78d2fef5ef9818cef722ba4ae1f35c66cebfcb73c33a7d4dfda1db23009599e0R24


-- 
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 #27905: listener plugin example added

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #27905:
URL: https://github.com/apache/airflow/pull/27905


-- 
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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1374439476

   Hello :) Do I have any update on this PR? I am looking forward to get this code merged.


-- 
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 #27905: listener plugin example added

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

   Nice one ! @kaxil ? 


-- 
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] Bowrna commented on a diff in pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on code in PR #27905:
URL: https://github.com/apache/airflow/pull/27905#discussion_r1032381215


##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -0,0 +1,77 @@
+from airflow.listeners import hookimpl

Review Comment:
   hmm, the other plugin example `workday.py` was in the same folder. That's why I put it there. I could relocate all the plugin examples to a different file. Can I move it to example_plugins and put it on the same level as the example_dags folder?



-- 
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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1337729562

   If there is anything that I have to improve in this example, with regard to recent Airflow 2.5 release let me know. I will see if I can improve it further.
   @kaxil @potiuk 


-- 
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] Bowrna commented on a diff in pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on code in PR #27905:
URL: https://github.com/apache/airflow/pull/27905#discussion_r1034275922


##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -0,0 +1,77 @@
+from airflow.listeners import hookimpl

Review Comment:
   I am checking this now. 



-- 
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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1338774968

   yes I will add it as a separate PR @kaxil 


-- 
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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1345623014

   Failing in Postgres-related static check (test related to Kubernetes). I didn't make changes that will fail the 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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1347894638

   @kaxil I have added the dag listeners part too in this code. Verify when you get time. 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] potiuk commented on pull request #27905: listener plugin example added

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

   We have some more than usual instability in sqlite tests. I am not sure why - but I will take a look shortly.


-- 
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] kaxil commented on a diff in pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
kaxil commented on code in PR #27905:
URL: https://github.com/apache/airflow/pull/27905#discussion_r1032363717


##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -0,0 +1,77 @@
+from airflow.listeners import hookimpl

Review Comment:
   `example_dags` feels a weird place



-- 
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] kaxil commented on a diff in pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
kaxil commented on code in PR #27905:
URL: https://github.com/apache/airflow/pull/27905#discussion_r1032622727


##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -0,0 +1,77 @@
+from airflow.listeners import hookimpl

Review Comment:
   Fine for now, but something for the future



##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -0,0 +1,77 @@
+from airflow.listeners import hookimpl

Review Comment:
   Static checks are failing - https://github.com/apache/airflow/actions/runs/3547709746/jobs/5958172738



-- 
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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1332121909

   CI pipeline tests are failing in Sqlite tests. I didn't add anything relevant to that. Could anyone help me why its occurring?


-- 
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] Bowrna commented on pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna commented on PR #27905:
URL: https://github.com/apache/airflow/pull/27905#issuecomment-1361294649

   is there anything that needs to be done to get this PR merged?


-- 
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] kaxil commented on a diff in pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
kaxil commented on code in PR #27905:
URL: https://github.com/apache/airflow/pull/27905#discussion_r1065101658


##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -0,0 +1,158 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from airflow.listeners import hookimpl
+
+if TYPE_CHECKING:
+    pass
+

Review Comment:
   ```suggestion
   ```



-- 
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] Bowrna closed pull request #27905: listener plugin example added

Posted by GitBox <gi...@apache.org>.
Bowrna closed pull request #27905: listener plugin example added
URL: https://github.com/apache/airflow/pull/27905


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