nailo2c commented on code in PR #66510:
URL: https://github.com/apache/airflow/pull/66510#discussion_r3214013461


##########
providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py:
##########
@@ -989,6 +1003,12 @@ def _validate_inputs(self) -> None:
                 " SSL is not needed as Cloud SQL Proxy "
                 "provides encryption on its own"
             )
+        if self.use_iam and self.sql_proxy_enable_iam_login:
+            raise ValueError(
+                "use_iam (direct IAM token) and sql_proxy_enable_iam_login 
(proxy IAM) are mutually exclusive"
+            )
+        if self.sql_proxy_enable_iam_login and not self.use_proxy:
+            raise ValueError("sql_proxy_enable_iam_login requires use_proxy to 
be True")

Review Comment:
   I don't think we should apply this. The community has decided to stop adding 
new direct raise AirflowException usages.
   
   Ref: 
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#don-t-raise-airflowexception-directly



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to