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/30 20:18:53 UTC

[GitHub] [airflow] Adityamalik123 commented on a diff in pull request #27633: Changing atlassian JIRA SDK to official atlassian-python-api SDK

Adityamalik123 commented on code in PR #27633:
URL: https://github.com/apache/airflow/pull/27633#discussion_r1036406657


##########
airflow/providers/atlassian/jira/hooks/jira.py:
##########
@@ -43,48 +43,51 @@ def __init__(self, jira_conn_id: str = default_conn_name, proxies: Any | None =
         super().__init__()
         self.jira_conn_id = jira_conn_id
         self.proxies = proxies
-        self.client: JIRA | None = None
+        self.client: Jira | None = None
         self.get_conn()
 
-    def get_conn(self) -> JIRA:
+    def get_conn(self) -> Jira:
         if not self.client:
             self.log.debug("Creating Jira client for conn_id: %s", self.jira_conn_id)
 
-            get_server_info = True
-            validate = True
-            extra_options = {}
+            verify = True
             if not self.jira_conn_id:
                 raise AirflowException("Failed to create jira client. no jira_conn_id provided")
 
             conn = self.get_connection(self.jira_conn_id)
             if conn.extra is not None:
                 extra_options = conn.extra_dejson
                 # only required attributes are taken for now,
-                # more can be added ex: async, logging, max_retries
+                # more can be added ex: timeout, cloud, session
 
                 # verify
                 if "verify" in extra_options and extra_options["verify"].lower() == "false":
-                    extra_options["verify"] = False
+                    verify = False
 
                 # validate
-                if "validate" in extra_options and extra_options["validate"].lower() == "false":
-                    validate = False
-
-                if "get_server_info" in extra_options and extra_options["get_server_info"].lower() == "false":
-                    get_server_info = False
+                if "validate" in extra_options:
+                    warnings.warn(
+                        "Passing 'validate' in the connection is no longer supported.",
+                        DeprecationWarning,
+                        stacklevel=2,
+                    )
+
+                if "get_server_info" in extra_options:
+                    warnings.warn(
+                        "Passing 'get_server_info' in the connection is no longer supported.",
+                        DeprecationWarning,
+                        stacklevel=2,
+                    )

Review Comment:
   Makes sense. I have removed these warnings.



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