You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dondaum (via GitHub)" <gi...@apache.org> on 2025/10/02 13:03:39 UTC

[PR] feat: add async jira notifier [airflow]

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

   <!--
    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.
    -->
   
   <!--
   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 an asynchronous version of `JiraNotfier`. As discussed in #55237, the asynchronous Notfier uses the Jira REST API and the `HttpAsyncHook` since the Jira package `atlassian-python-api` only supports sync API calls.
   
   
   related: #55237 
   
   
   I sucessfully tested the `JiraNotifier` with the following `Dag`:
   
   ```Python
   from datetime import datetime, timedelta
   from airflow import DAG
   from airflow.sdk.definitions.deadline import AsyncCallback, DeadlineAlert, DeadlineReference
   from airflow.providers.atlassian.jira.notifications.jira import JiraNotifier
   from airflow.providers.standard.operators.empty import EmptyOperator
   from airflow.sdk import task
   
   with DAG(
       dag_id="deadline_alert_example",
       deadline=DeadlineAlert(
           reference=DeadlineReference.DAGRUN_QUEUED_AT,
           interval=timedelta(seconds=20),
           callback=AsyncCallback(
               JiraNotifier,
               kwargs={
                   "description": "🚨 Dag {{ dag_run.dag_id }} missed deadline at {{ deadline.deadline_time }}. DagRun: {{ dag_run }}",
                   "summary": "This is a great summary.",
                   "project_id": XXX,
                   "issue_type_id": XXX,
               },
           ),
       ),
   ):
       c = EmptyOperator(task_id="example_task")
   
       @task()
       def wait():
           import time
           time.sleep(60*5)
   
       
       c >> wait()
   
   
   ```
   
   
   <img width="1959" height="559" alt="Screenshot 2025-10-02 135536" src="https://github.com/user-attachments/assets/aa633d2e-88f2-40a1-92f6-a77ef47512ec" />
   
   ---------------
   
   
   <img width="1327" height="826" alt="Screenshot 2025-10-02 135631" src="https://github.com/user-attachments/assets/1159f030-d6ba-4ce2-8207-a0f9352921ec" />
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.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 [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2398785148


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -19,30 +19,44 @@
 
 from __future__ import annotations
 
+import json
 from typing import Any, cast
 
+import aiohttp
 from atlassian import Jira
 
 from airflow.exceptions import AirflowException
 from airflow.providers.atlassian.jira.version_compat import BaseHook
+from airflow.providers.http.hooks.http import HttpAsyncHook
 
 
 class JiraHook(BaseHook):
     """
     Jira interaction hook, a Wrapper around Atlassian Jira Python SDK.
 
     :param jira_conn_id: reference to a pre-defined Jira Connection
+    :param proxies: Proxies to make the Jira REST API call. Optional
+    :param api_root: root for the api requests. Optional
+    :param api_version: Jira api version to use. Optional
     """
 
     default_conn_name = "jira_default"
     conn_type = "jira"
     conn_name_attr = "jira_conn_id"
     hook_name = "JIRA"
 
-    def __init__(self, jira_conn_id: str = default_conn_name, proxies: Any | None = None) -> None:
+    def __init__(
+        self,
+        jira_conn_id: str = default_conn_name,
+        proxies: Any | None = None,
+        api_root: str = "rest/api",

Review Comment:
   Added `api_root` and `api_version` as these can also be set in `atlassian-python-api` 
   
   https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/jira.py#L31
   https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/rest_client.py#L83
   https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/rest_client.py#L84



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3406007420

   I assume CI errors should not be related to this feature.


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430091831


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -88,3 +115,77 @@ def get_ui_field_behaviour(cls) -> dict[str, Any]:
             "hidden_fields": ["schema", "extra"],
             "relabeling": {},
         }
+
+
+class JiraAsyncHook(HttpAsyncHook):

Review Comment:
   Is there a reason for a new hook rather than adding async support to the existing hook like [SlackWebhook](https://github.com/apache/airflow/blob/main/providers/slack/src/airflow/providers/slack/hooks/slack_webhook.py)?  We should likely standardize one or the other. 



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430040907


##########
dev/breeze/tests/test_selective_checks.py:
##########
@@ -719,14 +719,17 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
                                 "test_types": "Providers[amazon] Providers[apache.livy]",
                             },
                             {
-                                "description": "dbt.cloud...dingding",
-                                "test_types": "Providers[dbt.cloud] Providers[dingding]",
+                                "description": "atlassian.jir...dbt.cloud",

Review Comment:
   Is `atlassian.jir` intentional or a typo missing the `a` at the end?



##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -15,34 +15,59 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""Hook for JIRA."""
+"""
+Hook for JIRA.
+
+.. spelling:word-list::
+
+    ClientResponse
+    aiohttp
+    reqrep

Review Comment:
   I had no idea we could do this!  That's super handy, I've been adding tot he main list as needed.



##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/notifications/jira.py:
##########
@@ -61,17 +73,40 @@ def __init__(
 
     @cached_property
     def hook(self) -> JiraHook:
-        return JiraHook(jira_conn_id=self.jira_conn_id, proxies=self.proxies)
+        return JiraHook(
+            jira_conn_id=self.jira_conn_id,
+            proxies=self.proxies,
+            api_version=self.api_version,
+            api_root=self.api_root,
+        )
 
-    def notify(self, context) -> None:
-        fields = dict(
-            description=self.description,
-            summary=self.summary,
-            project=dict(id=self.project_id),
-            issuetype=dict(id=self.issue_type_id),
-            labels=self.labels,
+    @cached_property
+    def hook_async(self) -> JiraAsyncHook:

Review Comment:
   Can you rename this to `async_hook` to match existing examples, please.



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3423620319

   Let's try again.


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3423864293

   "once more, with feeling!"
   
   Green CI now, and two approvals. I'm going to merge 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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2398786459


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/notifications/jira.py:
##########
@@ -44,15 +47,24 @@ def __init__(
         *,
         jira_conn_id: str = JiraHook.default_conn_name,
         proxies: Any | None = None,
+        api_version: str | int = "2",

Review Comment:
   Added `api_root` and `api_version` as these can also be set in `atlassian-python-api` 
   
   https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/jira.py#L31
   https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/rest_client.py#L83
   https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/rest_client.py#L84



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3417281005

   Hmm, I have no idea why CI fails even after rebasing. The CI errors appear to be unrelated to this feature. But they don't disappear.


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3367969703

   CI errors should be not related to this feature.


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430193401


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -88,3 +115,77 @@ def get_ui_field_behaviour(cls) -> dict[str, Any]:
             "hidden_fields": ["schema", "extra"],
             "relabeling": {},
         }
+
+
+class JiraAsyncHook(HttpAsyncHook):

Review Comment:
   That's a good question. I also checked your implementations before deciding to add a new `AsyncHook`.
   
   First, I checked the Airflow codebase and found many other providers that isolate `AsyncHooks` in their own class. E.g. Google provider, Apache Beam provider, Microsoft provider, Apache Livy provider, http provider, 
   
   Secondly, it makes more sense for me to add a new class and use `HttpAsyncHook` as a single (direct) parent class instead of mixing them in one class and then having to use multiple class hierarchies e.g. 
   
   ```Python
   Class JiraHook(BaseHook, HttpAsyncHook):
       pass
   ```
   I think it's also easier to understand that we are reusing the `HttpAsyncHook`, which is the class, and its implementation is closer to this hook than to the `JiraHook`.
   
   Third, but not applicable here, since we are using `HttpAsyncHook`, class initialization may require different parameters or functionalities than we need to provide.
   
   For me there is no need to follow a standard, it depends. We can take both approaches. 
   
   If a Python library (e.g. Slack) already provides an asynchronous interface, I wouldn't create a new `AsyncClass` at all, but rather implement it similarly to what you did with the SlackWebhook.
   
   But I'm also very open to changes if the opposite approach makes more sense.  
   



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430193401


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -88,3 +115,77 @@ def get_ui_field_behaviour(cls) -> dict[str, Any]:
             "hidden_fields": ["schema", "extra"],
             "relabeling": {},
         }
+
+
+class JiraAsyncHook(HttpAsyncHook):

Review Comment:
   That's a good question. I also checked your implementations before deciding to add a new `AsyncHook`.
   
   First, I checked the Airflow codebase and found many other providers that isolate `AsyncHooks` in their own class. E.g. Google provider, Apache Beam provider, Microsoft provider, Apache Livy provider, http provider, 
   
   Secondly, it makes more sense for me to add a new class and use `HttpAsyncHook` as a single (direct) parent class instead of mixing them in one class and then having to use multiple class hierarchies e.g. 
   
   ```Python
   class JiraHook(BaseHook, HttpAsyncHook):
       pass
   ```
   I think it's also easier to understand that we are reusing the `HttpAsyncHook`, which is the class, and its implementation is closer to this hook than to the `JiraHook`.
   
   Third, but not applicable here, since we are using `HttpAsyncHook`, class initialization may require different parameters or functionalities than we need to provide.
   
   For me there is no need to follow a standard, it depends. We can take both approaches. 
   
   If a Python library (e.g. Slack) already provides an asynchronous interface, I wouldn't create a new `AsyncClass` at all, but rather implement it similarly to what you did with the SlackWebhook.
   
   But I'm also very open to changes if the opposite approach makes more sense.  
   



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2434067551


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -88,3 +115,77 @@ def get_ui_field_behaviour(cls) -> dict[str, Any]:
             "hidden_fields": ["schema", "extra"],
             "relabeling": {},
         }
+
+
+class JiraAsyncHook(HttpAsyncHook):

Review Comment:
   I think I can get behind that explanation, thanks for taking the time to write it out.  We could always standardize at some point, but given that there are other precedents I can get behind this.



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3410332958

   > I assume CI errors should not be related to this feature.
   
   Usually rebasing can give answer to 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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3423368259

   It is an odd one.    When you run `prek run --all-files` locally, does it pass?


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430199613


##########
dev/breeze/tests/test_selective_checks.py:
##########
@@ -719,14 +719,17 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
                                 "test_types": "Providers[amazon] Providers[apache.livy]",
                             },
                             {
-                                "description": "dbt.cloud...dingding",
-                                "test_types": "Providers[dbt.cloud] Providers[dingding]",
+                                "description": "atlassian.jir...dbt.cloud",

Review Comment:
   Cool, just checking, 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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3401336428

   Some conflicts need to be resolved.


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430043910


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -15,34 +15,59 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""Hook for JIRA."""
+"""
+Hook for JIRA.
+
+.. spelling:word-list::
+
+    ClientResponse
+    aiohttp
+    reqrep

Review Comment:
   I had no idea we could do this!  That's super handy, I've been adding to the main list as needed.



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


Re: [PR] feat: add async jira notifier [airflow]

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


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3401862902

   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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3401374414

   Thank you very much for the support.
   
   Yes, that was expected. Caused by the merge from https://github.com/apache/airflow/pull/56540 
   
   I will take.


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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430093674


##########
dev/breeze/tests/test_selective_checks.py:
##########
@@ -719,14 +719,17 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
                                 "test_types": "Providers[amazon] Providers[apache.livy]",
                             },
                             {
-                                "description": "dbt.cloud...dingding",
-                                "test_types": "Providers[dbt.cloud] Providers[dingding]",
+                                "description": "atlassian.jir...dbt.cloud",

Review Comment:
   It's intentional. It needs to be adjusted for fixing the breeze [unittest](https://github.com/apache/airflow/actions/runs/18495717970/job/52699529805?pr=56326).
   
   



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "dondaum (via GitHub)" <gi...@apache.org>.
dondaum commented on code in PR #56326:
URL: https://github.com/apache/airflow/pull/56326#discussion_r2430195623


##########
providers/atlassian/jira/src/airflow/providers/atlassian/jira/notifications/jira.py:
##########
@@ -61,17 +73,40 @@ def __init__(
 
     @cached_property
     def hook(self) -> JiraHook:
-        return JiraHook(jira_conn_id=self.jira_conn_id, proxies=self.proxies)
+        return JiraHook(
+            jira_conn_id=self.jira_conn_id,
+            proxies=self.proxies,
+            api_version=self.api_version,
+            api_root=self.api_root,
+        )
 
-    def notify(self, context) -> None:
-        fields = dict(
-            description=self.description,
-            summary=self.summary,
-            project=dict(id=self.project_id),
-            issuetype=dict(id=self.issue_type_id),
-            labels=self.labels,
+    @cached_property
+    def hook_async(self) -> JiraAsyncHook:

Review Comment:
   changed.



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


Re: [PR] feat: add async jira notifier [airflow]

Posted by "ramitkataria (via GitHub)" <gi...@apache.org>.
ramitkataria commented on PR #56326:
URL: https://github.com/apache/airflow/pull/56326#issuecomment-3423475448

   I believe this was recently fixed so rebasing again with main should fix 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