Taragolis commented on code in PR #35754:
URL: https://github.com/apache/airflow/pull/35754#discussion_r1399669338


##########
airflow/providers/trino/hooks/trino.py:
##########
@@ -99,11 +101,20 @@ def get_conn(self) -> Connection:
         elif db.password:
             auth = trino.auth.BasicAuthentication(db.login, db.password)  # 
type: ignore[attr-defined]
         elif extra.get("auth") == "jwt":
-            if "jwt__file" in extra:
-                with open(extra.get("jwt__file")) as jwt_file:
-                    token = jwt_file.read()
+            if not exactly_one(jwt_file := "jwt__file" in extra, jwt_token := 
"jwt__token" in extra):

Review Comment:
   There was the way to fix it by different way, however I preferred to add 
additional validation



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to